[CentOS-virt] How to clone a guest for cold stand by

Wed Apr 16 13:57:53 UTC 2008
Ross S. W. Walker <rwalker at medallion.com>

Manuel Wolfshant wrote:
> 
> Götz Reinicke wrote:
> > Hi,
> >
> > what would be the shortest and fastest way to clone a e.g. basic 
> > Centos 5 guest for further use? For example I'd like to set up a 
> > master Mysql-server as a guest an than "clone" two additional slaves.
> 
> I have a lvm "template", i.e. a simple volume with the OS 
> skeleton ( a 
> minimal install). When I need a new VM I do
> - lvcreate newvolume
> - mkfs newvolume
> - mount template /mnt/source
> - mount newvolume /mnt/destination
> - cp -a /mnt/source /mnt/destination
> 
> wash, rinse, repeat as needed.
> 
> > Which xen configfiles may be edited?
> 
> cp /etc/xen/template /etc/xen/newVM
> vim /etc/xen/newVM
> 
> 
> > Can the config and the filesystem simply be copied?
> 
> yes.

There is another approach too. You can set up your guests
as virtual diskless servers which can net boot their
configuration from dom0. Maybe iSCSI or blktap their
root drives and overlay a configuration over / or /etc
from NFS on dom0, or their whole configuration.

You can definitely mash-up some good ideas with LTSP
and Xen.

I wish Xen had a virtual 10Gbe interface, then you can
really do some nifty stuff!

I personnally setup KDM or GDM in each domU to do XDMCP
broadcast then I can pick which virtual guest to log into
once it is up and running and with KDM/GDM user switching
I open another session, pick a guest and get a full
graphical login.

-Ross

______________________________________________________________________
This e-mail, and any attachments thereto, is intended only for use by
the addressee(s) named herein and may contain legally privileged
and/or confidential information. If you are not the intended recipient
of this e-mail, you are hereby notified that any dissemination,
distribution or copying of this e-mail, and any attachments thereto,
is strictly prohibited. If you have received this e-mail in error,
please immediately notify the sender and permanently delete the
original and any copy or printout thereof.