修改虚拟机的物理地址

上一篇 / 下一篇  2011-03-23 16:47:51 / 个人分类:工作

最实用,快速的更改方法:

右击 我的电脑->Device Manager->Network adapters->选中某网卡,右击属性->Advanced->Locally Administered Address-> 输入想要设定的mac value->OK

转:

1、修改虚拟机的*.vmx文件.

这种方法最值得推荐,因为这样就类似于重新“烧录”了VMware虚拟机的“物理网卡ROM”。方法是:

分两种情况:

a:

ethernet0.addressType = "static"

ethernet0.Address = "00:50:56:0A:0B:0C"

"static"说明VM的"物理网卡"的MAC是静态设定的,你可以改成一个以005056开头的另外一个MAC即可。改完启动VM时如果问你SSID的话,选择“Keep Always”。

b:

ethernet0.addressType = "generated"

uuid.location = "56 4d dc f1 ff aa 75 ea-f1 b9 ee 0d 68 9c 65 5c"

uuid.bios = "56 4d ed 23 13 8c 96 91-7c 68 b2 09 8b aa bb cc"

ethernet0.generatedAddress = "00:0c:29:aa:bb:cc"

"generated"说明VM的"物理网卡"的MAC是系统随机动态设定的,你可以通过将uuid.bios后六位及ethernet0.generatedAddress后六位改成你想要改成的以000c29开头的MAC即可。

 

2、修改Linux系统里相关 /etc/sysconfig/network-scripts/ifcfg-eth0文件MAC值.

vi /etc/sysconfig/network-scripts/ifcfg-eth0

MACADDR=xx:xx:xx:xx:xx:xx

:wq 保存退出

reboot

 

3、修改Linux系统里相关rc.local文件MAC值.

可以通过改启动脚本/etc/rc.d/rc.local:

ifconfig eth0 down

ifconfig eth0 hw ether xxxxxxxxxxxx

ifconfig eth0 up

/sbin/route add default gw x.x.x.x eth0

:wq 保存退出

reboot


TAG:

 

评分:0

我来说两句

Open Toolbar