From Dustin.Schoenbrun at netapp.com Thu Apr 26 15:24:38 2012 Content-Type: multipart/mixed; boundary="===============8886090590022400735==" MIME-Version: 1.0 From: Schoenbrun, Dustin To: devel at ovirt.org Subject: [Engine-devel] Disk Cloning When Creating a VM via a Template Date: Thu, 26 Apr 2012 19:24:17 +0000 Message-ID: <0A1534657992624AACDCA570F1D3E20003C29F05@SACEXCMBX03-PRD.hq.netapp.com> --===============8886090590022400735== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable --_000_0A1534657992624AACDCA570F1D3E20003C29F05SACEXCMBX03PRDh_ Content-Type: text/plain; charset=3D"us-ascii" Content-Transfer-Encoding: quoted-printable Greetings, I know that floating disks are coming in the next version of oVirt, but in = =3D the interim I want to know internally what the procedure is when a disk is = =3D cloned when creating a VM from a template. I see the AddVmImages() method = =3D in the AddVmFromTemplateCommand.java file, but could someone walk me throug= =3D h exactly what is going on when the disk gets cloned? Thanks! -- Dustin --_000_0A1534657992624AACDCA570F1D3E20003C29F05SACEXCMBX03PRDh_ Content-Type: text/html; charset=3D"us-ascii" Content-Transfer-Encoding: quoted-printable

Greetings,

 

I know that floating disks are coming in the next = ve=3D rsion of oVirt, but in the interim I want to know internally what the proce= =3D dure is when a disk is cloned when creating a VM from a template.  I s= =3D ee the AddVmImages() method in the AddVmFromTemplateCommand.java file, but could someone walk me through exactly what is going on when the = =3D disk gets cloned?  Thanks!

 

-- Dustin

 

