提交 0d572b69 编写于 作者: D Dmitry Guryanov 提交者: Michal Privoznik

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: NDmitry Guryanov <dguryanov@parallels.com>
上级 b16868a1
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册