In a way, libvirt already uses -numa memdev= in a few cases. In fact, in
as few cases as possible - only configurations which can not be
configured with -numa mem=, because these two ways are incompatible when
it comes to migration.
My approach to solve this is to have a privateData flag which tells
which directs libvirt to generate old or new cmd line. And then this
flag is saved into migration cookie so that the destination is directed
the same way.
Problem with this approach is that, while migration 6.3.0 -> 6.4.0 ->
6.3.0 works, migration where the machine is started on newer libvirt
6.4.0 and then migrated back to 6.3.0 won't work (in fact is explicitly
denied by 2/2) even though there is nothing visible that should prevent
the migration.
I am not sure whether we have a good move here, because even if we
waited until QEMU removes the old way, it won't help us really. We
would be just leaving the problem for future us.
Michal Prívozník (2):
qemu: Switch to new -numa memdev=
qemu: Disallow migration to older -numa if newer is used
src/qemu/qemu_command.c | 20 ++---
src/qemu/qemu_domain.c | 38 +++++++++-
src/qemu/qemu_domain.h | 3 +
src/qemu/qemu_migration.c | 18 ++++-
src/qemu/qemu_migration_cookie.c | 73 +++++++++++++++++++
src/qemu/qemu_migration_cookie.h | 12 +++
src/qemu/qemu_process.c | 25 ++++++-
.../qemustatusxml2xmldata/backup-pull-in.xml | 1 +
.../blockjob-blockdev-in.xml | 1 +
.../blockjob-mirror-in.xml | 1 +
.../disk-secinfo-upgrade-in.xml | 1 +
.../disk-secinfo-upgrade-out.xml | 1 +
.../migration-in-params-in.xml | 1 +
.../migration-out-nbd-in.xml | 1 +
.../migration-out-nbd-out.xml | 1 +
.../migration-out-nbd-tls-in.xml | 1 +
.../migration-out-nbd-tls-out.xml | 1 +
.../migration-out-params-in.xml | 1 +
tests/qemustatusxml2xmldata/modern-in.xml | 1 +
.../qemustatusxml2xmldata/vcpus-multi-in.xml | 1 +
.../hugepages-numa-default-2M.args | 10 ++-
.../hugepages-numa-default-dimm.args | 8 +-
.../hugepages-numa-default.args | 6 +-
.../memory-hotplug-dimm-addr.args | 3 +-
.../qemuxml2argvdata/memory-hotplug-dimm.args | 3 +-
...y-hotplug-nvdimm-access.x86_64-latest.args | 3 +-
...ry-hotplug-nvdimm-align.x86_64-latest.args | 3 +-
...ry-hotplug-nvdimm-label.x86_64-latest.args | 3 +-
...ory-hotplug-nvdimm-pmem.x86_64-latest.args | 3 +-
...ory-hotplug-nvdimm-ppc64.ppc64-latest.args | 3 +-
...hotplug-nvdimm-readonly.x86_64-latest.args | 3 +-
.../memory-hotplug-nvdimm.x86_64-latest.args | 3 +-
.../numatune-auto-prefer.args | 4 +-
.../qemuxml2argvdata/pages-dimm-discard.args | 3 +-
.../pages-discard-hugepages.args | 11 ++-
tests/qemuxml2argvdata/pages-discard.args | 12 ++-
36 files changed, 236 insertions(+), 47 deletions(-)
--
2.26.2