mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
qemu: graphics support for simultaneous one of each sdl, vnc, spice
This commit is contained in:
parent
23e8b5d8e7
commit
37b415200d
@ -4787,6 +4787,9 @@ qemuBuildCommandLine(virConnectPtr conn,
|
|||||||
bool hasHwVirt = false;
|
bool hasHwVirt = false;
|
||||||
virCommandPtr cmd = NULL;
|
virCommandPtr cmd = NULL;
|
||||||
bool emitBootindex = false;
|
bool emitBootindex = false;
|
||||||
|
int sdl = 0;
|
||||||
|
int vnc = 0;
|
||||||
|
int spice = 0;
|
||||||
int usbcontroller = 0;
|
int usbcontroller = 0;
|
||||||
bool usblegacy = false;
|
bool usblegacy = false;
|
||||||
uname_normalize(&ut);
|
uname_normalize(&ut);
|
||||||
@ -6201,9 +6204,28 @@ qemuBuildCommandLine(virConnectPtr conn,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (def->ngraphics > 1) {
|
for (i = 0 ; i < def->ngraphics ; ++i) {
|
||||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
switch (def->graphics[i]->type) {
|
||||||
"%s", _("only 1 graphics device is supported"));
|
case VIR_DOMAIN_GRAPHICS_TYPE_SDL:
|
||||||
|
++sdl;
|
||||||
|
break;
|
||||||
|
case VIR_DOMAIN_GRAPHICS_TYPE_VNC:
|
||||||
|
++vnc;
|
||||||
|
break;
|
||||||
|
case VIR_DOMAIN_GRAPHICS_TYPE_SPICE:
|
||||||
|
++spice;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!qemuCapsGet(caps, QEMU_CAPS_0_10) && sdl + vnc + spice > 1) {
|
||||||
|
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||||
|
_("only 1 graphics device is supported"));
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
if (sdl > 1 || vnc > 1 || spice > 1) {
|
||||||
|
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||||
|
_("only 1 graphics device of each type "
|
||||||
|
"(sdl, vnc, spice) is supported"));
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user