Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hyperv builder fails unless virtual switch adapter is shared with the management operating system #4947

Closed
serveradmin99 opened this issue May 31, 2017 · 2 comments · Fixed by #7480

Comments

@serveradmin99
Copy link

I am getting the following error whilst attempting to build a machine:

2017/05/31 16:58:58 ui error: ==> hyperv-iso: Error getting host adapter ip address: PowerShell error: Get-VMNetworkAdapter : No network adapter is found with the given input.
==> hyperv-iso: At C:\Users\ServerAdmin\AppData\Local\Temp\ps675653695.ps1:4 char:18
==> hyperv-iso: + $HostVMAdapter = Get-VMNetworkAdapter -ManagementOS -SwitchName $switchName
==> hyperv-iso: + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
==> hyperv-iso: + CategoryInfo : ObjectNotFound: (Jacobs LAN Virtual Switch:Strin
==> hyperv-iso: g) [Get-VMNetworkAdapter], VirtualizationOperationFailedException
==> hyperv-iso: + FullyQualifiedErrorId : ObjectNotFound,Microsoft.HyperV.PowerShell.Comma
==> hyperv-iso: nds.GetVMNetworkAdapterCommand

Note that this issue does not occur when the virtual switch adapter is shared with the management operating system, however Microsoft best practice says to not share with the management operating system. There must be another method of getting the host IP address.

@taliesins
Copy link
Collaborator

There is another issue that duplicates this one. The other one has more content so I am closing this one.

BobSilent added a commit to BobSilent/packer that referenced this issue Apr 3, 2019
maybe also a fix for issue hashicorp#5023
at least I got same error like there, incl. VM response
==> hyperv-iso: Host IP for the HyperV machine: False

although hashicorp#4947 is marked as duplicate but shows different error output
==> hyperv-iso: Error getting host adapter ip address: PowerShell error: Get-VMNetworkAdapter : No network adapter is found with the given input.
BobSilent added a commit to BobSilent/packer that referenced this issue Apr 9, 2019
maybe also a fix for issue hashicorp#5023
at least I got same error like there, incl. VM response
==> hyperv-iso: Host IP for the HyperV machine: False

although hashicorp#4947 is marked as duplicate but shows different error output
==> hyperv-iso: Error getting host adapter ip address: PowerShell error: Get-VMNetworkAdapter : No network adapter is found with the given input.
@ghost
Copy link

ghost commented Apr 3, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants