diff --git a/man/virt-install.pod b/man/virt-install.pod index 1595f49d8..dfbac82f3 100644 --- a/man/virt-install.pod +++ b/man/virt-install.pod @@ -975,6 +975,9 @@ Use 'none' to specify that the display server should not listen on any port. The display server can be accessed only locally through libvirt unix socket (virt-viewer with --attach for instance). +Use 'socket' to have the VM listen on a libvirt generated unix socket +path on the host filesystem. + This is used by 'vnc' and 'spice' =item B diff --git a/tests/cli-test-xml/compare/virt-install-many-devices.xml b/tests/cli-test-xml/compare/virt-install-many-devices.xml index 4369e94b7..713ae13a2 100644 --- a/tests/cli-test-xml/compare/virt-install-many-devices.xml +++ b/tests/cli-test-xml/compare/virt-install-many-devices.xml @@ -219,6 +219,7 @@ + diff --git a/tests/cli-test-xml/compare/virt-xml-edit-graphics-listen-none.xml b/tests/cli-test-xml/compare/virt-xml-edit-graphics-listen-none.xml new file mode 100644 index 000000000..c86e45b4f --- /dev/null +++ b/tests/cli-test-xml/compare/virt-xml-edit-graphics-listen-none.xml @@ -0,0 +1,13 @@ + + + +- +- ++ ++ + + + + +Domain 'test-for-virtxml' defined successfully. +Changes will take effect after the next domain shutdown. \ No newline at end of file diff --git a/tests/clitest.py b/tests/clitest.py index 46270a3d4..1621ed02b 100644 --- a/tests/clitest.py +++ b/tests/clitest.py @@ -477,7 +477,7 @@ c.add_compare(""" \ --graphics vnc,port=5950,listen=1.2.3.4,keymap=ja,password=foo \ --graphics spice,port=5950,tlsport=5950,listen=1.2.3.4,keymap=ja \ --graphics spice,image_compression=foo,streaming_mode=bar,clipboard_copypaste=yes,mouse_mode=client,filetransfer_enable=on \ ---graphics spice,gl=yes \ +--graphics spice,gl=yes,listen=socket \ --graphics spice,gl=yes,listen=none \ \ --controller usb,model=ich9-ehci1,address=0:0:4.7,index=0 \ @@ -528,7 +528,7 @@ c.add_compare(""" \ --rng egd,backend_host=127.0.0.1,backend_service=8000,backend_type=tcp \ \ --panic iobase=507 \ -""", "many-devices", compare_check="1.3.1") # compare_check=rbd format output +""", "many-devices", compare_check="1.3.6") # compare_check=graphics listen=socket support # Test the implied defaults for gl=yes setting virgl=on c.add_compare(""" \ @@ -841,7 +841,7 @@ c.add_compare("--disk /dev/zero,perms=ro,startup_policy=optional", "edit-simple- c.add_compare("--disk path=", "edit-simple-disk-remove-path") c.add_compare("--network source=br0,type=bridge,model=virtio,mac=", "edit-simple-network") c.add_compare("--graphics tlsport=5902,keymap=ja", "edit-simple-graphics", compare_check="1.3.5") # compare_check=new graphics listen output -c.add_compare("--graphics listen=None", "edit-graphics-listen-none", compare_check="1.3.6") # compare_check=graphics listen=none support +c.add_compare("--graphics listen=none", "edit-graphics-listen-none", compare_check="1.3.6") # compare_check=graphics listen=none support c.add_compare("--controller index=15,model=lsilogic", "edit-simple-controller") c.add_compare("--controller index=15,model=lsilogic", "edit-simple-controller") c.add_compare("--smartcard type=spicevmc", "edit-simple-smartcard") diff --git a/virtinst/cli.py b/virtinst/cli.py index c0daf7be6..16eac565c 100644 --- a/virtinst/cli.py +++ b/virtinst/cli.py @@ -1951,6 +1951,10 @@ class ParserGraphics(VirtCLIParser): def set_listen_cb(opts, inst, cliname, val): if val == "none": inst.set_listen_none() + elif val == "socket": + inst.remove_all_listens() + obj = inst.add_listen() + obj.type = "socket" else: inst.listen = val