Red Hat Training

A Red Hat training course is available for Red Hat Virtualization

5.2. Network Interfaces

5.2.1. Adding a New Network Interface

You can add multiple network interfaces to virtual machines. Doing so allows you to put your virtual machine on multiple logical networks.

Note

You can create an overlay network for your virtual machines, isolated from the hosts, by defining a logical network that is not attached to the physical interfaces of the host. For example, you can create a DMZ environment, in which the virtual machines communicate among themselves over the bridge created in the host.

The overlay network uses OVN, which must be installed as an external network provider. See the Administration Guide for more information

Adding Network Interfaces to Virtual Machines

  1. Click ComputeVirtual Machines.
  2. Click a virtual machine name to go to the details view.
  3. Click the Network Interfaces tab.
  4. Click New.
  5. Enter the Name of the network interface.
  6. Select the Profile and the Type of network interface from the drop-down lists. The Profile and Type drop-down lists are populated in accordance with the profiles and network types available to the cluster and the network interface cards available to the virtual machine.
  7. Select the Custom MAC address check box and enter a MAC address for the network interface card as required.
  8. Click OK.

The new network interface is listed in the Network Interfaces tab in the details view of the virtual machine. The Link State is set to Up by default when the network interface card is defined on the virtual machine and connected to the network.

For more details on the fields in the New Network Interface window, see Section A.3, “Explanation of Settings in the New Network Interface and Edit Network Interface Windows”.

5.2.2. Editing a Network Interface

In order to change any network settings, you must edit the network interface. This procedure can be performed on virtual machines that are running, but some actions can be performed only on virtual machines that are not running.

Editing Network Interfaces

  1. Click ComputeVirtual Machines.
  2. Click a virtual machine name to go to the details view.
  3. Click the Network Interfaces tab and select the network interface to edit.
  4. Click Edit.
  5. Change settings as required. You can specify the Name, Profile, Type, and Custom MAC address. See Section 5.2.1, “Adding a New Network Interface”.
  6. Click OK.

5.2.3. Hot Plugging a Network Interface

You can hot plug network interfaces. Hot plugging means enabling and disabling devices while a virtual machine is running.

Note

The guest operating system must support hot plugging network interfaces.

Hot Plugging Network Interfaces

  1. Click ComputeVirtual Machines and select a virtual machine.
  2. Click the virtual machine’s name to go to the details view.
  3. Click the Network Interfaces tab and select the network interface to hot plug.
  4. Click Edit.
  5. Set the Card Status to Plugged to enable the network interface, or set it to Unplugged to disable the network interface.
  6. Click OK.

5.2.4. Removing a Network Interface

Removing Network Interfaces

  1. Click ComputeVirtual Machines.
  2. Click a virtual machine name to go to the details view.
  3. Click the Network Interfaces tab and select the network interface to remove.
  4. Click Remove.
  5. Click OK.

5.2.5. Blacklisting Network Interfaces

You can configure the ovirt-guest-agent on a virtual machine to ignore certain NICs. This prevents IP addresses associated with network interfaces created by certain software from appearing in reports. You must specify the name and number of the network interface you want to blacklist (for example, eth0, docker0).

Important

You must blacklist NICs on the virtual machine before the guest agent is started for the first time.

Blacklisting Network Interfaces

  1. In the /etc/ovirt-guest-agent.conf configuration file on the virtual machine, insert the following line, with the NICs to be ignored separated by spaces:

    ignored_nics = first_NIC_to_ignore second_NIC_to_ignore
  2. Start the agent:

    # systemctl start ovirt-guest-agent
Note

Some virtual machine operating systems automatically start the guest agent during installation.

If your virtual machine’s operating system automatically starts the guest agent or if you need to configure the blacklist on many virtual machines, use the configured virtual machine as a template for creating additional virtual machines. See Section 7.2, “Creating a Template” for details.