storage: access *_img directly from vm.storage object
Not through vm.something_img proxy.
This commit is contained in:
parent
c0c0e0022e
commit
a73c694f54
@ -297,7 +297,7 @@ class Storage(object):
|
|||||||
# For StandaloneVM create it only if not already exists
|
# For StandaloneVM create it only if not already exists
|
||||||
# (eg after backup-restore)
|
# (eg after backup-restore)
|
||||||
if hasattr(self, 'volatile_img') \
|
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(
|
self.vm.log.info(
|
||||||
'Creating volatile image: {0}'.format(self.volatile_img))
|
'Creating volatile image: {0}'.format(self.volatile_img))
|
||||||
subprocess.check_call(
|
subprocess.check_call(
|
||||||
|
@ -72,7 +72,7 @@ class XenStorage(qubes.storage.Storage):
|
|||||||
@property
|
@property
|
||||||
def root_img(self):
|
def root_img(self):
|
||||||
'''Path to the root image'''
|
'''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'])
|
else self.abspath(qubes.config.vm_files['root_img'])
|
||||||
|
|
||||||
|
|
||||||
@ -171,8 +171,9 @@ class XenStorage(qubes.storage.Storage):
|
|||||||
|
|
||||||
else:
|
else:
|
||||||
self.vm.log.info("Copying the template's private image: {}".format(
|
self.vm.log.info("Copying the template's private image: {}".format(
|
||||||
source_template.private_img))
|
source_template.storage.private_img))
|
||||||
self._copy_file(source_template.private_img, self.private_img)
|
self._copy_file(source_template.storage.private_img,
|
||||||
|
self.private_img)
|
||||||
|
|
||||||
|
|
||||||
def create_on_disk_root_img(self, source_template=None):
|
def create_on_disk_root_img(self, source_template=None):
|
||||||
@ -184,8 +185,8 @@ class XenStorage(qubes.storage.Storage):
|
|||||||
elif self.vm.updateable:
|
elif self.vm.updateable:
|
||||||
# if not updateable, just use template's disk
|
# if not updateable, just use template's disk
|
||||||
self.vm.log.info("--> Copying the template's root image: {}".format(
|
self.vm.log.info("--> Copying the template's root image: {}".format(
|
||||||
source_template.root_img))
|
source_template.storage.root_img))
|
||||||
self._copy_file(source_template.root_img, self.root_img)
|
self._copy_file(source_template.storage.root_img, self.root_img)
|
||||||
|
|
||||||
|
|
||||||
def resize_private_img(self, size):
|
def resize_private_img(self, size):
|
||||||
|
Loading…
Reference in New Issue
Block a user