hashicorp / packer-plugin-hyperv

Packer plugin for Hyper-V Builder
https://www.packer.io/docs/builders/hyperv
Mozilla Public License 2.0
19 stars 24 forks source link

Allow multiple nics to be connected to VM #114

Closed remi-espie closed 5 months ago

remi-espie commented 1 year ago

This allows Packer to create and allocate multiple nics to a VM through switches_names array. switch_name is still available to ensure backward compatibility. It also adds mac_addresses array, which will give the first element as a mac address to the first switch of switches_names, the 2nd element to the 2nd switch, etc.

This is quite bare bone, only creating, adding and deleting (if needed) multiple nics the the VM. This answer some of #86 needs but not all of them so I'm not marking it as closed.

Personally tested and working in the following cases:

hashicorp-cla commented 1 year ago

CLA assistant check
All committers have signed the CLA.

remi-espie commented 10 months ago

sorry about both last commits, some git mistakes by my side. They were removed by a push force, don't take them into account.

galthaus commented 8 months ago

Hi All, I need this too. I'm working on an update that implements what the commenters suggested as the better way.

It is much larger change. I'll submit it as a separate PR against main.

Thanks, Greg