dom0/core: do not inherit kernel version from template (#488)
This commit is contained in:
parent
2e6e9bfab9
commit
f4e9128bc5
@ -248,11 +248,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 },
|
||||
@ -263,8 +262,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' },
|
||||
}
|
||||
|
@ -65,9 +65,7 @@ def do_list(vm):
|
||||
print fmt.format ("MAC", "%s%s" % (vm.mac, " (auto)" if vm._mac is None else ""))
|
||||
|
||||
if hasattr(vm, 'kernel'):
|
||||
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)
|
||||
@ -162,10 +160,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:"
|
||||
|
Loading…
Reference in New Issue
Block a user