mirror of
https://github.com/GNS3/gns3-server
synced 2024-12-01 04:38:12 +00:00
Spice with agent support for Qemu VMs.
This commit is contained in:
parent
d419d3fa39
commit
caa2bda71b
@ -1455,6 +1455,21 @@ class QemuVM(BaseNode):
|
|||||||
else:
|
else:
|
||||||
return []
|
return []
|
||||||
|
|
||||||
|
def _spice_with_agent_options(self):
|
||||||
|
|
||||||
|
spice_options = self._spice_options()
|
||||||
|
if self._console:
|
||||||
|
# agent options (mouse/screen)
|
||||||
|
agent_options = ["-device", "virtio-serial",
|
||||||
|
"-chardev", "spicevmc,id=vdagent,debug=0,name=vdagent",
|
||||||
|
"-device", "virtserialport,chardev=vdagent,name=com.redhat.spice.0"]
|
||||||
|
spice_options.extend(agent_options)
|
||||||
|
# folder sharing options
|
||||||
|
folder_sharing_options = ["-chardev", "spiceport,name=org.spice-space.webdav.0,id=charchannel0",
|
||||||
|
"-device", "virtserialport,chardev=charchannel0,id=channel0,name=org.spice-space.webdav.0"]
|
||||||
|
spice_options.extend(folder_sharing_options)
|
||||||
|
return spice_options
|
||||||
|
|
||||||
def _monitor_options(self):
|
def _monitor_options(self):
|
||||||
|
|
||||||
if self._monitor:
|
if self._monitor:
|
||||||
@ -1822,6 +1837,8 @@ class QemuVM(BaseNode):
|
|||||||
command.extend(self._vnc_options())
|
command.extend(self._vnc_options())
|
||||||
elif self._console_type == "spice":
|
elif self._console_type == "spice":
|
||||||
command.extend(self._spice_options())
|
command.extend(self._spice_options())
|
||||||
|
elif self._console_type == "spice+agent":
|
||||||
|
command.extend(self._spice_with_agent_options())
|
||||||
elif self._console_type != "none":
|
elif self._console_type != "none":
|
||||||
raise QemuError("Console type {} is unknown".format(self._console_type))
|
raise QemuError("Console type {} is unknown".format(self._console_type))
|
||||||
command.extend(self._monitor_options())
|
command.extend(self._monitor_options())
|
||||||
|
@ -144,7 +144,7 @@ NODE_OBJECT_SCHEMA = {
|
|||||||
},
|
},
|
||||||
"console_type": {
|
"console_type": {
|
||||||
"description": "Console type",
|
"description": "Console type",
|
||||||
"enum": ["vnc", "telnet", "http", "https", "spice", "none", None]
|
"enum": ["vnc", "telnet", "http", "https", "spice", "spice+agent", "none", None]
|
||||||
},
|
},
|
||||||
"properties": {
|
"properties": {
|
||||||
"description": "Properties specific to an emulator",
|
"description": "Properties specific to an emulator",
|
||||||
|
@ -63,7 +63,7 @@ QEMU_CREATE_SCHEMA = {
|
|||||||
},
|
},
|
||||||
"console_type": {
|
"console_type": {
|
||||||
"description": "Console type",
|
"description": "Console type",
|
||||||
"enum": ["telnet", "vnc", "spice", "none"]
|
"enum": ["telnet", "vnc", "spice", "spice+agent", "none"]
|
||||||
},
|
},
|
||||||
"hda_disk_image": {
|
"hda_disk_image": {
|
||||||
"description": "QEMU hda disk image path",
|
"description": "QEMU hda disk image path",
|
||||||
@ -244,7 +244,7 @@ QEMU_UPDATE_SCHEMA = {
|
|||||||
},
|
},
|
||||||
"console_type": {
|
"console_type": {
|
||||||
"description": "Console type",
|
"description": "Console type",
|
||||||
"enum": ["telnet", "vnc", "spice", "none"]
|
"enum": ["telnet", "vnc", "spice", "spice+agent", "none"]
|
||||||
},
|
},
|
||||||
"linked_clone": {
|
"linked_clone": {
|
||||||
"description": "Whether the VM is a linked clone or not",
|
"description": "Whether the VM is a linked clone or not",
|
||||||
@ -541,7 +541,7 @@ QEMU_OBJECT_SCHEMA = {
|
|||||||
},
|
},
|
||||||
"console_type": {
|
"console_type": {
|
||||||
"description": "Console type",
|
"description": "Console type",
|
||||||
"enum": ["telnet", "vnc", "spice", "none"]
|
"enum": ["telnet", "vnc", "spice","spice+agent", "none"]
|
||||||
},
|
},
|
||||||
"initrd": {
|
"initrd": {
|
||||||
"description": "QEMU initrd path",
|
"description": "QEMU initrd path",
|
||||||
|
Loading…
Reference in New Issue
Block a user