|
Copying Xen virtual machines |
|
Operating system: Suse Linux Enterprise Server 10 (SLES10)
There are actually two files that need to be copied; The disk 'image' and the configuration file. The disk 'image' /etc/xen/images is a symbolic link to /var/lib/xen/images. In there is a folder for each virtual machine which holds the disk 'image'. If the virtual machine (VM) is called vm1 then * create a new folder. eg mkdir vm2 * copy the image to this new folder. eg cd vm1 and then cp hda ../vm2/hda The configuration file /etc/xen/vm contains configuration files for each VM. * copy the configuration file. eg cp vm1 vm2 * edit the new configuration file so that it has the new VM name * Do not edit the mac address as this will stop the VM picking up an ip address via dhcp.. Now test that your new VM works by * opening the YAST virtual machine manager * starting the new VM If you want to make your VM start automatically then create a symbolic link in /etc/xen/auto to your new configuration file. eg * cd /etc/xen/auto * ln -s /etc/xen/vm/vm2 vm2 |
|