This commit adds a new option, `vmx_remove_ethernet_interfaces`, to both
of the VMWare builders. This is useful when building Vagrant boxes,
since Vagrant now produces output such as:
```
WARNING: The VMX file for this box contains a setting that is
automatically overwritten by Vagrant when started. Vagrant will stop
overwriting this setting in an upcoming release which may pre vent
proper networking setup. Below is the detected VMX setting:
ethernet0.pcislotnumber = "33"
If networking fails to properly configure, it may require this VMX
setting. It can be manually applied via the Vagrantfile:
Vagrant.configure(2) do |config|
config.vm.provider :vmware_fusion do |vmware|
vmware.vmx["ethernet0.pcislotnumber"] = "33"
end
end
```
This can be avoided entirely by removing the ethernet adapters from the
VMX file prior to packaging as a Vagrant box, in which case adapters are
created as expected according to the Vagrantfile specification.
Prevalidates hardware resources on Linux platforms for Virtualbox and
VMware builders. This is currently only available on Linux, as enabling
for both Darwin and Windows platforms, relies on cgo bindings that would
prevent effective cross-compilation.
Packer will now fail to build and validate templates if the template is
requesting that the VM to be created would allocate more system
resources than the host system has available.
This _however_ doesn't catch parallel builds that overflow the hosts
resources, will probably still need a better error message for VM's
failing to boot in that case.
Example Outputs:
```
$ $GOPATH/bin/packer build -debug ./vmware-iso.json
Debug mode enabled. Builds will not be parallelized.
vmware-iso output will be in this color.
2 error(s) occurred:
* Unavailable Resources: RAM - Requested - 204800000MB - Available 21721MB
* Unavailable Resources: Disk - Requested - 4000000000MB - Available 76701MB
```
```
$ $GOPATH/bin/packer build -debug ./vbox-iso.json
Debug mode enabled. Builds will not be parallelized.
virtualbox-iso output will be in this color.
2 error(s) occurred:
* Unavailable Resources: RAM - Requested - 10240000MB - Available 21721MB
* Unavailable Resources: Disk - Requested - 1000000000MB - Available 76701MB
```