Skip to content
This repository was archived by the owner on Jan 22, 2026. It is now read-only.

Commit 9ac3281

Browse files
committed
Fix windows (2 stage) installs with latest libvirt.
1 parent 5647a31 commit 9ac3281

1 file changed

Lines changed: 13 additions & 3 deletions

File tree

virtinst/FullVirtGuest.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,20 @@ def get_continue_inst(self):
132132
return self._lookup_osdict_key("continue")
133133

134134
def continue_install(self, consolecb, meter, wait=True):
135-
install_xml = self.get_config_xml(disk_boot = True)
136-
logging.debug("Starting guest from '%s'" % ( install_xml ))
135+
cont_xml = self.get_config_xml(disk_boot = True)
136+
logging.debug("Continuing guest with:\n%s" % cont_xml)
137137
meter.start(size=None, text="Starting domain...")
138-
self.domain = self.conn.createLinux(install_xml, 0)
138+
139+
# As of libvirt 0.5.1 we can't 'create' over an defined VM.
140+
# So, redefine the existing domain (which should be shutoff at
141+
# this point), and start it.
142+
finalxml = self.domain.XMLDesc(0)
143+
144+
self.domain = self.conn.defineXML(cont_xml)
145+
self.domain.create()
146+
self.conn.defineXML(finalxml)
147+
148+
#self.domain = self.conn.createLinux(install_xml, 0)
139149
if self.domain is None:
140150
raise RuntimeError, _("Unable to start domain for guest, aborting installation!")
141151
meter.end(0)

0 commit comments

Comments
 (0)