[virt-tools-list] [PATCH v3 5/6] Do not use createXML for non transient domains
Mikhail Feoktistov
mfeoktistov at virtuozzo.com
Tue Feb 21 14:27:59 UTC 2017
For these domains use defineXML
Also do not call secocd defineXML if install_xml == final_xml
---
virtinst/guest.py | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/virtinst/guest.py b/virtinst/guest.py
index ae23847..dd579ff 100644
--- a/virtinst/guest.py
+++ b/virtinst/guest.py
@@ -393,12 +393,14 @@ class Guest(XMLBuilder):
meter = util.ensure_meter(meter)
meter.start(size=None, text=meter_label)
- if doboot or transient or self.installer.has_install_phase():
+ if transient:
self.domain = self.conn.createXML(install_xml or final_xml, 0)
-
- if not transient:
- self.domain = self.conn.defineXML(final_xml)
- meter.end(0)
+ else:
+ self.domain = self.conn.defineXML(install_xml or final_xml)
+ if doboot or self.installer.has_install_phase():
+ self.domain.create()
+ if install_xml != None and install_xml != final_xml:
+ self.domain = self.conn.defineXML(final_xml)
try:
logging.debug("XML fetched from libvirt object:\n%s",
--
2.9.3
More information about the virt-tools-list
mailing list