In a terminal window on the newly
added virtual machine instance:
- If you don't know the Ethernet port name for the virtual machine, run this command: ifconfig
-
Change directories: cd /etc/sysconfig/network-scripts/
- Identify the configuration file for Ethernet port.
The file name has this format: ifcfg-<Ethernet-port-name>
- In the Ethernet configuration file, specify values for IPADDR, GATEWAY, and DNS1. Leave the other values as they are.
-
Restart the network. Run: sudo /etc/init.d/network
restart
- Verify that the Ethernet configuration was updated correctly. Run: ifconfig