标签:blog class code size 404 style strong type 2014 view color
# vi /etc/sysconfig/network NETWORKING=yes HOSTNAME=your-vm-hostname-here
在使用virt-manager或virtual-box克隆了RHEL6的虚拟机之后,网卡地址需要手动更改。
首先在virt-manager中查看虚拟机属性: View->Details
Overview | Basic Details
Name: vm-rhel64-aa
UUID: 6529d110-4191-e724-9c4d-aaa5db31fefd
NIC:22:d6:4b | Virtual Network Interface
Source device: Virtual network ;default‘:NAT
Device model: virtio
MAC address: 52:54:00:22:d6:4b
记下上面的UUID和MAC.
1) 进入虚拟机,编辑文件:
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0 HWADDR=52:54:00:22:D6:4B TYPE=Ethernet UUID=6529d110-4191-e724-9c4d-aaa5db31fefd ONBOOT=yes NM_CONTROLLED=yes BOOTPROTO=dhcp
2) 删除文件:70-persistent-net.rules
# rm /etc/udev/rules.d/70-persistent-net.rules
3)重启系统
# reboot
现在虚拟机应该获得了新的hostname和MAC地址。
RHEL克隆虚拟机后改变网卡地址,码迷,mamicode.com
标签:blog class code size 404 style strong type 2014 view color
原文地址:http://blog.csdn.net/ubuntu64fan/article/details/24587287