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 VirtualizationException TypeNotFound in get_vm_status.ps1 #6882

Closed
brucificus opened this issue Jan 17, 2016 · 3 comments
Closed

HyperV VirtualizationException TypeNotFound in get_vm_status.ps1 #6882

brucificus opened this issue Jan 17, 2016 · 3 comments

Comments

@brucificus
Copy link

Using Vagrant 1.8.1 on Windows 8.1.

Running vagrant up immediately fails:

An error occurred while executing a PowerShell script. This error
is shown below. Please read the error message and see if this is
a configuration error with your system. If it is not, then please
report a bug.

Script: get_vm_status.ps1
Error:

C:\HashiCorp\Vagrant\embedded\gems\gems\vagrant-1.8.1\plugins\providers\hyperv\scripts\get_vm_status.ps1 : Unable to find type
[Microsoft.HyperV.PowerShell.VirtualizationException]. Make sure that the assembly that contains this type is loaded.
At line:1 char:1
+ &('C:\HashiCorp\Vagrant\embedded\gems\gems\vagrant-1.8.1\plugins\providers\hyper ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (Microsoft.Hyper...zationException:TypeName) [get_vm_status.ps1], RuntimeException
    + FullyQualifiedErrorId : TypeNotFound,get_vm_status.ps1

Reproduction steps:

  1. Run vagrant up
  2. Use Hyper-V manager to delete VM instead of vagrant destroy
  3. Run vagrant up again - error occurs

Workaround:
If I manually edit get_vm_status.ps1 to catch exception type Exception instead of Microsoft.HyperV.PowerShell.VirtualizationException, vagrant up appears to work normally.

@tomfanning
Copy link
Contributor

+1 me too, intermittently, when running many vagrant ups in parallel

@PierrickLozach
Copy link

+1. Happened after I ran vagrant destroy -f followed by a vagrant up

@s0lucien
Copy link

s0lucien commented Jun 20, 2016

This should be fixed by #7487

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

No branches or pull requests

5 participants