mirror of
https://github.com/virt-manager/virt-manager.git
synced 2024-12-25 23:21:45 +03:00
create: Make sure domain status is up2date before install
Seems we can miss sometimes that guest is already running
This commit is contained in:
parent
650e2d3205
commit
92ef22666a
@ -1797,6 +1797,7 @@ class vmmCreate(vmmGObjectUI):
|
||||
# Make sure we pick up the domain object
|
||||
self.conn.tick(noStatsUpdate=True)
|
||||
vm = self.conn.get_vm(guest.uuid)
|
||||
vm.tick()
|
||||
|
||||
if vm.is_shutoff():
|
||||
# Domain is already shutdown, but no error was raised.
|
||||
|
@ -1493,10 +1493,13 @@ class vmmDomain(vmmLibvirtObject):
|
||||
|
||||
return rd, wr
|
||||
|
||||
def tick(self, now):
|
||||
def tick(self, now=None):
|
||||
if self.conn.get_state() != self.conn.STATE_ACTIVE:
|
||||
return
|
||||
|
||||
if now is None:
|
||||
now = time.time()
|
||||
|
||||
# Invalidate cached values
|
||||
self._invalidate_xml()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user