Path to the Vm images is set by the storage
- This moves the logic for setting the path to the storage specific class like XenStore
This commit is contained in:
parent
348030bf9c
commit
76224dac86
@ -57,12 +57,6 @@ class QubesVmStorage(object):
|
||||
else:
|
||||
self.root_img_size = defaults['root_img_size']
|
||||
|
||||
self.private_img = vm.absolute_path(vm_files["private_img"], None)
|
||||
if self.vm.template:
|
||||
self.root_img = self.vm.template.root_img
|
||||
else:
|
||||
self.root_img = vm.absolute_path(vm_files["root_img"], None)
|
||||
self.volatile_img = vm.absolute_path(vm_files["volatile_img"], None)
|
||||
|
||||
# For now compute this path still in QubesVm
|
||||
self.modules_img = modules_img
|
||||
|
@ -64,6 +64,13 @@ class XenStorage(QubesVmStorage):
|
||||
else:
|
||||
self.rootcow_img = None
|
||||
|
||||
self.private_img = os.path.join(vmdir, 'private.img')
|
||||
if self.vm.template:
|
||||
self.root_img = self.vm.template.root_img
|
||||
else:
|
||||
self.root_img = os.path.join(vmdir, 'root.img')
|
||||
self.volatile_img = os.path.join(vmdir, 'volatile.img')
|
||||
|
||||
def _format_disk_dev(self, path, script, vdev, rw=True, type="disk", domain=None):
|
||||
if path is None:
|
||||
return ''
|
||||
|
Loading…
Reference in New Issue
Block a user