]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: command: Align memory sizes only on fresh starts
authorPeter Krempa <pkrempa@redhat.com>
Thu, 17 Sep 2015 06:14:05 +0000 (08:14 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 22 Sep 2015 14:09:28 +0000 (16:09 +0200)
When we are starting a qemu process for an incomming migration or
snapshot reloading we should not modify the memory sizes in the domain
since we could potentially change the guest ABI that was tediously
checked before. Additionally the function now updates the initial memory
size according to the NUMA node size, which should not happen if we are
restoring state.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1252685

src/qemu/qemu_command.c
tests/qemuxml2argvdata/qemuxml2argv-restore-v1.args

index 7a1c9feaf714bf2c825b3ab1fe9b62d454bc41c2..bb1835c2f5f1e9d523048a04075c44726e4bcae8 100644 (file)
@@ -9318,7 +9318,8 @@ qemuBuildCommandLine(virConnectPtr conn,
     if (qemuBuildDomainLoaderCommandLine(cmd, def, qemuCaps) < 0)
         goto error;
 
-    if (qemuDomainAlignMemorySizes(def) < 0)
+    if (!migrateFrom && !snapshot &&
+        qemuDomainAlignMemorySizes(def) < 0)
         goto error;
 
     virCommandAddArg(cmd, "-m");
index 5c677027cc20a5ca1a657fad176837504c25f005..458c015d3b0d53d264c61ce7d0636c5a822c7121 100644 (file)
@@ -1,5 +1,5 @@
 LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \
 /usr/bin/qemu -S -M \
-pc -m 214 -smp 1 -nographic -monitor unix:/tmp/test-monitor,server,nowait \
+pc -m 213 -smp 1 -nographic -monitor unix:/tmp/test-monitor,server,nowait \
 -no-acpi -boot c -usb -hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel \
 none -incoming stdio