Configuring a Network Interface on a Virtual Machine

After a network interface has been added to a virtual machine you need to manually create a network interface configuration file (ifcfg) for the new interface and then reconfigure the first network interface to make the new interface recognized as the first interface.

To configure a network interface on a virtual machine

  1. Run the following command to find network interfaces which do not have an interface configuration file (ifcfg):

    # for i in $(ls -1 /sys/class/net/ | grep -v "lo") ; do [ ! -e /etc/sysconfig/network-scripts/ifcfg-${i} ] && echo "$i" ; done

  2. Use either the nmcli or the nmtui tool to create an ifcfg file:

    • nmcli tool (recommended):

      1. Run the following command to create an ifcfg file for each of the interfaces identified in the previous step:

        nmcli connection add type ethernet ifname [Interface] con-name [Interface]

        Where [Interface] corresponds to an interface name. For example:

        nmcli connection add type ethernet ifname ens193 con-name ens193
        Connection 'ens193' (620eaccd-ac71-42c1-bbb1-77bd97a1c2a3) successfully added.

    • nmtui tool:

      1. Run the command nmtui
      2. Select Edit a connection.
      3. In the list of connections, select an interface without an ifcfg file. The interface typically has a name starting with Wired connection.
      4. Click Edit and change the profile name to match the name of a network interface identified in the first step.

        For example, Before:

            Profile name   Wired Connection 2
                  Device   00:50:56:B2:8C;C6 (ens225)

        After:

            Profile name   ens225
                  Device   00:50:56:B2:8C;C6 (ens225)

      5. Modify any other configuration settings needed for the inferface.
  3. Repeat step 2 for each interface that does not have an ifcfg file.
  4. Tufin Orchestration Suite is managed on the first network interface. Discover and configure the first network interface using the following procedures:

    1. Discovering The Name of The First Network Interface
    2. Configuring Network and DNS Settings