The QEMU guest agent runs on the virtual machine and passes the IP address of attached NICs to the host, allowing you to view the IP address from both the web console and the oc client.


  1. Verify that the guest agent is installed and running by entering the following command:

    $ systemctl status qemu-guest-agent
  2. If the guest agent is not installed and running, install and run the guest agent on the virtual machine.

Viewing the IP address of a virtual machine interface in the CLI

The network interface configuration is included in the oc describe vmi <vmi_name> command.

You can also view the IP address information by running ip addr on the virtual machine, or by running oc get vmi <vmi_name> -o yaml.

  • Use the oc describe command to display the virtual machine interface configuration:

    $ oc describe vmi <vmi_name>
    Example output
       Interface Name:  eth0
       Ip Address:
       Ip Addresses:
       Mac:             0a:58:0a:f4:00:25
       Name:            default
       Interface Name:  v2
       Ip Address:
       Ip Addresses:
       Mac:             f6:d9:70:13:90:89
       Interface Name:  v1
       Ip Address:
       Ip Addresses:
       Mac:             16:20:84:10:17:aa

Viewing the IP address of a virtual machine interface in the web console

The IP information displays in the Virtual Machine Overview screen for the virtual machine.

  1. In the OpenShift Virtualization console, click WorkloadsVirtualization from the side menu.

  2. Click the Virtual Machines tab.

  3. Select a virtual machine name to open the Virtual Machine Overview screen.

The information for each attached NIC is displayed under IP Address.