[virt-tools-list] [PATCH] virt-manager: Show if the shut off vm has a saved image
Miklos Vajna
vmiklos at frugalware.org
Sat Jul 30 20:15:44 UTC 2011
Hi,
So far in virt-manager one had to click on a shut off vm in the
"Shutoff" state to see if it has a saved image: once the item is
selected then the "play" icon will be "Run" or "Restore". This means
that in case one has a lot of VMs, it's hard to get an overview of what
VM has a saved image and what not.
The attached patch changes the "Shutoff" status message to "Saved" in
case the vm has a saved image.
Thanks.
-------------- next part --------------
>From 14445dc510fcc55c267649295246984972691885 Mon Sep 17 00:00:00 2001
From: Miklos Vajna <vmiklos at frugalware.org>
Date: Sat, 30 Jul 2011 22:02:48 +0200
Subject: [PATCH] domain: Show if the shut off vm has a saved image
---
src/virtManager/domain.py | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/src/virtManager/domain.py b/src/virtManager/domain.py
index f9a39b5..bccf75f 100644
--- a/src/virtManager/domain.py
+++ b/src/virtManager/domain.py
@@ -1334,7 +1334,10 @@ class vmmDomain(vmmLibvirtObject):
elif self.status() == libvirt.VIR_DOMAIN_SHUTDOWN:
return _("Shutting Down")
elif self.status() == libvirt.VIR_DOMAIN_SHUTOFF:
- return _("Shutoff")
+ if self.hasSavedImage():
+ return _("Saved")
+ else:
+ return _("Shutoff")
elif self.status() == libvirt.VIR_DOMAIN_CRASHED:
return _("Crashed")
--
1.7.6
More information about the virt-tools-list
mailing list