Commit 7589346f authored by Guido Trotter's avatar Guido Trotter
Browse files

kvm: Add -vga option



As requested in Issue 69.
Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent e6f24d89
......@@ -832,6 +832,7 @@ HV_CPU_THREADS = "cpu_threads"
HV_CPU_SOCKETS = "cpu_sockets"
HV_SOUNDHW = "soundhw"
HV_USB_DEVICES = "usb_devices"
HV_VGA = "vga"
HV_KVM_EXTRA = "kvm_extra"
......@@ -898,6 +899,7 @@ HVS_PARAMETER_TYPES = {
HV_CPU_SOCKETS: VTYPE_INT,
HV_SOUNDHW: VTYPE_STRING,
HV_USB_DEVICES: VTYPE_STRING,
HV_VGA: VTYPE_STRING,
HV_KVM_EXTRA: VTYPE_STRING,
}
......@@ -1968,6 +1970,7 @@ HVC_DEFAULTS = {
HV_CPU_SOCKETS: 0,
HV_SOUNDHW: "",
HV_USB_DEVICES: "",
HV_VGA: "",
HV_KVM_EXTRA: "",
},
HT_FAKE: {},
......
......@@ -537,6 +537,7 @@ class KVMHypervisor(hv_base.BaseHypervisor):
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_VGA: hv_base.NO_CHECK,
constants.HV_KVM_EXTRA: hv_base.NO_CHECK,
}
......@@ -1321,9 +1322,6 @@ class KVMHypervisor(hv_base.BaseHypervisor):
logging.info("KVM: SPICE will listen on port %s", instance.network_port)
kvm_cmd.extend(["-spice", spice_arg])
# Tell kvm to use the paravirtualized graphic card, optimized for SPICE
kvm_cmd.extend(["-vga", "qxl"])
else:
kvm_cmd.extend(["-nographic"])
......@@ -1341,6 +1339,13 @@ class KVMHypervisor(hv_base.BaseHypervisor):
if hvp[constants.HV_SOUNDHW]:
kvm_cmd.extend(["-soundhw", hvp[constants.HV_SOUNDHW]])
# Pass a -vga option if requested, or if spice is used, for backwards
# compatibility.
if hvp[constants.HV_VGA]:
kvm_cmd.extend(["-vga", hvp[constants.HV_VGA]])
elif spice_bind:
kvm_cmd.extend(["-vga", "qxl"])
# Various types of usb devices, comma separated
if hvp[constants.HV_USB_DEVICES]:
for dev in hvp[constants.HV_USB_DEVICES].split(","):
......
......@@ -663,6 +663,11 @@ usb\_devices
``-usbdevice`` option. See the **qemu**\(1) manpage for the syntax
of the possible components.
vga
Valid for the KVM hypervisor.
Emulated vga mode, passed the the kvm -vga option.
kvm\_extra
Valid for the KVM hypervisor.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment