$ remmina --connect /path/to/console.rdp
OpenShift Virtualization provides different virtual machine consoles that you can use to accomplish different product tasks. You can access these consoles through the web console and by using CLI commands.
You can connect to the VNC and serial consoles of a running virtual machine from the Console tab on the Virtual Machine Details page of the web console.
The VNC Console opens by default when you navigate to the Console tab. You can open a connection to the serial console by clicking the VNC Console drop-down list and selecting Serial Console.
Console sessions remain active in the background unless they are disconnected. To ensure that only one console session is open at a time, click the Disconnect before switching check box before switching consoles.
You can open the active console session in a detached window by clicking the Open Console in New Window button or by clicking Actions → Open Console.
Send key combinations to the virtual machine by clicking Send Key.
Manually disconnect the Serial Console session from the virtual machine by clicking Disconnect.
Manually open a Serial Console session to the virtual machine by clicking Reconnect.
You can connect to a virtual machine by using the web console.
Ensure you are in the correct project. If not, click the Project list and select the appropriate project.
Click Workloads → Virtualization from the side menu.
Click the Virtual Machines tab.
Select a virtual machine to open the Virtual Machine Overview screen.
In the Details tab, click the virt-launcher-<vm-name>
pod.
Click the Terminal tab. If the terminal is blank, select the terminal and press any key to initiate connection.
Connect to the Serial Console of a running virtual machine from the Console tab in the Virtual Machine Overview screen of the web console.
In the OpenShift Virtualization console, click Workloads → Virtualization from the side menu.
Click the Virtual Machines tab.
Select a virtual machine to open the Virtual Machine Overview page.
Click Console. The VNC console opens by default.
Click the VNC Console drop-down list and select Serial Console.
Optional: Open the serial console in a separate window by clicking Open Console in New Window.
Connect to the VNC console of a running virtual machine from the Console tab in the Virtual Machine Overview screen of the web console.
In the OpenShift Virtualization console, click Workloads → Virtualization from the side menu.
Click the Virtual Machines tab.
Select a virtual machine to open the Virtual Machine Overview page.
Click the Console tab. The VNC console opens by default.
Optional: Open the VNC console in a separate window by clicking Open Console in New Window.
The desktop viewer console, which utilizes the Remote Desktop Protocol (RDP), provides a better console experience for connecting to Windows virtual machines.
To connect to a Windows virtual machine with RDP, download the console.rdp
file for the virtual machine from the Consoles tab in the
Virtual Machine Details screen of the web console and supply it to your
preferred RDP client.
A running Windows virtual machine with the QEMU guest agent installed. The
qemu-guest-agent
is included in the VirtIO drivers.
A layer-2 NIC attached to the virtual machine.
An RDP client installed on a machine on the same network as the Windows virtual machine.
In the OpenShift Virtualization console, click Workloads → Virtualization from the side menu.
Click the Virtual Machines tab.
Select a Windows virtual machine to open the Virtual Machine Overview screen.
Click the Console tab.
In the Console list, select Desktop Viewer.
In the Network Interface list, select the layer-2 NIC.
Click Launch Remote Desktop to download the console.rdp
file.
Open an RDP client and reference the console.rdp
file. For example, using
remmina:
$ remmina --connect /path/to/console.rdp
Enter the Administrator user name and password to connect to the Windows virtual machine.
You can use SSH to access a virtual machine (VM) after you expose port 22 on it.
The virtctl expose
command forwards a virtual machine instance (VMI) port to a node
port and creates a service for enabled access. The following example creates
the fedora-vm-ssh
service that forwards traffic from a specific port of cluster nodes to port 22 of the <fedora-vm>
virtual
machine.
You must be in the same project as the VMI.
The VMI you want to access must be connected
to the default pod network by using the masquerade
binding method.
The VMI you want to access must be running.
Install the OpenShift CLI (oc
).
Run the following command to create the fedora-vm-ssh
service:
$ virtctl expose vm <fedora-vm> --port=22 --name=fedora-vm-ssh --type=NodePort (1)
1 | <fedora-vm> is the name of the VM that you run the
fedora-vm-ssh service on. |
Check the service to find out which port the service acquired:
$ oc get svc
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
fedora-vm-ssh NodePort 127.0.0.1 <none> 22:32551/TCP 6s
+
In this example, the service acquired the 32551
port.
Log in to the VMI via SSH. Use the ipAddress
of any of the cluster
nodes and the port that you found in the previous step:
$ ssh username@<node_IP_address> -p 32551
The virtctl console
command opens a serial console to the specified virtual
machine instance.
The virt-viewer
package must be installed.
The virtual machine instance you want to access must be running.
Connect to the serial console with virtctl
:
$ virtctl console <VMI>
The virtctl
client utility can use the remote-viewer
function to open a
graphical console to a running virtual machine instance. This capability is
included in the virt-viewer
package.
The virt-viewer
package must be installed.
The virtual machine instance you want to access must be running.
If you use |
Connect to the graphical interface with the virtctl
utility:
$ virtctl vnc <VMI>
If the command failed, try using the -v
flag to collect
troubleshooting information:
$ virtctl vnc <VMI> -v 4
The Remote Desktop Protocol (RDP) provides a better console experience for connecting to Windows virtual machines.
To connect to a Windows virtual machine with RDP, specify the IP address of the attached L2 NIC to your RDP client.
A running Windows virtual machine with the QEMU guest agent installed. The
qemu-guest-agent
is included in the VirtIO drivers.
A layer 2 NIC attached to the virtual machine.
An RDP client installed on a machine on the same network as the Windows virtual machine.
Log in to the OpenShift Virtualization cluster through the oc
CLI tool as a user with
an access token.
$ oc login -u <user> https://<cluster.example.com>:8443
Use oc describe vmi
to display the configuration of the running
Windows virtual machine.
$ oc describe vmi <windows-vmi-name>
...
spec:
networks:
- name: default
pod: {}
- multus:
networkName: cnv-bridge
name: bridge-net
...
status:
interfaces:
- interfaceName: eth0
ipAddress: 198.51.100.0/24
ipAddresses:
198.51.100.0/24
mac: a0:36:9f:0f:b1:70
name: default
- interfaceName: eth1
ipAddress: 192.0.2.0/24
ipAddresses:
192.0.2.0/24
2001:db8::/32
mac: 00:17:a4:77:77:25
name: bridge-net
...
Identify and copy the IP address of the layer 2 network interface. This is
192.0.2.0
in the above example, or 2001:db8::
if you prefer IPv6.
Open an RDP client and use the IP address copied in the previous step for the connection.
Enter the Administrator user name and password to connect to the Windows virtual machine.