From 8262f2ef4bb82283df9498dcb1b7c5055283f368 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Thu, 11 Feb 2016 05:44:38 +0100 Subject: [PATCH] storage: fix handling standalone VMs Currently Standalone have template=None. --- qubes/storage/xen.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qubes/storage/xen.py b/qubes/storage/xen.py index 271e000b..57c0ff66 100644 --- a/qubes/storage/xen.py +++ b/qubes/storage/xen.py @@ -72,7 +72,8 @@ class XenStorage(qubes.storage.Storage): @property def root_img(self): '''Path to the root image''' - return self.vm.template.storage.root_img if hasattr(self.vm, 'template') \ + return self.vm.template.storage.root_img \ + if hasattr(self.vm, 'template') and self.vm.template \ else self.abspath(qubes.config.vm_files['root_img'])