虚拟机克隆注意事项

克隆虚拟机完成后需要修改的配置文件:
1.[luomk@hadoop102 opt]$ vim /etc/udev/rules.d/70-persistent-net.rules
# PCI device 0x1af4:0x1000 (virtio-pci)
#SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1c:42:31:dd:75", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# PCI device 0x1af4:0x1000 (virtio-pci)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1c:42:9b:eb:6c", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
 将上面的第二行注释,第四行中的NAME=“eth*”修改为NAME=“eth0”

2.vim /etc/sysconfig/network-scripts/-eth0 
DEVICE="eth0"
BOOTPROTO=static
NM_CONTROLLED=yes
ONBOOT=yes
TYPE=Ethernet
IPADDR=10.211.55.102
GATEWAY=192.168.55.2
DNS1=192.168.55.2
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
NAME="System eth0"
HWADDR=00:1c:42:04:ed:28
 修改之后为
DEVICE="eth0"
BOOTPROTO=static
NM_CONTROLLED="yes"
ONBOOT="yes"
TYPE="Ethernet"
IPADDR=10.211.55.103
GATEWAY=10.211.55.1
DNS1=10.211.55.1
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
NAME="System eth0"
HWADDR=00:1c:42:9b:eb:6c
    把旧网卡信息注释掉,把新网卡信息中的设备名称从 eth1 改成 eth0。复制新网卡的 ATTR{address}值,这是它的 MAC 地址。
    注意:一定要 reboot 才能够生效

3.修改主机名:    
NETWORKING=yes
HOSTNAME=localhost.localdomain
 
4.重启:service network restart

你可能感兴趣的:(#,Hadoop)