Dobrica Pavlinušić's random unstructured stuff
KVM: Revision 3


http://kvm.qumranet.com/kvmwiki/FAQ

Install

sudo apt-get install kvm

Migration

http://kvm.qumranet.com/kvmwiki/Migration

Prepare shared disk image

Usually, you will use nfs for this. Edit /etc/exports and add something like (if your local network is 192.168.1.x):

/rest           192.168.1.0/255.255.255.0(rw)

And start nfs server

dpavlin@llin:~$ sudo /etc/init.d/nfs-user-server start

New target

Mount shared storage and run qemu which will receive running machine

dpavlin@squeak:~$ mkdir mnt/rest
dpavlin@squeak:~$ sudo mount 192.168.1.13:/rest mnt/rest/
dpavlin@squeak:~$ ls -al mnt/rest/iso/gparted-live-0.3.9-4.iso 
-rw-r--r-- 1 dpavlin dpavlin 98347008 Oct  9 17:31 mnt/rest/iso/gparted-live-0.3.9-4.iso

dpavlin@squeak:~$ kvm -cdrom mnt/rest/iso/gparted-live-0.3.9-4.iso -incoming tcp://0:4444 -monitor stdio

Running source

dpavlin@llin:~$ kvm -m 128 -cdrom /rest/iso/gparted-live-0.3.9-4.iso -monitor stdio -no-kvm
QEMU 0.9.1 monitor - type 'help' for more information
(qemu) migrate tcp://192.168.1.30:4444

We use -no-kvm to disable kvm because our target machine doesn't have vmx|svm support!