mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
vnc: add support for listen type none
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
parent
c34ada0996
commit
93a2fb230a
@ -5384,7 +5384,8 @@ qemu-kvm -net nic,model=? /dev/null
|
|||||||
virDomainOpenGraphicsFD(). No other listen types are allowed if this
|
virDomainOpenGraphicsFD(). No other listen types are allowed if this
|
||||||
one is used and the graphics device doesn't listen anywhere. You need
|
one is used and the graphics device doesn't listen anywhere. You need
|
||||||
to use one of the two APIs to pass a FD to QEMU in order to connect to
|
to use one of the two APIs to pass a FD to QEMU in order to connect to
|
||||||
this graphics device. Supported by graphics type <code>spice</code>.
|
this graphics device. Supported by graphics type <code>vnc</code> and
|
||||||
|
<code>spice</code>.
|
||||||
</p>
|
</p>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
@ -10982,7 +10982,8 @@ virDomainGraphicsListenDefParseXML(virDomainGraphicsListenDefPtr def,
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_NONE:
|
case VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_NONE:
|
||||||
if (graphics->type != VIR_DOMAIN_GRAPHICS_TYPE_SPICE) {
|
if (graphics->type != VIR_DOMAIN_GRAPHICS_TYPE_SPICE &&
|
||||||
|
graphics->type != VIR_DOMAIN_GRAPHICS_TYPE_VNC) {
|
||||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||||
_("listen type 'none' is not available for "
|
_("listen type 'none' is not available for "
|
||||||
"graphics type '%s'"), graphicsType);
|
"graphics type '%s'"), graphicsType);
|
||||||
|
@ -7268,6 +7268,9 @@ qemuBuildGraphicsVNCCommandLine(virQEMUDriverConfigPtr cfg,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_NONE:
|
case VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_NONE:
|
||||||
|
virBufferAddLit(&opt, "none");
|
||||||
|
break;
|
||||||
|
|
||||||
case VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_LAST:
|
case VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_LAST:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
20
tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-none.args
Normal file
20
tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-none.args
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
LC_ALL=C \
|
||||||
|
PATH=/bin \
|
||||||
|
HOME=/home/test \
|
||||||
|
USER=test \
|
||||||
|
LOGNAME=test \
|
||||||
|
QEMU_AUDIO_DRV=none \
|
||||||
|
/usr/bin/qemu \
|
||||||
|
-name QEMUGuest1 \
|
||||||
|
-S \
|
||||||
|
-M pc \
|
||||||
|
-m 214 \
|
||||||
|
-smp 1 \
|
||||||
|
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
|
||||||
|
-nodefaults \
|
||||||
|
-monitor unix:/tmp/lib/domain--1-QEMUGuest1/monitor.sock,server,nowait \
|
||||||
|
-no-acpi \
|
||||||
|
-boot c \
|
||||||
|
-usb \
|
||||||
|
-vnc none \
|
||||||
|
-vga cirrus
|
30
tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-none.xml
Normal file
30
tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-none.xml
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
<domain type='qemu'>
|
||||||
|
<name>QEMUGuest1</name>
|
||||||
|
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
|
||||||
|
<memory unit='KiB'>219100</memory>
|
||||||
|
<currentMemory unit='KiB'>219100</currentMemory>
|
||||||
|
<vcpu placement='static'>1</vcpu>
|
||||||
|
<os>
|
||||||
|
<type arch='i686' machine='pc'>hvm</type>
|
||||||
|
<boot dev='hd'/>
|
||||||
|
</os>
|
||||||
|
<clock offset='utc'/>
|
||||||
|
<on_poweroff>destroy</on_poweroff>
|
||||||
|
<on_reboot>restart</on_reboot>
|
||||||
|
<on_crash>destroy</on_crash>
|
||||||
|
<devices>
|
||||||
|
<emulator>/usr/bin/qemu</emulator>
|
||||||
|
<controller type='usb' index='0'/>
|
||||||
|
<controller type='ide' index='0'/>
|
||||||
|
<controller type='pci' index='0' model='pci-root'/>
|
||||||
|
<input type='mouse' bus='ps2'/>
|
||||||
|
<input type='keyboard' bus='ps2'/>
|
||||||
|
<graphics type='vnc'>
|
||||||
|
<listen type='none'/>
|
||||||
|
</graphics>
|
||||||
|
<video>
|
||||||
|
<model type='cirrus' vram='16384' heads='1'/>
|
||||||
|
</video>
|
||||||
|
<memballoon model='none'/>
|
||||||
|
</devices>
|
||||||
|
</domain>
|
@ -903,6 +903,7 @@ mymain(void)
|
|||||||
driver.config->vncAutoUnixSocket = false;
|
driver.config->vncAutoUnixSocket = false;
|
||||||
DO_TEST("graphics-vnc-socket", QEMU_CAPS_VNC);
|
DO_TEST("graphics-vnc-socket", QEMU_CAPS_VNC);
|
||||||
DO_TEST("graphics-vnc-auto-socket", QEMU_CAPS_VNC);
|
DO_TEST("graphics-vnc-auto-socket", QEMU_CAPS_VNC);
|
||||||
|
DO_TEST("graphics-vnc-none", QEMU_CAPS_VNC);
|
||||||
|
|
||||||
driver.config->vncSASL = 1;
|
driver.config->vncSASL = 1;
|
||||||
VIR_FREE(driver.config->vncSASLdir);
|
VIR_FREE(driver.config->vncSASLdir);
|
||||||
|
Loading…
Reference in New Issue
Block a user