Commit 447af814 authored by Nikos Skalkotos's avatar Nikos Skalkotos Committed by Guido Trotter
Browse files

Open VDI Port when spice_use_vdagent is enabled



To use the features spice agent provides, a dedicated virtio-serial
channel must be created in qemu-kvm. The communication between the agent
and the other spice components takes place over this channel.
Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
Reviewed-by: default avatarAndrea Spadaccini <spadaccio@google.com>
parent c90d8e61
......@@ -1223,6 +1223,13 @@ class KVMHypervisor(hv_base.BaseHypervisor):
spice_arg = "%s,playback-compression=off" % spice_arg
if not hvp[constants.HV_KVM_SPICE_USE_VDAGENT]:
spice_arg = "%s,agent-mouse=off" % spice_arg
else:
# Enable the spice agent communication channel between the host and the
# agent.
kvm_cmd.extend(["-device", "virtio-serial-pci"])
kvm_cmd.extend(["-device", "virtserialport,chardev=spicechannel0,"
"name=com.redhat.spice.0"])
kvm_cmd.extend(["-chardev", "spicevmc,id=spicechannel0,name=vdagent"])
logging.info("KVM: SPICE will listen on port %s", instance.network_port)
kvm_cmd.extend(["-spice", spice_arg])
......
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