joefitzgerald / packer-windows

Windows Packer Templates
MIT License
1.63k stars 1.12k forks source link

Multiple NICs in Windows 2012 #171

Closed drjak closed 9 years ago

drjak commented 9 years ago

How do I create Windows 2012 with multiple interfaces? I have added to XML

with all interfaces info under specialize pass, but this do not create additional or modify existing interface. I also tried adding v.vmx["ethernet1.virtualDev"] = "vmxnet3" to vagrant template, but it doesn't create second NIC. I am using Vmware Fusion as builder and packer version 0.8.6 Thanks
drjak commented 9 years ago

I have copied ethernet0 section from VMX and this did create additional interface. ethernet0.addresstype = "generated" ethernet0.bsdname = "en0" ethernet0.connectiontype = "nat" ethernet0.displayname = "Ethernet" ethernet0.linkstatepropagation.enable = "FALSE" ethernet0.pcislotnumber = "33" ethernet0.present = "TRUE" ethernet0.virtualdev = "e1000" ethernet0.wakeonpcktrcv = "FALSE" ethernet1.addresstype = "generated" ethernet1.bsdname = "en0" ethernet1.connectiontype = "nat" ethernet1.displayname = "Ethernet" ethernet1.linkstatepropagation.enable = "FALSE" ethernet1.pcislotnumber = "33" ethernet1.present = "TRUE" ethernet1.virtualdev = "e1000" ethernet1.wakeonpcktrcv = "FALSE"

But this is not something I need, ideally I want those interfaces to be created via XML, vagrant template or json if possible.

drjak commented 9 years ago

Also tried to add below to vagrant template, but doesn't work config.vm.network "private_network", ip: "192.168.50.4" config.vm.network "private_network", ip: "192.168.50.5"