Podman machine resets all providers

Podman machine reset now removes and resets machines from all providers availabe on the platform.

On windows, if the user is does not have admin privs, machine will only reset WSL, but will emit a warning that it is unable to remove hyperV machines without elevated privs.

Signed-off-by: Ashley Cui <acui@redhat.com>
This commit is contained in:
Ashley Cui
2024-06-07 14:06:24 -04:00
parent d367d55d33
commit 069eace84b
5 changed files with 85 additions and 48 deletions

View File

@ -42,6 +42,13 @@ func Get() (vmconfigs.VMProvider, error) {
}
}
func GetAll(_ bool) ([]vmconfigs.VMProvider, error) {
return []vmconfigs.VMProvider{
new(applehv.AppleHVStubber),
new(libkrun.LibKrunStubber),
}, nil
}
// SupportedProviders returns the providers that are supported on the host operating system
func SupportedProviders() []define.VMType {
supported := []define.VMType{define.AppleHvVirt}