第 7 章 Connecting to virtual machines
To interact with a virtual machine (VM) in RHEL 10, you need to connect to it by doing one of the following:
- If you need to interact with a VM graphical display without using the web console, use the Virt Viewer application. For details, see Opening a virtual machine graphical console by using the command line.
- When a graphical display is not possible or not necessary, use an SSH terminal connection.
- When the virtual machine is not reachable from your system by using a network, use the virsh console.
If the VMs to which you are connecting are on a remote host rather than a local one, you can optionally configure your system for more convenient access to remote hosts.
You can connect to running KVM virtual machines by using the web console interface.
By using the virtual machine (VM) console interface, you can view the graphical output of a selected VM in the RHEL 10 web console.
Prerequisites
You have installed the RHEL 10 web console.
For instructions, see Installing and enabling the web console.
- The web console VM plugin is installed on your system.
- Ensure that both the host and the VM support a graphical interface.
Procedure
- Log in to the RHEL 10 web console.
In the interface, click the VM whose graphical console you want to view.
A new page opens with an Overview and a Console section for the VM.
Select in the console drop down menu.
The VNC console appears below the menu in the web interface.
The graphical console appears in the web interface.
Click
You can now interact with the VM console by using the mouse and keyboard in the same manner you interact with a real machine. The display in the VM console reflects the activities being performed on the VM.
注意The host on which the web console is running may intercept specific key combinations, such as Ctrl+Alt+Del, preventing them from being sent to the VM.
To send such key combinations, click the menu and select the key sequence to send.
For example, to send the Ctrl+Alt+Del combination to the VM, click the and select the menu entry.
Optional: You can also display the graphical console of a selected VM in a remote viewer, such as Virt Viewer.
- Select in the console drop down menu.
Click .
The virt viewer,
.vv, file downloads.Open the file to launch Virt Viewer.
注意You can launch Virt Viewer from within the web console. Other VNC remote viewers can be launched manually.
Troubleshooting
- If clicking in the graphical console does not have any effect, expand the console to full screen. This is a known issue with the mouse cursor offset.
If launching the Remote Viewer in the web console does not work or is not optimal, you can manually connect with any viewer application by using the following protocols:
-
Address - The default address is
127.0.0.1. You can modify thevnc_listenparameter in/etc/libvirt/qemu.confto change it to the host’s IP address. - VNC port - 5901
-
Address - The default address is
You can view the serial console of a selected virtual machine (VM) in the RHEL 10 web console. This is useful when the host machine or the VM is not configured with a graphical interface.
For more information about the serial console, see Opening a virtual machine serial console by using the command line interface.
Prerequisites
You have installed the RHEL 10 web console.
For instructions, see Installing and enabling the web console.
- The web console VM plugin is installed on your system.
Procedure
- Log in to the RHEL 10 web console.
In the pane, click the VM whose serial console you want to view.
A new page opens with an Overview and a Console section for the VM.
Select in the console drop down menu.
The graphical console appears in the web interface.
Optional: You can disconnect and reconnect the serial console from the VM.
- To disconnect the serial console from the VM, click .
- To reconnect the serial console to the VM, click .