Force immediate refresh of VMs after creating one
This commit is contained in:
parent
b7089eca08
commit
de8425547b
|
@ -94,7 +94,7 @@ class vmmConnection(gobject.GObject):
|
|||
os.remove(frm)
|
||||
return status
|
||||
|
||||
def tick(self):
|
||||
def tick(self, noStatsUpdate=False):
|
||||
if self.vmm == None:
|
||||
return
|
||||
|
||||
|
@ -131,9 +131,13 @@ class vmmConnection(gobject.GObject):
|
|||
|
||||
now = time()
|
||||
self.hostinfo = self.vmm.getInfo()
|
||||
for uuid in self.vms.keys():
|
||||
self.vms[uuid].tick(now)
|
||||
|
||||
updateVMs = self.vms
|
||||
if noStatsUpdate:
|
||||
updateVMs = newVms
|
||||
|
||||
for uuid in updateVMs.keys():
|
||||
self.vms[uuid].tick(now)
|
||||
return 1
|
||||
|
||||
def uuidstr(self, rawuuid):
|
||||
|
|
|
@ -351,6 +351,9 @@ class vmmCreate(gobject.GObject):
|
|||
#self.close()
|
||||
return
|
||||
|
||||
# Ensure new VM is loaded
|
||||
self.connection.tick(noStatsUpdate=True)
|
||||
|
||||
vm = self.connection.get_vm(guest.uuid)
|
||||
(gtype, host, port) = vm.get_graphics_console()
|
||||
if gtype == "vnc":
|
||||
|
|
Loading…
Reference in New Issue