[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH] qemu: Allow serving VNC over a unix domain socket



On 01/10/2011 10:15 AM, Cole Robinson wrote:
> QEMU supports serving VNC over a unix domain socket rather than traditional
> TCP host/port. This is specified with:
> 
> <graphics type='vnc' socket='/foo/bar/baz'/>
> 
> Currently not hooked up with the security driver, I'll wait for Dan's
> big reorg. I also have a virtinst/virt-manager patch queued locally to
> handle this change.
> 
> +++ b/docs/schemas/domain.rng
> @@ -1116,6 +1116,11 @@
>              </attribute>
>            </optional>
>            <optional>
> +            <attribute name="socket">
> +              <ref name="absFilePath"/>
> +            </attribute>
> +          </optional>
> +          <optional>

Do we want to use a <choice> block, so that you either specify a <group>
of port/autoport/listen or the single attribute of socket?  That is, it
doesn't make sense to mix the two connection styles, and the relaxNG
validation can be tweaked to detect an improper mix.

> +++ b/src/qemu/qemu_command.c
> @@ -3511,7 +3511,11 @@ qemuBuildCommandLine(virConnectPtr conn,
>          def->graphics[0]->type == VIR_DOMAIN_GRAPHICS_TYPE_VNC) {
>          virBuffer opt = VIR_BUFFER_INITIALIZER;
>  
> -        if (qemuCmdFlags & QEMUD_CMD_FLAG_VNC_COLON) {
> +        if (def->graphics[0]->data.vnc.socket) {
> +            virBufferVSprintf(&opt, "unix:%s",
> +                              def->graphics[0]->data.vnc.socket);

Do we need a qemu_capability flag bit for this?  I'm assuming that -vnc
unix:xxx is a relatively new feature.

-- 
Eric Blake   eblake redhat com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]