diff --git a/core-modules/000QubesVm.py b/core-modules/000QubesVm.py index 7876f1a0..8ad21222 100644 --- a/core-modules/000QubesVm.py +++ b/core-modules/000QubesVm.py @@ -327,6 +327,13 @@ class QubesVm(object): if len(self.pcidevs) > 0: self.services['meminfo-writer'] = False + # Initialize VM image storage class + self.storage = defaults["storage_class"](self) + if hasattr(self, 'kernels_dir'): + self.storage.modules_img = os.path.join(self.kernels_dir, + "modules.img") + self.storage.modules_img_rw = self.kernel is None + # Some additional checks for template based VM if self.template is not None: if not self.template.is_template(): @@ -337,12 +344,6 @@ class QubesVm(object): else: assert self.root_img is not None, "Missing root_img for standalone VM!" - self.storage = defaults["storage_class"](self) - if hasattr(self, 'kernels_dir'): - self.storage.modules_img = os.path.join(self.kernels_dir, - "modules.img") - self.storage.modules_img_rw = self.kernel is None - # fire hooks for hook in self.hooks_init: hook(self)