HV_USB_DEVICES = "usb_devices"
HV_VGA = "vga"
HV_KVM_EXTRA = "kvm_extra"
+HV_KVM_MACHINE_VERSION = "machine_version"
HVS_PARAMETER_TYPES = {
HV_USB_DEVICES: VTYPE_STRING,
HV_VGA: VTYPE_STRING,
HV_KVM_EXTRA: VTYPE_STRING,
+ HV_KVM_MACHINE_VERSION: VTYPE_STRING,
}
HVS_PARAMETERS = frozenset(HVS_PARAMETER_TYPES.keys())
HV_USB_DEVICES: "",
HV_VGA: "",
HV_KVM_EXTRA: "",
+ HV_KVM_MACHINE_VERSION: "",
},
HT_FAKE: {},
HT_CHROOT: {
constants.HV_USB_DEVICES: hv_base.NO_CHECK,
constants.HV_VGA: hv_base.NO_CHECK,
constants.HV_KVM_EXTRA: hv_base.NO_CHECK,
+ constants.HV_KVM_MACHINE_VERSION: hv_base.NO_CHECK,
}
_MIGRATION_STATUS_RE = re.compile("Migration\s+status:\s+(\w+)",
pidfile = self._InstancePidFile(instance.name)
kvm = constants.KVM_PATH
kvm_cmd = [kvm]
- kvm_cmd.extend(["-M", self._GetDefaultMachineVersion()])
# used just by the vnc server, if enabled
kvm_cmd.extend(["-name", instance.name])
kvm_cmd.extend(["-m", instance.beparams[constants.BE_MAXMEM]])
constants.INSTANCE_REBOOT_EXIT:
kvm_cmd.extend(["-no-reboot"])
+ mversion = hvp[constants.HV_KVM_MACHINE_VERSION]
+ if not mversion:
+ mversion = self._GetDefaultMachineVersion()
+ kvm_cmd.extend(["-M", mversion])
+
kernel_path = hvp[constants.HV_KERNEL_PATH]
if kernel_path:
boot_disk = boot_cdrom = boot_floppy = boot_network = False
Any other option to the KVM hypervisor, useful tweaking anything
that Ganeti doesn't support.
+machine\_version
+ Valid for the KVM hypervisor.
+
+ Use in case an instance must be booted with an exact type of
+ machine version (due to e.g. outdated drivers). In case it's not set
+ the default version supported by your version of kvm is used.
The ``-O (--os-parameters)`` option allows customisation of the OS
parameters. The actual parameter names and values depends on the OS