diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index cf983ca042..fb3ec5ee3e 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -5384,7 +5384,8 @@ qemu-kvm -net nic,model=? /dev/null
virDomainOpenGraphicsFD(). No other listen types are allowed if this
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
- this graphics device. Supported by graphics type spice
.
+ this graphics device. Supported by graphics type vnc
and
+ spice
.
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 1193c0864b..85f6e31191 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -10982,7 +10982,8 @@ virDomainGraphicsListenDefParseXML(virDomainGraphicsListenDefPtr def,
}
break;
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,
_("listen type 'none' is not available for "
"graphics type '%s'"), graphicsType);
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index d3e8172b87..490260f15e 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -7268,6 +7268,9 @@ qemuBuildGraphicsVNCCommandLine(virQEMUDriverConfigPtr cfg,
break;
case VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_NONE:
+ virBufferAddLit(&opt, "none");
+ break;
+
case VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_LAST:
break;
}
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-none.args b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-none.args
new file mode 100644
index 0000000000..69d1991afa
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-none.args
@@ -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
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-none.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-none.xml
new file mode 100644
index 0000000000..72a4819195
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-none.xml
@@ -0,0 +1,30 @@
+
+ QEMUGuest1
+ c7a5fdbd-edaf-9455-926a-d65c16db1809
+ 219100
+ 219100
+ 1
+
+ hvm
+
+
+
+ destroy
+ restart
+ destroy
+
+ /usr/bin/qemu
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index 1d88084df1..573162fc4c 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -903,6 +903,7 @@ mymain(void)
driver.config->vncAutoUnixSocket = false;
DO_TEST("graphics-vnc-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;
VIR_FREE(driver.config->vncSASLdir);