diff --git a/qubes/storage/__init__.py b/qubes/storage/__init__.py index 89db20f6..968d763a 100644 --- a/qubes/storage/__init__.py +++ b/qubes/storage/__init__.py @@ -297,7 +297,7 @@ class Storage(object): # For StandaloneVM create it only if not already exists # (eg after backup-restore) if hasattr(self, 'volatile_img') \ - and not os.path.exists(self.vm.volatile_img): + and not os.path.exists(self.volatile_img): self.vm.log.info( 'Creating volatile image: {0}'.format(self.volatile_img)) subprocess.check_call( diff --git a/qubes/storage/xen.py b/qubes/storage/xen.py index 703e643f..271e000b 100644 --- a/qubes/storage/xen.py +++ b/qubes/storage/xen.py @@ -72,7 +72,7 @@ class XenStorage(qubes.storage.Storage): @property def root_img(self): '''Path to the root image''' - return self.vm.template.root_img if hasattr(self.vm, 'template') \ + return self.vm.template.storage.root_img if hasattr(self.vm, 'template') \ else self.abspath(qubes.config.vm_files['root_img']) @@ -171,8 +171,9 @@ class XenStorage(qubes.storage.Storage): else: self.vm.log.info("Copying the template's private image: {}".format( - source_template.private_img)) - self._copy_file(source_template.private_img, self.private_img) + source_template.storage.private_img)) + self._copy_file(source_template.storage.private_img, + self.private_img) def create_on_disk_root_img(self, source_template=None): @@ -184,8 +185,8 @@ class XenStorage(qubes.storage.Storage): elif self.vm.updateable: # if not updateable, just use template's disk self.vm.log.info("--> Copying the template's root image: {}".format( - source_template.root_img)) - self._copy_file(source_template.root_img, self.root_img) + source_template.storage.root_img)) + self._copy_file(source_template.storage.root_img, self.root_img) def resize_private_img(self, size):