Skip to content

Commit

Permalink
replacing deprecated Get-Wimobject with Get-CmiInstance to detect Hyp…
Browse files Browse the repository at this point in the history
…er-V availability
  • Loading branch information
NikhilSharmaWe committed Feb 10, 2022
1 parent 10d2413 commit 49e2af6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/minikube/registry/drvs/hyperv/hyperv.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func status() registry.State {
ctx, cancel := context.WithTimeout(context.Background(), 8*time.Second)
defer cancel()

cmd := exec.CommandContext(ctx, path, "-NoProfile", "-NonInteractive", "@(Get-Wmiobject Win32_ComputerSystem).HypervisorPresent")
cmd := exec.CommandContext(ctx, path, "-NoProfile", "-NonInteractive", "@(Get-CimInstance Win32_ComputerSystem).HypervisorPresent")
out, err := cmd.CombinedOutput()

if err != nil {
Expand Down

0 comments on commit 49e2af6

Please sign in to comment.