I'm using packer to build a Centos7 vmware-workstation box. The packer process completes successfully with networking, however when I initialize the box with vagrant and bring it up, I see the mac address changing. The network fails to start because the mac in ifcfig-eth0 matches the packer mac address, not the vagrant.
From the build process:
./vmware.log:2015-03-30T11:21:38.486-05:00| vmx| A115: ConfigDB: Setting ethernet0.generatedAddress = "00:0c:29:43:bd:b1"
./vmware.log:2015-03-30T11:21:38.486-05:00| vmx| I120: Ethernet0 MAC Address: 00:0c:29:43:bd:b1
./packer-vmware-iso.vmx:ethernet0.generatedAddress = "00:0c:29:43:bd:b1"
During the vagrant start:
==> default: Cloning VMware VM: 'packer_vmware-iso_vmware.box'. This can take some time...
INFO vmware_driver: Cloning VM to /home/apprun/packer_projects/Centos7/.vagrant/machines/default/vmware_workstation/6d841a95-6ead-4226-9f4b-4015382d8d92
INFO vmware_driver: VMX file: /home/apprun/packer_projects/Centos7/.vagrant/machines/default/vmware_workstation/6d841a95-6ead-4226-9f4b-4015382d8d92/packer-vmware-iso.vmx
$ grep generated /home/apprun/packer_projects/Centos7/.vagrant/machines/default/vmware_workstation/6d841a95-6ead-4226-9f4b-4015382d8d92/packer-vmware-iso.vmx
ethernet0.addresstype = "generated"
ethernet0.generatedAddress = "00:0c:29:0b:fa:e5"
My guess is that the vmware clone is causing the mac address change? How do I prevent the mac address from changing?
The other issue I see is that every time I run a packer build, it is always using the same mac address: 00:0c:29:43:bd:b1.
Thanks