As requested in Issue 261 and many other times.
Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
HV_CPU_SOCKETS = "cpu_sockets"
HV_SOUNDHW = "soundhw"
HV_USB_DEVICES = "usb_devices"
+HV_KVM_EXTRA = "kvm_extra"
HVS_PARAMETER_TYPES = {
HV_CPU_SOCKETS: VTYPE_INT,
HV_SOUNDHW: VTYPE_STRING,
HV_USB_DEVICES: VTYPE_STRING,
+ HV_KVM_EXTRA: VTYPE_STRING,
}
HVS_PARAMETERS = frozenset(HVS_PARAMETER_TYPES.keys())
HV_CPU_SOCKETS: 0,
HV_SOUNDHW: "",
HV_USB_DEVICES: "",
+ HV_KVM_EXTRA: "",
},
HT_FAKE: {},
HT_CHROOT: {
constants.HV_CPU_SOCKETS: hv_base.OPT_NONNEGATIVE_INT_CHECK,
constants.HV_SOUNDHW: hv_base.NO_CHECK,
constants.HV_USB_DEVICES: hv_base.NO_CHECK,
+ constants.HV_KVM_EXTRA: hv_base.NO_CHECK,
}
_MIGRATION_STATUS_RE = re.compile("Migration\s+status:\s+(\w+)",
for dev in hvp[constants.HV_USB_DEVICES].split(","):
kvm_cmd.extend(["-usbdevice", dev])
+ if hvp[constants.HV_KVM_EXTRA]:
+ kvm_cmd.extend([hvp[constants.HV_KVM_EXTRA]])
+
# Save the current instance nics, but defer their expansion as parameters,
# as we'll need to generate executable temp files for them.
kvm_nics = instance.nics
``-usbdevice`` option. See the **qemu**\(1) manpage for the syntax
of the possible components.
+kvm\_extra
+ Valid for the KVM hypervisor.
+
+ Any other option to the KVM hypervisor, useful tweaking anything
+ that Ganeti doesn't support.
+
The ``-O (--os-parameters)`` option allows customisation of the OS
parameters. The actual parameter names and values depends on the OS