Got it.
I will try to do the same as you did.

On Mon, Jan 20, 2014 at 12:19 PM, Geoff Higginbottom
<geoff.higginbot...@shapeblue.com> wrote:
> I update the network_id field for the NIC as the NIC in the VM needs to be 
> mapped to the Project Network.  I'm not sure what the network_map table does, 
> but it also has a reference to the network_id so I updated that as well just 
> to play safe.
>
> Regards
>
> Geoff Higginbottom
>
> D: +44 20 3603 0542 | S: +44 20 3603 0540 | M: +447968161581
>
> geoff.higginbot...@shapeblue.com
>
> -----Original Message-----
> From: Rafael Weingartner [mailto:rafaelweingart...@gmail.com]
> Sent: 20 January 2014 11:40
> To: users@cloudstack.apache.org
> Subject: Re: Move running vm to project
>
> The tables that you updated the account_id I totally understand why you did 
> that, but, why did you update the network_id on networks and network_map?
>
> On Mon, Jan 20, 2014 at 8:33 AM, Geoff Higginbottom 
> <geoff.higginbot...@shapeblue.com> wrote:
>> I think I've cracked it.
>>
>> I have to update the following tables and columns:
>>
>> Table: vm_instance
>> Columns:  account_id & owner
>>
>> Table: nics
>> Columns: network_id
>>
>> Table: network_map
>> Columns: network_id
>>
>> Table: networks
>> Columns: account_id
>>
>> Table: volumes
>> Columns: account_id
>>
>> There may be more that need updating, but the VM is now showing up in the 
>> Project, and can ping other VMs which were created in the Project.
>>
>> One thing to note is that the VM I migrated was created in a standard 
>> account which is in the same Domain as the Project.
>>
>> Regards
>>
>> Geoff Higginbottom
>>
>> D: +44 20 3603 0542 | S: +44 20 3603 0540 | M: +447968161581
>>
>> geoff.higginbot...@shapeblue.com
>>
>> -----Original Message-----
>> From: Rafael Weingartner [mailto:rafaelweingart...@gmail.com]
>> Sent: 20 January 2014 10:21
>> To: users@cloudstack.apache.org
>> Subject: Re: Move running vm to project
>>
>> Sean, Geoff,
>> This week I am going to take a look at the database and the api, to see if I 
>> can find a nice way to work this around.
>> Anything I find I will let you know ;)
>>
>> On Mon, Jan 20, 2014 at 7:53 AM, Sean Hamilton <s...@seanhamilton.co.uk> 
>> wrote:
>>> Darn. I've not had to do this myself before. I wonder if the ROOT
>>> volume needs to be updated in the same way? There are a lot of
>>> resources associated with a vm.
>>>
>>>
>>> On 20 January 2014 09:50, Geoff Higginbottom <
>>> geoff.higginbot...@shapeblue.com> wrote:
>>>
>>>> I actually tried that 30 mins ago and unfortunately it does not work
>>>>
>>>> Regards
>>>>
>>>> Geoff Higginbottom
>>>>
>>>> D: +44 20 3603 0542 | S: +44 20 3603 0540 | M: +447968161581
>>>>
>>>> geoff.higginbot...@shapeblue.com
>>>>
>>>> -----Original Message-----
>>>> From: Sean Hamilton [mailto:s...@seanhamilton.co.uk]
>>>> Sent: 20 January 2014 09:47
>>>> To: users@cloudstack.apache.org
>>>> Subject: Re: Move running vm to project
>>>>
>>>> Rafael,
>>>>
>>>> If you look at the account table in the cloud database, you'll see
>>>> that some fields in account_name look like *PrjAcct-[Project Name]-2
>>>> *they have the type set as 5: select * from cloud.account where type
>>>> =5;
>>>>
>>>> I think that if you use the migrateVM API command and make this user
>>>> the owner, it will get moved into that project. You can see that
>>>> this user account 'owns' all vms within that project.
>>>>
>>>> Not sure if this helps at all...
>>>>
>>>> Sean
>>>>
>>>>
>>>> On 19 January 2014 16:32, Rafael Weingartner
>>>> <rafaelweingart...@gmail.com
>>>> >wrote:
>>>>
>>>> > Well, I could do that. However, this way seems that the VM is just
>>>> > going to be migrate to that user and not to a project. Unless the
>>>> > 'master' account of a project has the ability to migrate its VMs
>>>> > to a specific project since it can be master in more than one project.
>>>> >
>>>> > On Sun, Jan 19, 2014 at 2:26 PM, Sean Hamilton
>>>> > <s...@seanhamilton.co.uk>
>>>> > wrote:
>>>> > > Isn't there a master user account for a project? This account
>>>> > > holds
>>>> > resources for that project, including vms.
>>>> > >
>>>> > > You could list all user accounts in a project and find the 'master'
>>>> > account and use migrate VM command?
>>>> > >
>>>> > >> On 19 Jan 2014, at 15:48, Rafael Weingartner <
>>>> > rafaelweingart...@gmail.com> wrote:
>>>> > >>
>>>> > >> I saw that command, but, reading the docs, it seems that it
>>>> > >> just migrate VMs between accounts.
>>>> > >>
>>>> > >> On Sat, Jan 18, 2014 at 6:22 AM, Geoff Higginbottom
>>>> > >> <geoff.higginbot...@shapeblue.com> wrote:
>>>> > >>> Rafael,
>>>> > >>>
>>>> > >>> There is a migrate VM API command that allows you to move a VM
>>>> > >>> to
>>>> > another account, it might work with projects as we'll but I have
>>>> > not tried it.
>>>> > >>>
>>>> > >>>
>>>> > http://cloudstack.apache.org/docs/api/apidocs-4.2/root_admin/assig
>>>> > n
>>>> > Vir
>>>> > tualMachine.html
>>>> > >>>
>>>> > >>>
>>>> > >>> Regards
>>>> > >>>
>>>> > >>> Geoff Higginbottom
>>>> > >>> CTO / Cloud Architect
>>>> > >>>
>>>> > >>>
>>>> > >>> D: +44 20 3603 0542<tel:+442036030542> | S: +44 20 3603 0540<tel:
>>>> > +442036030540> | M: +447968161581<tel:+447968161581>
>>>> > >>>
>>>> > >>> geoff.higginbot...@shapeblue.com<mailto:
>>>> > geoff.higginbot...@shapeblue.com> | www.shapeblue.com<htp://
>>>> > www.shapeblue.com/>
>>>> > >>>
>>>> > >>> ShapeBlue Ltd, 53 Chandos Place, Covent Garden, London, WC2N
>>>> > 4HS<x-apple-data-detectors://37>
>>>> > >>>
>>>> > >>>
>>>> > >>>
>>>> > >>> On 18 Jan 2014, at 00:47, "Rafael Weingartner" <
>>>> > rafaelweingart...@gmail.com<mailto:rafaelweingart...@gmail.com>> wrote:
>>>> > >>>
>>>> > >>> Hi,
>>>> > >>> I was wondering, is it possible to move a running VM to a project?
>>>> > >>> If so, how could I do that? I know that I can do that working
>>>> > >>> directly on the database, but this would be an error prone job.
>>>> > >>>
>>>> > >>> --
>>>> > >>> Rafael Weing?rtner
>>>> > >>> Need Enterprise Grade Support for Apache CloudStack?
>>>> > >>> Our CloudStack Infrastructure Support<
>>>> > http://shapeblue.com/cloudstack-infrastructure-support/> offers
>>>> > the best
>>>> > 24/7 SLA for CloudStack Environments.
>>>> > >>>
>>>> > >>> Apache CloudStack Bootcamp training courses
>>>> > >>>
>>>> > >>> **NEW!** CloudStack 4.2 training<
>>>> > http://shapeblue.com/cloudstack-training/>
>>>> > >>> 08/09 January 2014,
>>>> > >>> London<http://shapeblue.com/cloudstack-training/>
>>>> > >>> 13-17 January 2014, GLOBAL. Instructor led, On-line<
>>>> > http://shapeblue.com/cloudstack-training/>
>>>> > >>> 20-24 January 2014, GLOBAL. Instructor led, On-line<
>>>> > http://shapeblue.com/cloudstack-training/>
>>>> > >>>
>>>> > >>> This email and any attachments to it may be confidential and
>>>> > >>> are
>>>> > intended solely for the use of the individual to whom it is addressed.
>>>> > Any views or opinions expressed are solely those of the author and
>>>> > do not necessarily represent those of Shape Blue Ltd or related
>>>> > companies. If you are not the intended recipient of this email,
>>>> > you must neither take any action based upon its contents, nor copy
>>>> > or show it to anyone. Please contact the sender if you believe you
>>>> > have received
>>>> this email in error.
>>>> > Shape Blue Ltd is a company incorporated in England & Wales.
>>>> > ShapeBlue Services India LLP is a company incorporated in India
>>>> > and is operated under license from Shape Blue Ltd. Shape Blue
>>>> > Brasil Consultoria Ltda is a company incorporated in Brasil and is
>>>> > operated under license from Shape Blue Ltd. ShapeBlue is a registered 
>>>> > trademark.
>>>> > >>
>>>> > >>
>>>> > >>
>>>> > >> --
>>>> > >> Rafael Weingärtner
>>>> >
>>>> >
>>>> >
>>>> > --
>>>> > Rafael Weingärtner
>>>> >
>>>> This email and any attachments to it may be confidential and are
>>>> intended solely for the use of the individual to whom it is
>>>> addressed. Any views or opinions expressed are solely those of the
>>>> author and do not necessarily represent those of Shape Blue Ltd or
>>>> related companies. If you are not the intended recipient of this
>>>> email, you must neither take any action based upon its contents, nor
>>>> copy or show it to anyone. Please contact the sender if you believe
>>>> you have received this email in error. Shape Blue Ltd is a company
>>>> incorporated in England & Wales. ShapeBlue Services India LLP is a
>>>> company incorporated in India and is operated under license from
>>>> Shape Blue Ltd. Shape Blue Brasil Consultoria Ltda is a company
>>>> incorporated in Brasil and is operated under license from Shape Blue Ltd. 
>>>> ShapeBlue is a registered trademark.
>>>>
>>
>>
>>
>> --
>> Rafael Weingärtner
>> This email and any attachments to it may be confidential and are intended 
>> solely for the use of the individual to whom it is addressed. Any views or 
>> opinions expressed are solely those of the author and do not necessarily 
>> represent those of Shape Blue Ltd or related companies. If you are not the 
>> intended recipient of this email, you must neither take any action based 
>> upon its contents, nor copy or show it to anyone. Please contact the sender 
>> if you believe you have received this email in error. Shape Blue Ltd is a 
>> company incorporated in England & Wales. ShapeBlue Services India LLP is a 
>> company incorporated in India and is operated under license from Shape Blue 
>> Ltd. Shape Blue Brasil Consultoria Ltda is a company incorporated in Brasil 
>> and is operated under license from Shape Blue Ltd. ShapeBlue is a registered 
>> trademark.
>
>
>
> --
> Rafael Weingärtner
> This email and any attachments to it may be confidential and are intended 
> solely for the use of the individual to whom it is addressed. Any views or 
> opinions expressed are solely those of the author and do not necessarily 
> represent those of Shape Blue Ltd or related companies. If you are not the 
> intended recipient of this email, you must neither take any action based upon 
> its contents, nor copy or show it to anyone. Please contact the sender if you 
> believe you have received this email in error. Shape Blue Ltd is a company 
> incorporated in England & Wales. ShapeBlue Services India LLP is a company 
> incorporated in India and is operated under license from Shape Blue Ltd. 
> Shape Blue Brasil Consultoria Ltda is a company incorporated in Brasil and is 
> operated under license from Shape Blue Ltd. ShapeBlue is a registered 
> trademark.



-- 
Rafael Weingärtner

Reply via email to