mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-20 06:50:22 +03:00
conf: add VIR_DOMAIN_VIDEO_TYPE_PARALLELS video type
We support VNC for containers to have the same interface with VMs. At this moment it just renders linux text console. Of course we don't pass any physical devices and don't emulate virtual devices. Our VNC server renders text from terminal master and sends input events from VNC client to terminal. So add special video type VIR_DOMAIN_VIDEO_TYPE_PARALLELS for these pseudo-devices. Signed-off-by: Dmitry Guryanov <dguryanov@parallels.com>
This commit is contained in:
parent
b16868a135
commit
0d572b6982
@ -500,7 +500,8 @@ VIR_ENUM_IMPL(virDomainVideo, VIR_DOMAIN_VIDEO_TYPE_LAST,
|
||||
"vmvga",
|
||||
"xen",
|
||||
"vbox",
|
||||
"qxl")
|
||||
"qxl",
|
||||
"parallels")
|
||||
|
||||
VIR_ENUM_IMPL(virDomainInput, VIR_DOMAIN_INPUT_TYPE_LAST,
|
||||
"mouse",
|
||||
|
@ -1326,6 +1326,7 @@ typedef enum {
|
||||
VIR_DOMAIN_VIDEO_TYPE_XEN,
|
||||
VIR_DOMAIN_VIDEO_TYPE_VBOX,
|
||||
VIR_DOMAIN_VIDEO_TYPE_QXL,
|
||||
VIR_DOMAIN_VIDEO_TYPE_PARALLELS, /* pseudo device for VNC in containers */
|
||||
|
||||
VIR_DOMAIN_VIDEO_TYPE_LAST
|
||||
} virDomainVideoType;
|
||||
|
@ -997,6 +997,25 @@ prlsdkAddVNCInfo(PRL_HANDLE sdkdom, virDomainDefPtr def)
|
||||
if (VIR_APPEND_ELEMENT(def->graphics, def->ngraphics, gr) < 0)
|
||||
goto error;
|
||||
|
||||
if (IS_CT(def)) {
|
||||
virDomainVideoDefPtr video;
|
||||
if (VIR_ALLOC(video) < 0)
|
||||
goto error;
|
||||
video->type = virDomainVideoDefaultType(def);
|
||||
if (video->type < 0) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
_("cannot determine default video type"));
|
||||
VIR_FREE(video);
|
||||
goto error;
|
||||
}
|
||||
video->vram = virDomainVideoDefaultRAM(def, video->type);
|
||||
video->heads = 1;
|
||||
if (VIR_ALLOC_N(def->videos, 1) < 0) {
|
||||
virDomainVideoDefFree(video);
|
||||
goto error;
|
||||
}
|
||||
def->videos[def->nvideos++] = video;
|
||||
}
|
||||
return 0;
|
||||
|
||||
error:
|
||||
|
@ -112,7 +112,8 @@ VIR_ENUM_IMPL(qemuVideo, VIR_DOMAIN_VIDEO_TYPE_LAST,
|
||||
"vmware",
|
||||
"", /* no arg needed for xen */
|
||||
"", /* don't support vbox */
|
||||
"qxl");
|
||||
"qxl",
|
||||
"" /* don't support parallels */);
|
||||
|
||||
VIR_ENUM_DECL(qemuDeviceVideo)
|
||||
|
||||
@ -122,7 +123,8 @@ VIR_ENUM_IMPL(qemuDeviceVideo, VIR_DOMAIN_VIDEO_TYPE_LAST,
|
||||
"vmware-svga",
|
||||
"", /* no device for xen */
|
||||
"", /* don't support vbox */
|
||||
"qxl-vga");
|
||||
"qxl-vga",
|
||||
"" /* don't support parallels */);
|
||||
|
||||
VIR_ENUM_DECL(qemuSoundCodec)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user