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

Manuel Wolfshant

wolfy at nobugconsulting.ro
Wed Apr 16 12:54:51 UTC 2008


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.




More information about the CentOS-virt mailing list