[libvirt] [RFC] broken migration by VGA memory patch series

Pavel Hrdina phrdina at redhat.com
Mon Dec 8 13:08:18 UTC 2014


Hi all,

The recent patch series that finally start using vram attribute for QEMU
video devices and also introduced new vgamem attribute breaks migration
from older libvirts to the currently developed version.

_Situation before patches:_

The libvirt's XML configuration for VGA device has attribute "vram" but
we ignore the value and don't pass anything to QEMU, that sets the VGA
ram size to it's default 16MB.

_Sitoation after patches:_

The libvirt's XML configuration for VGA device has attribute "vram" and
we honor that value and pass it to QEMU, that takes the value and uses
it.

The migration issue is for the case where you will set with old libvirt
different walue than the default 9MB or 16MB in the XML configuration,
because the new libvirt will take the 9MB and round it to the next power
of 2 which is 16MB.

old libvirt guest    ===> migration ===>   new libvirt guest

      GUEST_1                                    GUEST_1
   vram="9182"                                vram="16384"
   vgamem_mb=16                               vgamem_mb=16

      GUEST_2                                    GUEST_2
   vram="65536"                               vram="65536"
   vgamem_mb=16                               vgamem_mb=64

As you can see the migration will fail because we will start using
"vram" attribute and because of that the memory for VGA device will be
different.

The least painful solution of this issue is probable to an extra element
in the migration cookie and if this element is missing we will not
*pass* the "vram" value to QEMU process so we don't break the migration.

This issue also applies to manage-save or save.

I would like to get some ideas or comments whether we want to fix the
migration from old libvirt or no.

Pavel




More information about the libvir-list mailing list