I’ve recently been playing with Xen on Centos 5. In the following notes, PM is Physical Machine (domain 0) and VM is a Virtual Machine (domain U)
xen list xen migrate --live vm1 pm2 xen mem-set pm1 1024
I have 2 separate config files, one to install the VM and one to run it day to day. The install config file uses a small amount of RAM and number of VCPUs, as this is all that is needed. I also hardcode the mac addresses as all our machines get static IPs from DHCP. Everything lives on NFS, so we can migrate machines. The kernel and ramdisk are the Xen supplied ones (taken from http://wiki.centos.org/HowTos/Xen/InstallingCentOSDomU).
yoshi-1-inst
kernel = "/net/nfs7/vol8/xen/vmlinuz.gz" ramdisk = "/net/nfs7/vol8/xen/initrd.img.gz" extra = "text ks=nfs:nfs7:/vol/vol21/abacus-server/kickstart/cfg/00:16:3e:1b:82:bd" name = "yoshi-1" memory = "512" disk = ['file:/net/nfs7/vol8/xen/yoshi-1.img,xvda,w'] vif = ['bridge=xenbr0,mac=00:16:3e:1b:82:bd'] vcpus=1 on_reboot = 'destroy' on_crash = 'destroy'
yoshi-1-run
name = "yoshi-1" memory = "8192" disk = ['file:/net/nfs7/vol8/xen/yoshi-1.img,xvda,w'] vif = ['bridge=xenbr0,mac=00:16:3e:1b:82:bd'] vcpus=1 on_reboot = 'restart' on_crash = 'restart' bootloader='/usr/bin/pygrub'
yum groupinstall virtualization xm create /path/to/your/yoshi-1-instxm console yoshi-1xm create /path/to/your/yoshi-1-runxm console yoshi-1