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

Fixing version check and catch statement in get_vm_status #7487

Merged
merged 1 commit into from
Jun 19, 2016

Conversation

codekaizen
Copy link

Use the version of Hyper-V instead of Powershell to determine which
exception is thrown by Get-VM. Also fixing an invalid catch statement,
since Powershell can not use variables to match thrown exceptions in
catch.

Use the version of Hyper-V instead of Powershell to determine which
exception is thrown by Get-VM. Also fixing an invalid catch statement,
since Powershell can not use variables to match thrown exceptions in
catch.
@codekaizen
Copy link
Author

This is an additional fix to the issue #7447, which duplicates the catch statement fix, but also works on Windows 2012 server which has a different version of Hyper-V.

@mwrock
Copy link
Contributor

mwrock commented Jun 19, 2016

👍 this looks good to me and works well on my win 10 machine. I can also confirm the version check is correct for win 2012r2 both with and without wmf5.

@sethvargo sethvargo merged commit 49f2a0e into hashicorp:master Jun 19, 2016
@sethvargo sethvargo mentioned this pull request Jun 19, 2016
@sethvargo
Copy link
Contributor

Thanks!

@M-OC
Copy link

M-OC commented Jul 6, 2016

+1

Thanks a lot!

@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.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants