On This Page
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
-
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
-
Use either the
nmcli
or thenmtui
tool to create anifcfg
file:-
nmcli
tool (recommended): -
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:- Run the command nmtui
- Select Edit a connection.
- In the list of connections, select an interface without an
ifcfg
file. The interface typically has a name starting withWired connection
. -
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
Device00:50:56:B2:8C;C6 (ens225)
After:
Profile name
ens225
Device00:50:56:B2:8C;C6 (ens225)
- Modify any other configuration settings needed for the inferface.
-
- Repeat step 2 for each interface that does not have an
ifcfg
file. -
Tufin Orchestration Suite is managed on the first network interface. Discover and configure the first network interface using the following procedures: