Skip to content

Commit

Permalink
Merge pull request #566 from rmoriz/rmoriz/packer-vmx-predictable-net…
Browse files Browse the repository at this point in the history
…working

vmware: tie network device to pci slot 32, see #554
  • Loading branch information
Seth Thomas committed Apr 21, 2016
2 parents 9b7dcda + 284f214 commit bd338e0
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,21 @@ Once test-kitchen changes defaults the S3 buckets will no longer be updated.
* Parallels: 11.1.3


#### VMWare Fusion 8, Packer, systemd

Recent Linux distributions use [systemd's logic to predictably name network devices](https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/). In our scenario, this is tied to the PCI slot
id. For unknown reasons, boxes built with [the default vmx config provided by packer](https://github.com/mitchellh/packer/blob/e868f9b69c995cf8a681847aa67e9be286243630/builder/vmware/iso/step_create_vmx.go#L167) use a different
PCI slot id (32 instead of 33) once they got imported to VMWare Fusion 8, which results in a different device name and finally in broken
networking. This issue is documented in the following places:

- https://github.com/chef/bento/issues/554
- https://github.com/chef/bento/pull/545#issuecomment-202988690
- https://github.com/mitchellh/vagrant/issues/4590

As a workaround we've started to provide the changed PCI slot id as a custom value with the packer definitions with Ubuntu 15.10+ and Debian 8.4+.
However this is not yet tested, may not solve the issue and/or break compatibility with other VMWare
products/versions!

## Older Boxes

Older boxes include Chef and therefore are not compatible with some
Expand Down
1 change: 1 addition & 0 deletions debian-8.4-amd64.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
"vm_name": "{{ user `template` }}",
"vmx_data": {
"cpuid.coresPerSocket": "1",
"ethernet0.pciSlotNumber": "32",
"memsize": "384",
"numvcpus": "1"
}
Expand Down
1 change: 1 addition & 0 deletions debian-8.4-i386.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
"vm_name": "{{ user `template` }}",
"vmx_data": {
"cpuid.coresPerSocket": "1",
"ethernet0.pciSlotNumber": "32",
"memsize": "384",
"numvcpus": "1"
}
Expand Down
1 change: 1 addition & 0 deletions ubuntu-15.10-amd64.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@
"vm_name": "{{ user `template` }}",
"vmx_data": {
"cpuid.coresPerSocket": "1",
"ethernet0.pciSlotNumber": "32",
"memsize": "384",
"numvcpus": "1"
}
Expand Down
1 change: 1 addition & 0 deletions ubuntu-15.10-i386.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@
"vm_name": "{{ user `template` }}",
"vmx_data": {
"cpuid.coresPerSocket": "1",
"ethernet0.pciSlotNumber": "32",
"memsize": "384",
"numvcpus": "1"
}
Expand Down

0 comments on commit bd338e0

Please sign in to comment.