20.15. Displaying the IP Address and Port Number for the VNC Display
virsh vncdisplaycommand returns the IP address and port number of the VNC display for the specified guest virtual machine. If the information is unavailable for the guest, the exit code
Note that for this command to work, VNC has to be specified as a graphics type in the
deviceselement of the guest's XML file. For further information, see Section 23.17.11, “Graphical Framebuffers”.
Example 20.37. How to display the IP address and port number for VNC
The following example displays the port number for the VNC display of the guest1 virtual machine:
virsh vncdisplay guest1127.0.0.1:0