For now, i'm using something like workaround for this problem, may be it will 
be useful for someone.
basic idea is - using some 12.04 host as transit one, which will take VMs from 
other 12.04 online, then will have libvirt & kvm upgraded , restart of VMs 
(usually 1-2 mins), then can be moved online to 14.04 host

on transit host, 12.04 install, latest updates, without any VMs yet:
into /etc/default/grub set 
GRUB_CMDLINE_LINUX_DEFAULT="rootdelay=90"
# update-grub

first, let's make reverting easy with snapshotting / partition (you may need to 
add /var if it is separated)
lvcreate -n rootfspv -L 50G shared
pvcreate /dev/shared/rootfspv
vgextend system /dev/shared/rootfspv
lvcreate -n rootfssnap -s -L 30G system/root

configure libvirt to accept migration
migrate VMs to such transit host
# for i in $(virsh list |grep runn|awk '{print $2}'|xargs echo);do virsh edit 
$i;done
here we should set cache to none, if u are using lvm as storage, to look like:
<driver name='qemu' type='raw' cache='none'/>

then, upgrading
set sources.list to trusty ,
#apt-get update
#apt-get install qemu-kvm libvirt-bin librbd1
(i answered no to all requests for configs update)

checking all is going fine:
qemu-system-x86_64 -machine help
output should be regular, like
root@hw06:~# qemu-system-x86_64 -machine help
Supported machines are:
pc-0.13              Standard PC (i440FX + PIIX, 1996)
pc-i440fx-2.0        Standard PC (i440FX + PIIX, 1996)
pc-1.0-qemu-kvm      Standard PC (i440FX + PIIX, 1996) (alias of pc-1.0)

restart libvirt:
#service libvirt-bin restart
checking is ok
#virsh list --all
#apt-get install apparmor-utils
#aa-disable /etc/apparmor.d/usr.sbin.libvirtd
#service libvirt-bin restart
checking is ok
#virsh list --all

the next step is restart VMs and later they can be migrated to 14.04
online

reverting back to 12.04:
removing VMs disks:
#lvremove /dev/shared/*
reverting snapshot:

#lvconvert --merge /dev/system/rootfssnap
#reboot

after boot check there are no snapshots left, if yes, you should reboot one 
more time (is needed sometimes)
next group can be moved now

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1477488

Title:
  live migration for KVM VM via libvirt from 12.04 to 14.04 fails ,
  unable to change machine type to pc-1.0-precise

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1477488/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to