--_000_0A1534657992624AACDCA570F1D3E20003C29F05SACEXCMBX03PRDh_-- --===============8886090590022400735== Content-Type: multipart/alternative MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="attachment.bin" LS1fMDAwXzBBMTUzNDY1Nzk5MjYyNEFBQ0RDQTU3MEYxRDNFMjAwMDNDMjlGMDVTQUNFWENNQlgw M1BSRGhfCkNvbnRlbnQtVHlwZTogdGV4dC9wbGFpbjsgY2hhcnNldD0idXMtYXNjaWkiCkNvbnRl bnQtVH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hlbiBjcmVhdGluZyBh IFZNIGZyb20gYSB0ZW1wbGF0ZS4mbmJzcDsgSSBzPQplZSB0aGUgQWRkVm1JbWFnZXMoKSBtZXRo b2QgaW4gdGhlIEFkZFZtRnJvbVRlbXBsYXRlQ29tbWFuZC5qYXZhCiBmaWxlLCBidXQgY291bGQg c29tZW9uZSB3YWxrIG1lIHRocm91Z2ggZXhhY3RseSB3aGF0IGlzIGdvaW5nIG9uIHdoZW4gdGhl ID0KZGlzayBnZXRzIGNsb25lZD8mbmJzcDsgVGhhbmtzITxvOnA+PC9vOnA+PC9wPgo8cCBjbGFz cz0zRCJNc29Ob3JtYWwiPjxvOnA+Jm5ic3A7PC9vOnA+PC9wPgo8cCBjbGFzcz0zRCJNc29Ob3Jt YWwiPi0tIER1c3RpbjxvOnA+PC9vOnA+PC9wPgo8cCBjbGFzcz0zRCJNc29Ob3JtYWwiPjxvOnA+ Jm5ic3A7PC9vOnA+PC9wPgo8L2Rpdj4KPC9ib2R5Pgo8L2h0bWw+CgotLV8wMDBfMEExNTM0NjU3 OTkyNjI0QUFDRENBNTcwRjFEM0UyMDAwM0MyOUYwNVNBQ0VYQ01CWDAzUFJEaF8tLQo= --===============8886090590022400735==-- From lpeer at redhat.com Sun Apr 29 05:41:31 2012 Content-Type: multipart/mixed; boundary="===============3534679496694244946==" MIME-Version: 1.0 From: Livnat Peer To: devel at ovirt.org Subject: Re: [Engine-devel] Disk Cloning When Creating a VM via a Template Date: Sun, 29 Apr 2012 12:40:50 +0300 Message-ID: <4F9D0CA2.6070006@redhat.com> In-Reply-To: 0A1534657992624AACDCA570F1D3E20003C29F05@SACEXCMBX03-PRD.hq.netapp.com --===============3534679496694244946== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On 26/04/12 22:24, Schoenbrun, Dustin wrote: > I know that floating disks are coming in the next version of oVirt, but > in the interim I want to know internally what the procedure is when a > disk is cloned when creating a VM from a template. > = Hi, Today when creating a VM from template the user can choose the provisioning method: - It can be 'Thin' in which the engine is taking a snapshot of the template disks (running AddVMCommand which executes CreateSnapshotFromTemplateCommand) - Or 'Clone' which results in cloning the template disks (executes AddVmFromTemplateCommand which in turn executes CreateCloneOfTemplateCommand) Thanks, Livnat --===============3534679496694244946==-- From abaron at redhat.com Sun Apr 29 06:24:36 2012 Content-Type: multipart/mixed; boundary="===============1683224784003567229==" MIME-Version: 1.0 From: Ayal Baron To: devel at ovirt.org Subject: Re: [Engine-devel] Disk Cloning When Creating a VM via a Template Date: Sun, 29 Apr 2012 06:24:34 -0400 Message-ID: <4d827afc-97e6-48d6-9cf1-2c5a6e2e84d6@zmail13.collab.prod.int.phx2.redhat.com> In-Reply-To: 4F9D0CA2.6070006@redhat.com --===============1683224784003567229== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable ----- Original Message ----- > On 26/04/12 22:24, Schoenbrun, Dustin wrote: > > I know that floating disks are coming in the next version of oVirt, > > but > > in the interim I want to know internally what the procedure is when > > a > > disk is cloned when creating a VM from a template. I'm not sure what floating disks have to do with it (it would be relevant f= or cloning a single disk, not cloning an entire VM). For cloning a single disk I believe that floating disk is already available= in master by the way. > > = > = > Hi, > = > Today when creating a VM from template the user can choose the > provisioning method: > - It can be 'Thin' in which the engine is taking a snapshot of the > template disks (running AddVMCommand which executes > CreateSnapshotFromTemplateCommand) > - Or 'Clone' which results in cloning the template disks (executes > AddVmFromTemplateCommand which in turn executes > CreateCloneOfTemplateCommand) For createCloneOfTemplateCommand, other than the VM configuration being cop= ied, the engine creates copies of all of the template images (calls moveIma= ge in vdsm per Image). > = > = > Thanks, Livnat > _______________________________________________ > Engine-devel mailing list > Engine-devel(a)ovirt.org > http://lists.ovirt.org/mailman/listinfo/engine-devel >=20 --===============1683224784003567229==-- From Dustin.Schoenbrun at netapp.com Mon Apr 30 10:00:37 2012 Content-Type: multipart/mixed; boundary="===============3445589838674050238==" MIME-Version: 1.0 From: Schoenbrun, Dustin To: devel at ovirt.org Subject: Re: [Engine-devel] Disk Cloning When Creating a VM via a Template Date: Mon, 30 Apr 2012 14:00:11 +0000 Message-ID: <0A1534657992624AACDCA570F1D3E20003C2C846@SACEXCMBX03-PRD.hq.netapp.com> In-Reply-To: 4d827afc-97e6-48d6-9cf1-2c5a6e2e84d6@zmail13.collab.prod.int.phx2.redhat.com --===============3445589838674050238== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Okay, I'll have a look at master and play around with things a little bit. = Thanks for that insight, Ayal! So, when a VM is cloned from a template, a= ll disks associated with the template are cloned to go with the new VM, cor= rect? Could I do something similar with the floating disks and just clone = all of the associated disks from a VM? In the meantime, I'll read up a bit= more on Floating Disks on the feature pages on the wiki. Thanks again! -- Dustin -----Original Message----- From: Ayal Baron [mailto:abaron(a)redhat.com] = Sent: Sunday, April 29, 2012 6:25 AM To: Livnat Peer Cc: engine-devel(a)ovirt.org; Schoenbrun, Dustin Subject: Re: [Engine-devel] Disk Cloning When Creating a VM via a Template ----- Original Message ----- > On 26/04/12 22:24, Schoenbrun, Dustin wrote: > > I know that floating disks are coming in the next version of oVirt, = > > but in the interim I want to know internally what the procedure is = > > when a disk is cloned when creating a VM from a template. I'm not sure what floating disks have to do with it (it would be relevant f= or cloning a single disk, not cloning an entire VM). For cloning a single disk I believe that floating disk is already available= in master by the way. > > = > = > Hi, > = > Today when creating a VM from template the user can choose the = > provisioning method: > - It can be 'Thin' in which the engine is taking a snapshot of the = > template disks (running AddVMCommand which executes > CreateSnapshotFromTemplateCommand) > - Or 'Clone' which results in cloning the template disks (executes = > AddVmFromTemplateCommand which in turn executes > CreateCloneOfTemplateCommand) For createCloneOfTemplateCommand, other than the VM configuration being cop= ied, the engine creates copies of all of the template images (calls moveIma= ge in vdsm per Image). > = > = > Thanks, Livnat > _______________________________________________ > Engine-devel mailing list > Engine-devel(a)ovirt.org > http://lists.ovirt.org/mailman/listinfo/engine-devel >=20 --===============3445589838674050238==-- From abaron at redhat.com Tue May 1 19:32:32 2012 Content-Type: multipart/mixed; boundary="===============1189505925745446040==" MIME-Version: 1.0 From: Ayal Baron To: devel at ovirt.org Subject: Re: [Engine-devel] Disk Cloning When Creating a VM via a Template Date: Tue, 01 May 2012 19:32:31 -0400 Message-ID: <4f0e54a3-090e-417b-9f2b-1c5df74d477e@zmail13.collab.prod.int.phx2.redhat.com> In-Reply-To: 0A1534657992624AACDCA570F1D3E20003C2C846@SACEXCMBX03-PRD.hq.netapp.com --===============1189505925745446040== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable ----- Original Message ----- > Okay, I'll have a look at master and play around with things a little > bit. Thanks for that insight, Ayal! So, when a VM is cloned from a > template, all disks associated with the template are cloned to go > with the new VM, correct? Could I do something similar with the > floating disks and just clone all of the associated disks from a VM? I think there is some misunderstanding here. A floating disk is a disk which is not associated with any VM, so what are = all of the associated disks? The only place where different disks have any = relation to each other us within the context of a VM. Note that if you clone while engine thinks you're creating a qcow snapshot = then you'd need to handle merge (snapshot delete) differently as well > In the meantime, I'll read up a bit more on Floating Disks on the > feature pages on the wiki. Thanks again! > = > -- Dustin > = > -----Original Message----- > From: Ayal Baron [mailto:abaron(a)redhat.com] > Sent: Sunday, April 29, 2012 6:25 AM > To: Livnat Peer > Cc: engine-devel(a)ovirt.org; Schoenbrun, Dustin > Subject: Re: [Engine-devel] Disk Cloning When Creating a VM via a > Template > = > = > = > ----- Original Message ----- > > On 26/04/12 22:24, Schoenbrun, Dustin wrote: > > > I know that floating disks are coming in the next version of > > > oVirt, > > > but in the interim I want to know internally what the procedure > > > is > > > when a disk is cloned when creating a VM from a template. > = > I'm not sure what floating disks have to do with it (it would be > relevant for cloning a single disk, not cloning an entire VM). > For cloning a single disk I believe that floating disk is already > available in master by the way. > = > > > = > > = > > Hi, > > = > > Today when creating a VM from template the user can choose the > > provisioning method: > > - It can be 'Thin' in which the engine is taking a snapshot of the > > template disks (running AddVMCommand which executes > > CreateSnapshotFromTemplateCommand) > > - Or 'Clone' which results in cloning the template disks (executes > > AddVmFromTemplateCommand which in turn executes > > CreateCloneOfTemplateCommand) > = > For createCloneOfTemplateCommand, other than the VM configuration > being copied, the engine creates copies of all of the template > images (calls moveImage in vdsm per Image). > = > = > > = > > = > > Thanks, Livnat > > _______________________________________________ > > Engine-devel mailing list > > Engine-devel(a)ovirt.org > > http://lists.ovirt.org/mailman/listinfo/engine-devel > > = >=20 --===============1189505925745446040==--