Skip to content

Commit

Permalink
Fixes issue hashicorp#10973: checks that VMMS WMI reference is null &…
Browse files Browse the repository at this point in the history
… throws appropriately
  • Loading branch information
mrshanahan committed Jul 19, 2019
1 parent cca36d9 commit 6caa7bf
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,9 @@ function Report-ErrorVagrantVMImport {
)

$ManagementService = Get-WmiObject -Namespace 'root\virtualization\v2' -Class 'Msvm_VirtualSystemManagementService'
if($null -eq $ManagementService) {
throw 'The Hyper-V Virtual Machine Management Service (VMMS) is not running.'
}

# Relative path names will fail when attempting to import a system
# definition so always ensure we are using the full path to the
Expand Down

0 comments on commit 6caa7bf

Please sign in to comment.