hashicorp / packer-plugin-hyperv

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

Fix Host IP detection on Windows 11, 22H2. #87

Closed machv closed 1 year ago

machv commented 1 year ago

Starting with version 22H2 of Windows 11 (build 22621+) there is once again a change in how vNics used with Default Switch NAT connectivity are used. They are now hidden both in GUI (ncpa.cpl) and in PowerShell output of Get-NetAdapter command. Therefore parameter -IncludeHidden is now required to properly detect the IP address of a host machine when using Default Switch for building with Hyper-V.

This change should be backwards compatible with previous versions of Windows.