virt-manager/virtman-update-backend.diff
Charles Arnold d389fe33bc - Update to virt-manager 0.9.5
* Enable adding virtio-scsi disks (Chen Hanxiao)
  * Support security auto-relabel setting (Martin Kletzander)
  * Support disk iotune settings (David Shane Holden)
  * Support 'reset' as a reboot option (John Doyle)
  * Bug fixes and minor improvements

OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=115
2013-04-02 21:19:47 +00:00

21 lines
866 B
Diff

Index: virt-manager-0.9.5/src/virtManager/domain.py
===================================================================
--- virt-manager-0.9.5.orig/src/virtManager/domain.py
+++ virt-manager-0.9.5/src/virtManager/domain.py
@@ -1669,7 +1669,14 @@ class vmmDomain(vmmLibvirtObject):
# Invalidate cached values
self._invalidate_xml()
- info = self._backend.info()
+ try:
+ info = self._backend.info()
+ except:
+ self._backend = self.conn.vmm.lookupByName(self.get_name())
+ info = self._backend.info()
+ if info[0] == libvirt.VIR_DOMAIN_NOSTATE:
+ self._backend = self.conn.vmm.lookupByName(self.get_name())
+ info = self._backend.info()
expected = self.config.get_stats_history_length()
current = len(self.record)
if current > expected: