[libvirt] [PATCH v2 06/11] Fix flags passed to virDomainDefParseString by XenAPI driver

Daniel P. Berrange berrange at redhat.com
Thu Jan 8 15:48:17 UTC 2015


The XenAPI driver was passing the flags for
virDomainCreateXML straight into the virDomainDefParseString
method, even though they expect totally different sets of
flags. It should have been using VIR_DOMAIN_XML_INACTIVE
---
 src/xenapi/xenapi_driver.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/xenapi/xenapi_driver.c b/src/xenapi/xenapi_driver.c
index fbb2f23..5f4363d 100644
--- a/src/xenapi/xenapi_driver.c
+++ b/src/xenapi/xenapi_driver.c
@@ -554,7 +554,7 @@ xenapiDomainCreateXML(virConnectPtr conn,
     virDomainDefPtr defPtr = virDomainDefParseString(xmlDesc,
                                                      priv->caps, priv->xmlopt,
                                                      1 << VIR_DOMAIN_VIRT_XEN,
-                                                     flags);
+                                                     VIR_DOMAIN_XML_INACTIVE);
     createVMRecordFromXml(conn, defPtr, &record, &vm);
     virDomainDefFree(defPtr);
     if (record) {
@@ -1728,7 +1728,7 @@ xenapiDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int fla
     virDomainDefPtr defPtr = virDomainDefParseString(xml,
                                                      priv->caps, priv->xmlopt,
                                                      1 << VIR_DOMAIN_VIRT_XEN,
-                                                     0);
+                                                     VIR_DOMAIN_XML_INACTIVE);
     if (!defPtr)
         return NULL;
 
-- 
2.1.0




More information about the libvir-list mailing list