Ask Your Question

How to move a instance between projects?

asked 2014-04-24 15:56:48 -0600

Pablolibo gravatar image

That's it, How I can move a instance to a specific project? I am using havana release


edit retag flag offensive close merge delete


Can you please elaborate, whether you need to move instance from demo project to admin project or specific user project and vice versa.

SGPJ gravatar imageSGPJ ( 2014-04-25 01:30:12 -0600 )edit

3 answers

Sort by ยป oldest newest most voted

answered 2014-04-25 05:52:12 -0600

SGPJ gravatar image

updated 2014-04-25 11:11:27 -0600

Each project is considered as a tenant and VMs launched will be specific to that tenant. AFAIK you cannot directly move VMs between tenants but you can migrate from one compute node to other compute node within same tenant or public snapshot it and launch wherever you want within same Openstack Controller managed projects.

edit flag offensive delete link more


Thanks! that's very clear!

Pablolibo gravatar imagePablolibo ( 2014-05-14 10:07:20 -0600 )edit

answered 2014-05-19 11:46:56 -0600

baltimonster gravatar image

Just change the project association in the nova db.

mysql> use keystone
mysql> select id, name, enabled from project\G
*************************** 1. row ***************************
     id: 111xxxxxxxxxxxxxxxxxxxxxxxxxxxxxa
   name: project 1
enabled: 1
*************************** 2. row ***************************
     id: 222xxxxxxxxxxxxxxxxxxxxxxxxxxxxxb
   name: project 2
enabled: 1

mysql> use nova;
    mysql> select project_id, reservation_id, display_name from instances where project_id = '111xxxxxxxxxxxxxxxxxxxxxxxxxxxxxa';

*************************** 1. row ***************************
project_id: 111xxxxxxxxxxxxxxxxxxxxxxxxxxxxxa
reservation_id: r-sasdf12p
display_name: instance1

mysql> update instances set project_id = '222xxxxxxxxxxxxxxxxxxxxxxxxxxxxxb' where reservation_id = 'r-sasdf12p';

We just ran this and it worked as well as it was easy.


edit flag offensive delete link more


it works if you are not share the network between instances and this is the same network

Pablolibo gravatar imagePablolibo ( 2014-07-16 20:05:09 -0600 )edit

answered 2014-04-25 11:06:23 -0600

updated 2014-04-25 11:59:07 -0600

There is always a way to get things done :-) what I would do is first take a snapshot of the VM you want to move to a new project, then either share it with the project or make it public in the system. Now go to the new project and just re-launch the snapshot you took in the old project and you now will have a new VM (clone of the old) in the new project. There a command line feature to just share from one project to the next "can_share". Below is a example of the command.

$ glance member-create --can-share Image-ID Project-ID

$ glance member-create --can-share 66ee4474-bace-475b-99f3-09f809060742 feb0ea0cdbe84f0abd8cac80a357b72f

This should do the job.

edit flag offensive delete link more


Yes, this should work within same Openstack controller managed projects.

SGPJ gravatar imageSGPJ ( 2014-04-25 11:13:44 -0600 )edit

If you wanted to move to a new Availability Zone (Different controller managed projects) you could do almost the same, take a snapshot of the VM, then use the Glance command to download it, then use Glance again to upload it to the new Availability Zone into the right project.

Bill@Metacloud gravatar imageBill@Metacloud ( 2014-04-25 11:58:20 -0600 )edit

Yes I agree, but this is like almost manually adding a new image not movement of VM between projects.

SGPJ gravatar imageSGPJ ( 2014-04-25 12:18:30 -0600 )edit

Agree, but it is a way to get the job done today.

Bill@Metacloud gravatar imageBill@Metacloud ( 2014-04-25 13:16:10 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Get to know Ask OpenStack

Resources for moderators

Question Tools


Asked: 2014-04-24 15:56:48 -0600

Seen: 5,226 times

Last updated: May 19 '14