diff --git a/dom0/qvm-core/qubes.py b/dom0/qvm-core/qubes.py index 0eb4e7e5..df7ab82e 100755 --- a/dom0/qvm-core/qubes.py +++ b/dom0/qvm-core/qubes.py @@ -240,11 +240,10 @@ class QubesVm(object): # Internal VM (not shown in qubes-manager, doesn't create appmenus entries "internal": { "default": False }, "vcpus": { "default": None }, - "kernel": { "default": None, 'eval': \ - 'self.template.kernel if self.template is not None else value' }, - "uses_default_kernel": { "default": True }, - "uses_default_kernelopts": { "default": True }, - "kernelopts": { "default": "", "eval": \ + "kernel": { "default": None, 'order': 30 }, + "uses_default_kernel": { "default": True, 'order': 30 }, + "uses_default_kernelopts": { "default": True, 'order': 30 }, + "kernelopts": { "default": "", 'order': 30, "eval": \ 'value if not self.uses_default_kernelopts else default_kernelopts_pcidevs if len(self.pcidevs) > 0 else default_kernelopts' }, "mac": { "attr": "_mac", "default": None }, "include_in_backups": { "default": True }, @@ -255,8 +254,7 @@ class QubesVm(object): 'self.template.appmenus_templates_dir if self.template is not None else None' }, "config_file_template": { "eval": "config_template_pv" }, "icon_path": { "eval": 'self.dir_path + "/icon.png" if self.dir_path is not None else None' }, - "kernels_dir": { 'eval': 'self.template.kernels_dir if self.template is not None else ' + \ - 'qubes_kernels_base_dir + "/" + self.kernel if self.kernel is not None else ' + \ + "kernels_dir": { 'eval': 'qubes_kernels_base_dir + "/" + self.kernel if self.kernel is not None else ' + \ # for backward compatibility (or another rare case): kernel=None -> kernel in VM dir 'self.dir_path + "/" + default_kernels_subdir' }, } diff --git a/dom0/qvm-tools/qvm-prefs b/dom0/qvm-tools/qvm-prefs index a77bf78d..6b4f1d8c 100755 --- a/dom0/qvm-tools/qvm-prefs +++ b/dom0/qvm-tools/qvm-prefs @@ -60,9 +60,7 @@ def do_list(vm): print fmt.format ("memory", vm.memory) print fmt.format ("maxmem", vm.maxmem) print fmt.format ("MAC", "%s%s" % (vm.mac, " (auto)" if vm._mac is None else "")) - if vm.template is not None: - print fmt.format ("kernel", "%s (from template)" % vm.kernel) - elif vm.uses_default_kernel: + if vm.uses_default_kernel: print fmt.format ("kernel", "%s (default)" % vm.kernel) else: print fmt.format ("kernel", vm.kernel) @@ -71,7 +69,6 @@ def do_list(vm): else: print fmt.format ("kernelopts", vm.kernelopts) - def set_label(vms, vm, args): if len (args) != 1: print >> sys.stderr, "Missing label name argument!" @@ -153,10 +150,6 @@ def set_netvm(vms, vm, args): vm.netvm = netvm def set_kernel(vms, vm, args): - if vm.template is not None: - print >> sys.stderr, "Cannot set kernel for template-based VM. Set it for template instead." - return False - if len (args) != 1: print >> sys.stderr, "Missing kernel version argument!" print >> sys.stderr, "Possible values:"