Warning: Declaration of action_plugin_editx::register(&$contr) should be compatible with DokuWiki_Action_Plugin::register(Doku_Event_Handler $controller) in /usr/local/www/dokuwiki/lib/plugins/editx/action.php on line 0 Warning: Declaration of action_plugin_codebutton::register(&$controller) should be compatible with DokuWiki_Action_Plugin::register(Doku_Event_Handler $controller) in /usr/local/www/dokuwiki/lib/plugins/codebutton/action.php on line 0 Warning: Cannot modify header information - headers already sent by (output started at /usr/local/www/dokuwiki/lib/plugins/editx/action.php:0) in /usr/local/www/dokuwiki/inc/auth.php on line 424 Warning: Cannot modify header information - headers already sent by (output started at /usr/local/www/dokuwiki/lib/plugins/editx/action.php:0) in /usr/local/www/dokuwiki/inc/actions.php on line 210 Warning: Cannot modify header information - headers already sent by (output started at /usr/local/www/dokuwiki/lib/plugins/editx/action.php:0) in /usr/local/www/dokuwiki/lib/tpl/dokuwiki/main.php on line 12 kvm:xen_to_kvm [Idefix's Wiki]

Benutzer-Werkzeuge

Webseiten-Werkzeuge


kvm:xen_to_kvm

Migrate XEN to KVM

Before you start to migrate xen to KVM, make sure that:

  • Block device will change from xvd? to vd?
    • Change grub config and replace „root=/dev/xvda1 disk=/dev/xvda“ by „root=/dev/vda1 disk=/dev/vda“
    • Check fstab
  • serial device will change xvc0 to ttyS0
    • Change grub config and remove console=xvc
    • Edit /etc/inittab and comment line containing xvc0 and insert a line with tty1 instead
    • Edit /etc/securetty and replace xvc0 with ttyS0
  • You system is fully bootable with a boot manager (like grub)
  • You have a full kernel installed

Change modules from:

xenblk xennet

to

virtio_blk virtio_pci virtio_net virtio_ballon

Copy KVM Image and Convert to KVM

Get a list of all XEN VMs:

xe vm-list

Copy one VM via ssh to another host:

xe vm-export uuid=<uuid> filename= | ssh -c blowfish -C <user>@<host> 'dd of=/path/vmname.xva'

Use the following script: http://www.robotics.net/wp-content/uploads/xenmigrate.py

Extract the the file with:

tar xvf vmname.xva

You should have a directory like:

---------- 1 root root   30251 Jan  1  1970 ova.xml
drwxr-xr-x 2 root root 1527808 Feb 24 11:10 Ref:5

Convert it with:

python xenmigrate.py --debug -–convert=Ref\:5 {image}.img

Now you can import the image with:

virt-install --name={image] --cpuset=auto --ram=2048 --network bridge=br123 --disk=/dev/vg/example --vnc --vnclisten=0.0.0.0 --noautoconsole --cdrom=/win2k8.iso
kvm/xen_to_kvm.txt · Zuletzt geändert: 2014/08/14 10:25 von idefix