diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 7a1c9feaf7..bb1835c2f5 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -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"); diff --git a/tests/qemuxml2argvdata/qemuxml2argv-restore-v1.args b/tests/qemuxml2argvdata/qemuxml2argv-restore-v1.args index 5c677027cc..458c015d3b 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-restore-v1.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-restore-v1.args @@ -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