mirror of
https://github.com/containers/podman.git
synced 2025-11-02 14:55:28 +08:00
Podman 5 machine refactor - applehv
this is the second provider done (qemu first). all tests pass on arm64 hardware locally ... the hybrid pull from oci registries limit this to arm64 only. calling gvproxy, waiting for it, and then vfkit seems to still be problematic. this would be an area that should be cleaned up once all providers are implemented. Signed-off-by: Brent Baude <bbaude@redhat.com>
This commit is contained in:
@ -5,14 +5,13 @@ import (
|
||||
"os"
|
||||
|
||||
"github.com/containers/common/pkg/config"
|
||||
"github.com/containers/podman/v4/pkg/machine"
|
||||
"github.com/containers/podman/v4/pkg/machine/applehv"
|
||||
"github.com/containers/podman/v4/pkg/machine/define"
|
||||
"github.com/containers/podman/v4/pkg/machine/qemu"
|
||||
"github.com/containers/podman/v4/pkg/machine/vmconfigs"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
func Get() (machine.VirtProvider, error) {
|
||||
func Get() (vmconfigs.VMProvider, error) {
|
||||
cfg, err := config.Default()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@ -28,10 +27,8 @@ func Get() (machine.VirtProvider, error) {
|
||||
|
||||
logrus.Debugf("Using Podman machine with `%s` virtualization provider", resolvedVMType.String())
|
||||
switch resolvedVMType {
|
||||
case define.QemuVirt:
|
||||
return qemu.VirtualizationProvider(), nil
|
||||
case define.AppleHvVirt:
|
||||
return applehv.VirtualizationProvider(), nil
|
||||
return new(applehv.AppleHVStubber), nil
|
||||
default:
|
||||
return nil, fmt.Errorf("unsupported virtualization provider: `%s`", resolvedVMType.String())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user