← Back to team overview

openstack team mailing list archive

Re: Migrate Instance to another Tenant ID in the same environment

 

Cool!


--
Regards,
Sébastien Han.


On Thu, Jan 10, 2013 at 11:15 AM, Alex Vitola <alex.vitola@xxxxxxxxx> wrote:
> Changed directly by the database.
>
> Not the best way but I did because it was an environment.
>
> So far I have not found any problems
>
>
> mysql> use nova;
> mysql> UPDATE `nova`.`instances` SET `user_id` =
> 'c892202c2a134b8e9f19c047f29c60ee', `project_id` =
> 'debd50b4ec2b4905a3296ac0f0971849' WHERE `instances`.`id` =7;
>
>
> att
>
> Alex Vitola
>
>
> 2013/1/10 Razique Mahroua <razique.mahroua@xxxxxxxxx>
>>
>> +1
>>
>> Seb, have you ever tried to change the tenant id for an instance into the database and reboot/ recover it? I wonder how nova behaves into such case
>>
>> Razique Mahroua - Nuage & Co
>> razique.mahroua@xxxxxxxxx
>> Tel : +33 9 72 37 94 15
>>
>>
>> Le 9 janv. 2013 à 22:18, Sébastien Han <han.sebastien@xxxxxxxxx> a écrit :
>>
>> Moving instances from project to project is not possible however what
>> you can do is (safe way):
>>
>> - as an admin user
>> - snapshot the image from env 1
>> - grab the snapshotted file from your glance store
>> - import the snapshot into glance
>> - make the image public
>> - run the snapshot from env 2
>> - enjoy!
>>
>> Cheers!
>>
>> --
>> Regards,
>> Sébastien Han.
>>
>>
>> On Wed, Jan 9, 2013 at 8:14 PM, Alex Vitola <alex.vitola@xxxxxxxxx> wrote:
>>
>> I have 2 projects in my environment:
>>
>> ProjectQA1: ID -> 0001
>> ProjectQA2: ID -> 0002
>>
>> root@Controller:# keystone tenant-list
>> +---------+------------+---------+
>> | id      |    name    | enabled |
>> +---------+------------+---------+
>> | 0001    | ProjectQA1 |   True  |
>> | 0002    | ProjectQA2 |   True  |
>> +----------------------------------+------------+---------+
>>
>> In Project 1 there are 1 instance
>> In Project 2 there are 7 instances
>>
>> root@Controller:# nova usage-list
>>
>> +-----------+-----------+--------------+-----------+---------------+
>> | Tenant ID | Instances | RAM MB-Hours | CPU Hours | Disk GB-Hours |
>> +-----------+-----------+--------------+-----------+---------------+
>> | 0001      | 1         | 12533.78     | 24.48     | 244.80        |
>> | 0002      | 7         | 127447.40    | 171.17    | 2100.45       |
>> +-----------+-----------+--------------+-----------+---------------+
>>
>> Is it possible to move this instance of Project 1 for 2?
>>
>> root@Controller:# nova list
>> +------+-------+--------+------------------------+
>> | ID   | Name  | Status | Networks               |
>> +------+-------+--------+------------------------+
>> | 9991 | QA-07 | ACTICE | Net-Demo=200.100.50.25 |
>> +------+-------+--------+------------------------+
>>
>> Move ID 9991/QA-07
>>
>> from: Tenant ID 0001
>> to: Tenant ID 0002
>>
>> Is that possible?
>>
>>
>>
>> Att
>>
>> Alex Vitola
>> System Administrator
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~openstack
>> Post to     : openstack@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~openstack
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~openstack
>> Post to     : openstack@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~openstack
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to     : openstack@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~openstack
> More help   : https://help.launchpad.net/ListHelp


References