Used in the past few daysCentOS-6.3-x86_64-minimal-EFI.isoThe Virtual Machine is installed in the image, and the NIC cannot be found when it is started ...... The problem has been solved. Record it here for me to check it later.
Virtual Machine network configuration options:
As you can see, the access network is selected here.
Log on to the Virtual Machine System (CentOS-6.3-x86_64-minimal-EFI), ExecuteIfconfigCommand. The output result is as follows:
There is only oneLoNic, but notEth0This is because the NIC is not started by default.
Solution:
1, Backup Nic Configuration
CD/etc/sysconfig/network-scripts/
CP ifcfg-eth0 {,. Bak}
2, Change the NIC Configuration
The default Nic configuration is as follows:
By default, it is not started.NoChangeYes, That is:
Onboot = "yes"
Here, the simplest case is used as an example. Nic configuration files have many options. For example:
1 Device = eth0 # Interface Name (device, nic) 2 Bootproto = static # IP configuration method (static: fixed IP, dhcphcp, none: manual) 3 Hwaddr = 08: 00: 27: A6: 21: 8f # MAC address 4 Onboot = Yes # Whether the network interface is valid when the system starts (Yes/No) 5 Ipaddr = 192.168.1.2 # IP address 6 Netmask = 255.255.255.0 # Subnet Mask 7 Gateway = 192.168.1.1 # Gateway address 8 Ipv6init = No # Whether IPv6 is valid (Yes/No) 9 Type = ethemet # Network type (usually ethemet)
10Dns1 = 192.168.1.1 # Configure DNS
Appendix:
Another method for configuring DNS:
VI/etc/resolv. conf
Add the following content:
Nameserver 192.168.1.1
Run the following command:
/Etc/init. d/network restart
Or
Service Network restart
3Restart the computer to verify the NIC
NicEth1Will be automatically started and obtainedIPAddress: