mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 19:32:19 +00:00
qemu: Report better error when memory device source has wrong NUMA node
When starting a VM with hotpluggable memory devices the user may specify an invalid source NUMA node. Libvirt would pass through the error from qemu: # virsh start test3 error: Failed to start domain test3 error: internal error: process exited while connecting to monitor: 2015-03-25T01:12:17.205913Z qemu-kvm: -object memory-backend-ram,id=memdimm0 ,size=536870912,host-nodes=1-3,policy=bind: cannot bind memory to host NUMA nodes: Invalid argument This patch adds a check that allows to report better error: # virsh start test3 error: Failed to start domain test3 error: configuration unsupported: NUMA node 1 is unavailable Signed-off-by: Luyao Huang <lhuang@redhat.com>
This commit is contained in:
parent
8ad871f39e
commit
726072f0d2
@ -4757,6 +4757,8 @@ qemuBuildMemoryBackendStr(unsigned long long size,
|
||||
}
|
||||
|
||||
if (nodemask) {
|
||||
if (!virNumaNodesetIsAvailable(nodemask))
|
||||
goto cleanup;
|
||||
if (virJSONValueObjectAdd(props,
|
||||
"m:host-nodes", nodemask,
|
||||
"S:policy", qemuNumaPolicyTypeToString(mode),
|
||||
|
Loading…
x
Reference in New Issue
Block a user