Hi everybody, I found that we can use virt-clone to clone a VM but only when that VM is not running. This is not useful most of the time. Can we clone a VM even when it is running? It''s critical to my research, any idea is much appreciated!!!! all the best, Freddie __________________________________________________________________ Be smarter than spam. See how smart SpamGuard is at giving junk email the boot with the All-new Yahoo! Mail. Click on Options in Mail and switch to New Mail today or register for free at http://mail.yahoo.ca _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Cloning a VM while it is running isn''t really a great idea. In order to maintain filesystem consistency, at the time of the clone all filesystem activity must be frozen and data needs to be flushed from the caches and buffers out to disk devices. If order to do this while the VM is running, you have to interact with the O/S of the VM to freeze filesystem transactions (XFS is the only filesystem I''ve used that supports this), flush out the buffers and caches ("sync"), then clone the disk image, then unfreeze the filesystem. A much easier option is to pause the domU temporarily ("xm pause <domU>"), clone it, then unpause. Why is being able to clone while a domU is running so critical to you?>>> On 3/20/2009 at 9:26 AM, freddie weng <freddieweng@yahoo.ca> wrote:Hi everybody, I found that we can use virt-clone to clone a VM but only when that VM is not running. This is not useful most of the time. Can we clone a VM even when it is running? It''s critical to my research, any idea is much appreciated!!!! all the best, Freddie Ask a question on any topic and get answers from real people. Go to Yahoo! Answers. ( http://ca.answers.yahoo.com ) This e-mail may contain confidential and privileged material for the sole use of the intended recipient. If this email is not intended for you, or you are not responsible for the delivery of this message to the intended recipient, please note that this message may contain SEAKR Engineering (SEAKR) Privileged/Proprietary Information. In such a case, you are strictly prohibited from downloading, photocopying, distributing or otherwise using this message, its contents or attachments in any way. If you have received this message in error, please notify us immediately by replying to this e-mail and delete the message from your mailbox. Information contained in this message that does not relate to the business of SEAKR is neither endorsed by nor attributable to SEAKR. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Hi Nick, I''ve experimented using LVMs and creating a snapshot volume of the root partition where my vms live (/var/lib/xen/images). You can then do whatever want with what''s on the snapshot volume. So for example. your virtual machine image is in a state in time when the snapshot was taken. Keep in mind that when you create a snapshot of VMware instances, it pauses the VM before doing its thing. When running popular cloning sw like Norton Ghost, etc... the machines state is also fixed in time so I think you won''t really be able to get around the state-in-time/cloning thing. - Brian On Mar 20, 2009, at 8:35 AM, Nick Couchman wrote:> Cloning a VM while it is running isn''t really a great idea. In > order to maintain filesystem consistency, at the time of the clone > all filesystem activity must be frozen and data needs to be flushed > from the caches and buffers out to disk devices. If order to do > this while the VM is running, you have to interact with the O/S of > the VM to freeze filesystem transactions (XFS is the only filesystem > I''ve used that supports this), flush out the buffers and caches > ("sync"), then clone the disk image, then unfreeze the filesystem. > A much easier option is to pause the domU temporarily ("xm pause > <domU>"), clone it, then unpause. > > Why is being able to clone while a domU is running so critical to you? > > >>> On 3/20/2009 at 9:26 AM, freddie weng <freddieweng@yahoo.ca> > wrote: > Hi everybody, > > I found that we can use virt-clone to clone a VM but only when that > VM is not running. > This is not useful most of the time. > Can we clone a VM even when it is running? > > It''s critical to my research, any idea is much appreciated!!!! > > > all the best, > Freddie > > > Ask a question on any topic and get answers from real people. Go to > Yahoo! Answers. > > > This e-mail may contain confidential and privileged material for the > sole use of the intended recipient. If this email is not intended > for you, or you are not responsible for the delivery of this message > to the intended recipient, please note that this message may contain > SEAKR Engineering (SEAKR) Privileged/Proprietary Information. In > such a case, you are strictly prohibited from downloading, > photocopying, distributing or otherwise using this message, its > contents or attachments in any way. If you have received this > message in error, please notify us immediately by replying to this e- > mail and delete the message from your mailbox. Information contained > in this message that does not relate to the business of SEAKR is > neither endorsed by nor attributable to SEAKR. > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Ooops, the mail was meant for Freddie, sorry Nick. - Brian On Mar 20, 2009, at 9:40 AM, Brian Krusic wrote:> Hi Nick, > > I''ve experimented using LVMs and creating a snapshot volume of the > root partition where my vms live (/var/lib/xen/images). > > You can then do whatever want with what''s on the snapshot volume. > So for example. your virtual machine image is in a state in time > when the snapshot was taken. > > Keep in mind that when you create a snapshot of VMware instances, it > pauses the VM before doing its thing. > > When running popular cloning sw like Norton Ghost, etc... the > machines state is also fixed in time so I think you won''t really be > able to get around the state-in-time/cloning thing. > > - Brian > > > > > On Mar 20, 2009, at 8:35 AM, Nick Couchman wrote: > >> Cloning a VM while it is running isn''t really a great idea. In >> order to maintain filesystem consistency, at the time of the clone >> all filesystem activity must be frozen and data needs to be flushed >> from the caches and buffers out to disk devices. If order to do >> this while the VM is running, you have to interact with the O/S of >> the VM to freeze filesystem transactions (XFS is the only >> filesystem I''ve used that supports this), flush out the buffers and >> caches ("sync"), then clone the disk image, then unfreeze the >> filesystem. A much easier option is to pause the domU temporarily >> ("xm pause <domU>"), clone it, then unpause. >> >> Why is being able to clone while a domU is running so critical to >> you? >> >> >>> On 3/20/2009 at 9:26 AM, freddie weng <freddieweng@yahoo.ca> >> wrote: >> Hi everybody, >> >> I found that we can use virt-clone to clone a VM but only when that >> VM is not running. >> This is not useful most of the time. >> Can we clone a VM even when it is running? >> >> It''s critical to my research, any idea is much appreciated!!!! >> >> >> all the best, >> Freddie >> >> >> Ask a question on any topic and get answers from real people. Go to >> Yahoo! Answers. >> >> >> This e-mail may contain confidential and privileged material for >> the sole use of the intended recipient. If this email is not >> intended for you, or you are not responsible for the delivery of >> this message to the intended recipient, please note that this >> message may contain SEAKR Engineering (SEAKR) Privileged/ >> Proprietary Information. In such a case, you are strictly >> prohibited from downloading, photocopying, distributing or >> otherwise using this message, its contents or attachments in any >> way. If you have received this message in error, please notify us >> immediately by replying to this e-mail and delete the message from >> your mailbox. Information contained in this message that does not >> relate to the business of SEAKR is neither endorsed by nor >> attributable to SEAKR. >> >> _______________________________________________ >> Xen-users mailing list >> Xen-users@lists.xensource.com >> http://lists.xensource.com/xen-users > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
FWIW, I have taken an LVM snapshot of a running Windows VM, done a dd out to a file on an NFS mount point of the snapshot, and restored the resulting file inside an empty, but identically sized VM on another Xenserver host without any issues. The Windows box basically reacts like you just cut power. A checkdisk is the worst which has happened, and I always have something I can use in the output file. I wish there were a way to generate an XVA file from this output so that I could just import the snapshotted backup as a normal Xen image. Robert A. Wicks ITC Engineer desk: (404) 888-2428 mobile: (404) 606-4622 rwicks@rollins.com<mailto:rwicks@rollins.com> From: xen-users-bounces@lists.xensource.com [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of Brian Krusic Sent: Friday, March 20, 2009 12:40 PM To: Nick Couchman Cc: freddie weng; Xen-Users Subject: Re: [Xen-Users] How to clone a VM when it is running? Hi Nick, I''ve experimented using LVMs and creating a snapshot volume of the root partition where my vms live (/var/lib/xen/images). You can then do whatever want with what''s on the snapshot volume. So for example. your virtual machine image is in a state in time when the snapshot was taken. Keep in mind that when you create a snapshot of VMware instances, it pauses the VM before doing its thing. When running popular cloning sw like Norton Ghost, etc... the machines state is also fixed in time so I think you won''t really be able to get around the state-in-time/cloning thing. - Brian On Mar 20, 2009, at 8:35 AM, Nick Couchman wrote: Cloning a VM while it is running isn''t really a great idea. In order to maintain filesystem consistency, at the time of the clone all filesystem activity must be frozen and data needs to be flushed from the caches and buffers out to disk devices. If order to do this while the VM is running, you have to interact with the O/S of the VM to freeze filesystem transactions (XFS is the only filesystem I''ve used that supports this), flush out the buffers and caches ("sync"), then clone the disk image, then unfreeze the filesystem. A much easier option is to pause the domU temporarily ("xm pause <domU>"), clone it, then unpause. Why is being able to clone while a domU is running so critical to you?>>> On 3/20/2009 at 9:26 AM, freddie weng <freddieweng@yahoo.ca<mailto:freddieweng@yahoo.ca>> wrote:Hi everybody, I found that we can use virt-clone to clone a VM but only when that VM is not running. This is not useful most of the time. Can we clone a VM even when it is running? It''s critical to my research, any idea is much appreciated!!!! all the best, Freddie ________________________________ Ask a question on any topic and get answers from real people. Go to Yahoo! Answers.<http://ca.answers.yahoo.com> ________________________________ This e-mail may contain confidential and privileged material for the sole use of the intended recipient. If this email is not intended for you, or you are not responsible for the delivery of this message to the intended recipient, please note that this message may contain SEAKR Engineering (SEAKR) Privileged/Proprietary Information. In such a case, you are strictly prohibited from downloading, photocopying, distributing or otherwise using this message, its contents or attachments in any way. If you have received this message in error, please notify us immediately by replying to this e-mail and delete the message from your mailbox. Information contained in this message that does not relate to the business of SEAKR is neither endorsed by nor attributable to SEAKR. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com<mailto:Xen-users@lists.xensource.com> http://lists.xensource.com/xen-users _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Thanks for all your information! They are all very helpful to my research~~ --- On Fri, 3/20/09, Robert Wicks <rwicks@rollins.com> wrote: From: Robert Wicks <rwicks@rollins.com> Subject: RE: [Xen-Users] How to clone a VM when it is running? To: Cc: "Xen-Users" <xen-users@lists.xensource.com> Received: Friday, March 20, 2009, 1:35 PM FWIW, I have taken an LVM snapshot of a running Windows VM, done a dd out to a file on an NFS mount point of the snapshot, and restored the resulting file inside an empty, but identically sized VM on another Xenserver host without any issues. The Windows box basically reacts like you just cut power. A checkdisk is the worst which has happened, and I always have something I can use in the output file. I wish there were a way to generate an XVA file from this output so that I could just import the snapshotted backup as a normal Xen image. Robert A. Wicks ITC Engineer desk: (404) 888-2428 mobile: (404) 606-4622 rwicks@rollins.com From: xen-users-bounces@lists.xensource.com [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of Brian Krusic Sent: Friday, March 20, 2009 12:40 PM To: Nick Couchman Cc: freddie weng; Xen-Users Subject: Re: [Xen-Users] How to clone a VM when it is running? Hi Nick, I''ve experimented using LVMs and creating a snapshot volume of the root partition where my vms live (/var/lib/xen/images). You can then do whatever want with what''s on the snapshot volume. So for example. your virtual machine image is in a state in time when the snapshot was taken. Keep in mind that when you create a snapshot of VMware instances, it pauses the VM before doing its thing. When running popular cloning sw like Norton Ghost, etc... the machines state is also fixed in time so I think you won''t really be able to get around the state-in-time/cloning thing. - Brian On Mar 20, 2009, at 8:35 AM, Nick Couchman wrote: Cloning a VM while it is running isn''t really a great idea. In order to maintain filesystem consistency, at the time of the clone all filesystem activity must be frozen and data needs to be flushed from the caches and buffers out to disk devices. If order to do this while the VM is running, you have to interact with the O/S of the VM to freeze filesystem transactions (XFS is the only filesystem I''ve used that supports this), flush out the buffers and caches ("sync"), then clone the disk image, then unfreeze the filesystem. A much easier option is to pause the domU temporarily ("xm pause <domU>"), clone it, then unpause.. Why is being able to clone while a domU is running so critical to you?>>> On 3/20/2009 at 9:26 AM, freddie weng <freddieweng@yahoo.ca> wrote:Hi everybody, I found that we can use virt-clone to clone a VM but only when that VM is not running. This is not useful most of the time. Can we clone a VM even when it is running? It''s critical to my research, any idea is much appreciated!!!! all the best, Freddie Ask a question on any topic and get answers from real people. Go to Yahoo! Answers. This e-mail may contain confidential and privileged material for the sole use of the intended recipient. If this email is not intended for you, or you are not responsible for the delivery of this message to the intended recipient, please note that this message may contain SEAKR Engineering (SEAKR) Privileged/Proprietary Information. In such a case, you are strictly prohibited from downloading, photocopying, distributing or otherwise using this message, its contents or attachments in any way. If you have received this message in error, please notify us immediately by replying to this e-mail and delete the message from your mailbox. Information contained in this message that does not relate to the business of SEAKR is neither endorsed by nor attributable to SEAKR. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users -----Inline Attachment Follows----- _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users __________________________________________________________________ Ask a question on any topic and get answers from real people. Go to Yahoo! Answers and share what you know at http://ca.answers.yahoo.com _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Hi Robert, Why do a dd when you can just cp or even cp --sparse=always? Why restore to en empty VM when you can just use the copied image on a different box? Just tryin to see of I can adopt some techniques. - Brian On Mar 20, 2009, at 10:35 AM, Robert Wicks wrote:> FWIW, I have taken an LVM snapshot of a running Windows VM, done a > dd out to a file on an NFS mount point of the snapshot, and restored > the resulting file inside an empty, but identically sized VM on > another Xenserver host without any issues. The Windows box basically > reacts like you just cut power. A checkdisk is the worst which has > happened, and I always have something I can use in the output file. > I wish there were a way to generate an XVA file from this output so > that I could just import the snapshotted backup as a normal Xen image. > > Robert A. Wicks > ITC Engineer > desk: (404) 888-2428 > mobile: (404) 606-4622 > rwicks@rollins.com > > From: xen-users-bounces@lists.xensource.com [mailto:xen-users-bounces@lists.xensource.com > ] On Behalf Of Brian Krusic > Sent: Friday, March 20, 2009 12:40 PM > To: Nick Couchman > Cc: freddie weng; Xen-Users > Subject: Re: [Xen-Users] How to clone a VM when it is running? > > Hi Nick, > > I''ve experimented using LVMs and creating a snapshot volume of the > root partition where my vms live (/var/lib/xen/images). > > You can then do whatever want with what''s on the snapshot volume. > So for example. your virtual machine image is in a state in time > when the snapshot was taken. > > Keep in mind that when you create a snapshot of VMware instances, it > pauses the VM before doing its thing. > > When running popular cloning sw like Norton Ghost, etc... the > machines state is also fixed in time so I think you won''t really be > able to get around the state-in-time/cloning thing. > > - Brian > > > > > On Mar 20, 2009, at 8:35 AM, Nick Couchman wrote: > > > Cloning a VM while it is running isn''t really a great idea. In > order to maintain filesystem consistency, at the time of the clone > all filesystem activity must be frozen and data needs to be flushed > from the caches and buffers out to disk devices. If order to do > this while the VM is running, you have to interact with the O/S of > the VM to freeze filesystem transactions (XFS is the only filesystem > I''ve used that supports this), flush out the buffers and caches > ("sync"), then clone the disk image, then unfreeze the filesystem. > A much easier option is to pause the domU temporarily ("xm pause > <domU>"), clone it, then unpause. > > Why is being able to clone while a domU is running so critical to you? > > >>> On 3/20/2009 at 9:26 AM, freddie weng <freddieweng@yahoo.ca> > wrote: > Hi everybody, > > I found that we can use virt-clone to clone a VM but only when that > VM is not running. > This is not useful most of the time. > Can we clone a VM even when it is running? > > It''s critical to my research, any idea is much appreciated!!!! > > > all the best, > Freddie > > Ask a question on any topic and get answers from real people. Go to > Yahoo! Answers. > > This e-mail may contain confidential and privileged material for the > sole use of the intended recipient. If this email is not intended > for you, or you are not responsible for the delivery of this message > to the intended recipient, please note that this message may contain > SEAKR Engineering (SEAKR) Privileged/Proprietary Information. In > such a case, you are strictly prohibited from downloading, > photocopying, distributing or otherwise using this message, its > contents or attachments in any way. If you have received this > message in error, please notify us immediately by replying to this e- > mail and delete the message from your mailbox. Information contained > in this message that does not relate to the business of SEAKR is > neither endorsed by nor attributable to SEAKR. > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
I use Citrix Xenserver, and the VMs hard drives are LVM logical volumes, not images sitting on a filesystem. I was not aware copy could do sparse files, though, so thanks for the tip! -- Robert A. Wicks Systems Engineer desk: (404) 888-2428 mobile: (404) 606-4622 rwicks@rollins.com ________________________________________ From: Brian Krusic [brian@krusic.com] Sent: Friday, March 20, 2009 5:22 PM To: Robert Wicks Cc: Xen-Users Subject: Re: [Xen-Users] How to clone a VM when it is running? Hi Robert, Why do a dd when you can just cp or even cp --sparse=always? Why restore to en empty VM when you can just use the copied image on a different box? Just tryin to see of I can adopt some techniques. - Brian On Mar 20, 2009, at 10:35 AM, Robert Wicks wrote: FWIW, I have taken an LVM snapshot of a running Windows VM, done a dd out to a file on an NFS mount point of the snapshot, and restored the resulting file inside an empty, but identically sized VM on another Xenserver host without any issues. The Windows box basically reacts like you just cut power. A checkdisk is the worst which has happened, and I always have something I can use in the output file. I wish there were a way to generate an XVA file from this output so that I could just import the snapshotted backup as a normal Xen image. Robert A. Wicks ITC Engineer desk: (404) 888-2428 mobile: (404) 606-4622 rwicks@rollins.com<mailto:rwicks@rollins.com> From: xen-users-bounces@lists.xensource.com<mailto:xen-users-bounces@lists.xensource.com> [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of Brian Krusic Sent: Friday, March 20, 2009 12:40 PM To: Nick Couchman Cc: freddie weng; Xen-Users Subject: Re: [Xen-Users] How to clone a VM when it is running? Hi Nick, I''ve experimented using LVMs and creating a snapshot volume of the root partition where my vms live (/var/lib/xen/images). You can then do whatever want with what''s on the snapshot volume. So for example. your virtual machine image is in a state in time when the snapshot was taken. Keep in mind that when you create a snapshot of VMware instances, it pauses the VM before doing its thing. When running popular cloning sw like Norton Ghost, etc... the machines state is also fixed in time so I think you won''t really be able to get around the state-in-time/cloning thing. - Brian On Mar 20, 2009, at 8:35 AM, Nick Couchman wrote: Cloning a VM while it is running isn''t really a great idea. In order to maintain filesystem consistency, at the time of the clone all filesystem activity must be frozen and data needs to be flushed from the caches and buffers out to disk devices. If order to do this while the VM is running, you have to interact with the O/S of the VM to freeze filesystem transactions (XFS is the only filesystem I''ve used that supports this), flush out the buffers and caches ("sync"), then clone the disk image, then unfreeze the filesystem. A much easier option is to pause the domU temporarily ("xm pause <domU>"), clone it, then unpause. Why is being able to clone while a domU is running so critical to you?>>> On 3/20/2009 at 9:26 AM, freddie weng <freddieweng@yahoo.ca<mailto:freddieweng@yahoo.ca>> wrote:Hi everybody, I found that we can use virt-clone to clone a VM but only when that VM is not running. This is not useful most of the time. Can we clone a VM even when it is running? It''s critical to my research, any idea is much appreciated!!!! all the best, Freddie ________________________________ Ask a question on any topic and get answers from real people. Go to Yahoo! Answers.<http://ca.answers.yahoo.com> ________________________________ This e-mail may contain confidential and privileged material for the sole use of the intended recipient. If this email is not intended for you, or you are not responsible for the delivery of this message to the intended recipient, please note that this message may contain SEAKR Engineering (SEAKR) Privileged/Proprietary Information. In such a case, you are strictly prohibited from downloading, photocopying, distributing or otherwise using this message, its contents or attachments in any way. If you have received this message in error, please notify us immediately by replying to this e-mail and delete the message from your mailbox. Information contained in this message that does not relate to the business of SEAKR is neither endorsed by nor attributable to SEAKR. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com<mailto:Xen-users@lists.xensource.com> http://lists.xensource.com/xen-users _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com<mailto:Xen-users@lists.xensource.com> http://lists.xensource.com/xen-users _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users