Andrea Monti
2011-Aug-11 11:57 UTC
[Xen-users] newbie questions: copying and cloning xen vm
Hi all, I started studying xen to implement some HA cluster hosting multiple guests. I am realizing that xen does not provide any native way to hot-clone or hot-backup a guest. Am I right ? Is there any way to how backup a virtual machine? Or is suspend - copy - resume the only possible tecnique ? Is there any way to clone a virtual machine? Do vm snapshots exists? Thank you for every answer! Andrea _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Diego Dave
2011-Aug-11 13:55 UTC
Re: [Xen-users] newbie questions: copying and cloning xen vm
Hi Andrea, You can see the manpage of xen-create-image: http://man.cx/xen-create-image%288%29, I believe you are search a command like this... Regards, Diego 2011/8/11 Andrea Monti <ilsuonogiallo@gmail.com>> Hi all, > > I started studying xen to implement some HA cluster hosting multiple > guests. > I am realizing that xen does not provide any native way to hot-clone or > hot-backup a guest. > > Am I right ? > > Is there any way to how backup a virtual machine? Or is suspend - copy - > resume the only possible tecnique ? > Is there any way to clone a virtual machine? > Do vm snapshots exists? > > Thank you for every answer! > > Andrea > > > _______________________________________________ > 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
Andrea Monti
2011-Aug-12 08:04 UTC
Re: [Xen-users] newbie questions: copying and cloning xen vm
Hi Diedo, thank you for your input. Unfortunatly xen-create-image is part of xen tools, so it is only available on Debian. I am using Xen 3.4 on Oracle VM, so I don''t have xen-tools available : that''s why I am looking for "native" xen tools to copy / clone / backup my vms. Regards, Andrea 2011/8/11 Diego Dave <diego.dave.s@gmail.com>> Hi Andrea, > > You can see the manpage of xen-create-image: > http://man.cx/xen-create-image%288%29, I believe you are search a command > like this... > > Regards, > > Diego > > 2011/8/11 Andrea Monti <ilsuonogiallo@gmail.com> > >> Hi all, >> >> I started studying xen to implement some HA cluster hosting multiple >> guests. >> I am realizing that xen does not provide any native way to hot-clone or >> hot-backup a guest. >> >> Am I right ? >> >> Is there any way to how backup a virtual machine? Or is suspend - copy - >> resume the only possible tecnique ? >> Is there any way to clone a virtual machine? >> Do vm snapshots exists? >> >> Thank you for every answer! >> >> Andrea >> >> >> _______________________________________________ >> 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
Fajar A. Nugraha
2011-Aug-12 09:03 UTC
Re: [Xen-users] newbie questions: copying and cloning xen vm
On Fri, Aug 12, 2011 at 3:04 PM, Andrea Monti <ilsuonogiallo@gmail.com> wrote:> Hi Diedo, > > thank you for your input. > Unfortunatly xen-create-image is part of xen tools, so it is only available > on Debian. > I am using Xen 3.4 on Oracle VM, so I don''t have xen-tools available : > that''s why I am looking for "native" xen tools to copy / clone / backup my > vms."native" is somewhat tricky. The only common part in XenServer/XCP and xen (the hypervisor used by linux distros) is basically just the hypervisor. Even the userland tools can be different (xe vs xm/xl). The hypervisor by itself doesn''t really have anything to do with "hot-clone" or "hot-backup". That functionality is implemented in: - OS driver/additions (if any) id domU, that would ensure all data is flushed to disk before the snapshot - domU backing storage that is capable of doing snapshot/clone (e.g. LVM, VHD image) So the short version to your question, the closest thing to what you want is to probably do a LVM-snapshot on dom0, use the snapshot data to create a clone, then delete the snapshot afterwards. If your backing storage is capable of creating "good" clones (e.g. zfs, netapp) then you could use that directly. -- Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Andrea Monti
2011-Aug-22 08:05 UTC
Re: [Xen-users] newbie questions: copying and cloning xen vm
2011/8/12 Fajar A. Nugraha <list@fajar.net>> On Fri, Aug 12, 2011 at 3:04 PM, Andrea Monti <ilsuonogiallo@gmail.com> > wrote: > > Hi Diedo, > > > > thank you for your input. > > Unfortunatly xen-create-image is part of xen tools, so it is only > available > > on Debian. > > I am using Xen 3.4 on Oracle VM, so I don''t have xen-tools available : > > that''s why I am looking for "native" xen tools to copy / clone / backup > my > > vms. > > "native" is somewhat tricky. The only common part in XenServer/XCP and > xen (the hypervisor used by linux distros) is basically just the > hypervisor. Even the userland tools can be different (xe vs xm/xl). > > The hypervisor by itself doesn''t really have anything to do with > "hot-clone" or "hot-backup". That functionality is implemented in: > - OS driver/additions (if any) id domU, that would ensure all data is > flushed to disk before the snapshot > - domU backing storage that is capable of doing snapshot/clone (e.g. > LVM, VHD image) > > So the short version to your question, the closest thing to what you > want is to probably do a LVM-snapshot on dom0, use the snapshot data > to create a clone, then delete the snapshot afterwards. If your > backing storage is capable of creating "good" clones (e.g. zfs, > netapp) then you could use that directly. > > -- > Fajar > > >Hi Fajar, Thanks for your explanations! I managed to use logical volumes as guests partition, so I can use LVM-snapshot on dom0 to do hot-backups of my VMs and I use nested lvm on domU to manage disks and partitions. Andrea _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Simon Hobson
2011-Aug-22 08:31 UTC
Re: [Xen-users] newbie questions: copying and cloning xen vm
Andrea Monti wrote:>I managed to use logical volumes as guests partition, so I can use >LVM-snapshot on dom0 to do hot-backups of my VMs and I use nested >lvm on domU to manage disks and partitions.Just as long as you realise that your "backups" are in fact almost certainly corrupted to some extent or other. Wether that is an issue for you depends heavily on the type of operations your DomU does. If it''s "write-little" and has journalled filesystems then it''s probably not serious. If it''s "write-heavy", and especially if it runs applications that do their own caching (like DBs), then it could be more serious. Your snapshot has a state somewhat akin to what you''d have if you just yanked the power cord on a bare-metal server. -- Simon Hobson Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed author Gladys Hobson. Novels - poetry - short stories - ideal as Christmas stocking fillers. Some available as e-books. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users