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

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

Götz Reinicke wrote:
> Ross S. W. Walker schrieb:
> > 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.
> 
> That sounds realy cool; do you have any wiki or how to set this things 
> up. (I know that there are a lot of how tos, but they seem to handle 
> mostly special aspects ... )

I don't have time to write a wiki now, but the LTSP and K12
projects have extensive wikis on PXE boot/install, NFS root
overlays and such, so that is where I would look first.

I bet you could even take one of the CentOS 5 based LTSP
respins install it, install xen via yum and you would
have a good base to add in other features like iSCSI.

Just treat your domUs as remote workstations, but with
very fast and reliable 1Gbe connectivity. You can even
create a separate xenbr for this to travel over along
with a dom0 loop adapter and the traffic would run
secure and segregated from the regular network traffic.

I wonder if anybody has tested the performance of iSCSI
to a domU for storage versus the blktap driver?

I wonder if you could setup bonded interfaces with the
loopback driver and the xen virtual interfaces... Hmmm,
might be able to see 200+MB/s io on domUs by bonding
2 or 4 together and using iSCSI...


-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.