Ce contenu n'est pas disponible dans la langue sélectionnée.

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

Procedure

  1. Click Compute Virtual 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 Virtual Machine Network Interface dialogue entries.

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 Compute Virtual 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 Adding a 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 Compute Virtual 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 Compute Virtual 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. Configuring a virtual machine to ignore NICs

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 ignore (for example, eth0, docker0).

Procedure

  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 denylist on many virtual machines, use the configured virtual machine as a template for creating additional virtual machines. See Creating a template from an existing virtual machine for details.

Red Hat logoGithubRedditYoutubeTwitter

Apprendre

Essayez, achetez et vendez

Communautés

À propos de la documentation Red Hat

Nous aidons les utilisateurs de Red Hat à innover et à atteindre leurs objectifs grâce à nos produits et services avec un contenu auquel ils peuvent faire confiance.

Rendre l’open source plus inclusif

Red Hat s'engage à remplacer le langage problématique dans notre code, notre documentation et nos propriétés Web. Pour plus de détails, consultez leBlog Red Hat.

À propos de Red Hat

Nous proposons des solutions renforcées qui facilitent le travail des entreprises sur plusieurs plates-formes et environnements, du centre de données central à la périphérie du réseau.

© 2024 Red Hat, Inc.