編輯 Linux 內 /etc/rc.local,新增 MAC 設定指令,重開機生效。
關機後編輯虛擬機 .vmx 檔,兩種情況:
ethernet0.addressType = "static"
ethernet0.address = "00:50:56:0A:0B:0C"
啟動時若詢問 UUID,選 "KeepAlways"。
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"
修改 uuid.bios 後六位與 ethernet0.generatedAddress 後六位為同一值,MAC 以 00:0c:29 開頭。
vi /etc/sysconfig/network-scripts/ifcfg-eth0
MACADDR=xx:xx:xx:xx:xx:xx
:wq 存檔離開
reboot 重開機
三種方法任選其一,皆可在 VMware 中修改 Linux 客體 MAC 位址。