Correct VM existance check on WSL

Replaces GetHyperVisorVMs() with Exists() to better abstract the underlying
use-case and slightly imrpove efficiency.

Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
This commit is contained in:
Jason T. Greene
2024-02-13 21:37:56 -06:00
parent 07779e09f6
commit d23dd35dc1
6 changed files with 12 additions and 30 deletions

View File

@ -74,9 +74,9 @@ func (a AppleHVStubber) CreateVM(opts define.CreateVMOpts, mc *vmconfigs.Machine
return resizeDisk(mc, strongunits.GiB(mc.Resources.DiskSize))
}
func (a AppleHVStubber) GetHyperVisorVMs() ([]string, error) {
func (a AppleHVStubber) Exists(name string) (bool, error) {
// not applicable for applehv
return nil, nil
return false, nil
}
func (a AppleHVStubber) MountType() vmconfigs.VolumeMountType {