Well, after [1] qemu doesn't understand '-object memory-backend-ram' nor '-object memory-backend-file'. Make sure we remove that capabilities from our internal list temporarily, so the qemu command line is constructed in correct way. 1: https://bugzilla.redhat.com/show_bug.cgi?id=1170093 Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx> --- src/qemu/qemu_capabilities.c | 10 ++++--- .../qemuxml2argv-numatune-memnode-rhel650.args | 7 +++++ .../qemuxml2argv-numatune-memnode-rhel650.xml | 31 ++++++++++++++++++++++ tests/qemuxml2argvtest.c | 4 +++ 4 files changed, 49 insertions(+), 3 deletions(-) create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-numatune-memnode-rhel650.args create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-numatune-memnode-rhel650.xml diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 233449b..940f070 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -3510,6 +3510,11 @@ bool virQEMUCapsIsValid(virQEMUCapsPtr qemuCaps) return sb.st_ctime == qemuCaps->ctime; } +static virQEMUCapsFlags virQEMUCapsMachineRHEL650Filter[] = { + /* For some reason, rhel6.5.0 machine type doesn't understand memdev. */ + QEMU_CAPS_OBJECT_MEMORY_RAM, + QEMU_CAPS_OBJECT_MEMORY_FILE, +}; struct virQEMUCapsMachineTypeFilter { const char *machineType; @@ -3518,9 +3523,8 @@ struct virQEMUCapsMachineTypeFilter { }; static const struct virQEMUCapsMachineTypeFilter virQEMUCapsMachineFilter[] = { - /* { "blah", virQEMUCapsMachineBLAHFilter, - ARRAY_CARDINALITY(virQEMUCapsMachineBLAHFilter) }, */ - { "", NULL, 0 }, + { "rhel6.5.0", virQEMUCapsMachineRHEL650Filter, + ARRAY_CARDINALITY(virQEMUCapsMachineRHEL650Filter)}, }; diff --git a/tests/qemuxml2argvdata/qemuxml2argv-numatune-memnode-rhel650.args b/tests/qemuxml2argvdata/qemuxml2argv-numatune-memnode-rhel650.args new file mode 100644 index 0000000..813f3ea --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-numatune-memnode-rhel650.args @@ -0,0 +1,7 @@ +LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \ +/usr/bin/kvm -S -M rhel6.5.0 -m 24104 -smp 32 \ +-numa node,nodeid=0,cpus=0,mem=20 \ +-numa node,nodeid=1,cpus=1-27,cpus=29,mem=645 \ +-numa node,nodeid=2,cpus=28,cpus=30-31,mem=23440 \ +-nographic -monitor unix:/tmp/test-monitor,server,nowait \ +-no-acpi -boot c -usb -net none -serial none -parallel none diff --git a/tests/qemuxml2argvdata/qemuxml2argv-numatune-memnode-rhel650.xml b/tests/qemuxml2argvdata/qemuxml2argv-numatune-memnode-rhel650.xml new file mode 100644 index 0000000..a659216 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-numatune-memnode-rhel650.xml @@ -0,0 +1,31 @@ +<domain type='qemu'> + <name>QEMUGuest</name> + <uuid>9f4b6512-e73a-4a25-93e8-5307802821ce</uuid> + <memory unit='KiB'>24682468</memory> + <currentMemory unit='KiB'>24682468</currentMemory> + <vcpu placement='static'>32</vcpu> + <numatune> + <memory mode='strict' nodeset='0-7'/> + </numatune> + <os> + <type arch='x86_64' machine='rhel6.5.0'>hvm</type> + <boot dev='hd'/> + </os> + <cpu> + <numa> + <cell id='0' cpus='0' memory='20002' unit='KiB'/> + <cell id='1' cpus='1-27,29' memory='660066' unit='KiB'/> + <cell id='2' cpus='28-31,^29' memory='24002400' unit='KiB'/> + </numa> + </cpu> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <emulator>/usr/bin/kvm</emulator> + <controller type='usb' index='0'/> + <controller type='pci' index='0' model='pci-root'/> + <memballoon model='virtio'/> + </devices> +</domain> diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index f2120dd..a7e14f0 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1263,6 +1263,10 @@ mymain(void) DO_TEST_LINUX("numatune-memnode", QEMU_CAPS_NUMA, QEMU_CAPS_OBJECT_MEMORY_RAM); DO_TEST_FAILURE("numatune-memnode", NONE); + DO_TEST_LINUX("numatune-memnode-rhel650", + QEMU_CAPS_NUMA, + QEMU_CAPS_OBJECT_MEMORY_RAM, + QEMU_CAPS_OBJECT_MEMORY_FILE); DO_TEST_LINUX("numatune-memnode-no-memory", QEMU_CAPS_NUMA, QEMU_CAPS_OBJECT_MEMORY_RAM); -- 2.0.5 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list