mirror of
https://github.com/podman-container-tools/podman.git
synced 2026-08-05 00:15:44 +00:00
Fix lookup of HyperV VMs with matching name
Fixes https://github.com/podman-container-tools/podman/issues/29138
Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
(cherry picked from commit bec840d716)
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
parent
2012cca598
commit
cedb305e31
1 changed files with 5 additions and 0 deletions
|
|
@ -206,6 +206,11 @@ func (h HyperVStubber) Exists(name string) (bool, error) {
|
|||
|
||||
vmm := hypervctl.NewVirtualMachineManager()
|
||||
exists, _, err := vmm.GetMachineExists(name)
|
||||
if errors.Is(err, hypervctl.ErrHyperVNamespaceMissing) {
|
||||
// Hyper-V services are turned off,
|
||||
// return `false`.
|
||||
return false, nil
|
||||
}
|
||||
return exists, err
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue