Show Table of Contents
20.15. Displaying the IP Address and Port Number for the VNC Display
The
virsh vncdisplay command 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 1 is displayed.
Note that for this command to work, VNC has to be specified as a graphics type in the
devices element of the guest's XML file. For further information, see Section 23.18.12, “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 guest1
127.0.0.1:0

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.