Right now we are parsing the XML as though it's live, which for example
will choke on hardcoded XML like:
<seclabel type='dynamic' model='selinux' relabel='yes'/>
Erroring with:
$ sudo virsh domxml-to-native qemu-argv f
error: XML error: security label is missing
---
src/qemu/qemu_driver.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index a01739c..89f443f 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -5812,7 +5812,8 @@ static char *qemuConnectDomainXMLToNative(virConnectPtr conn,
goto cleanup;
def = virDomainDefParseString(xmlData, caps, driver->xmlopt,
- QEMU_EXPECTED_VIRT_TYPES, 0);
+ QEMU_EXPECTED_VIRT_TYPES,
+ VIR_DOMAIN_XML_INACTIVE);
if (!def)
goto cleanup;
--
1.8.5.3