summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmd/podman/machine/platform.go2
-rw-r--r--pkg/machine/applehv/machine.go70
-rw-r--r--pkg/machine/config.go1
-rw-r--r--pkg/machine/qemu/machine.go2
4 files changed, 73 insertions, 2 deletions
diff --git a/cmd/podman/machine/platform.go b/cmd/podman/machine/platform.go
index 5ba649a48..3a7e56ac7 100644
--- a/cmd/podman/machine/platform.go
+++ b/cmd/podman/machine/platform.go
@@ -9,5 +9,5 @@ import (
)
func GetSystemDefaultProvider() machine.Provider {
- return qemu.GetQemuProvider()
+ return qemu.GetVirtualizationProvider()
}
diff --git a/pkg/machine/applehv/machine.go b/pkg/machine/applehv/machine.go
new file mode 100644
index 000000000..35a8e9851
--- /dev/null
+++ b/pkg/machine/applehv/machine.go
@@ -0,0 +1,70 @@
+//go:build arm64 && !windows && !linux
+// +build darwin
+
+package applehv
+
+import (
+ "time"
+
+ "github.com/containers/podman/v4/pkg/machine"
+)
+
+type Provider struct{}
+
+var (
+ hvProvider = &Provider{}
+ // vmtype refers to qemu (vs libvirt, krun, etc).
+ vmtype = "apple"
+)
+
+func GetVirtualizationProvider() machine.Provider {
+ return hvProvider
+}
+
+const (
+ // Some of this will need to change when we are closer to having
+ // working code.
+ VolumeTypeVirtfs = "virtfs"
+ MountType9p = "9p"
+ dockerSock = "/var/run/docker.sock"
+ dockerConnectTimeout = 5 * time.Second
+ apiUpTimeout = 20 * time.Second
+)
+
+type apiForwardingState int
+
+const (
+ noForwarding apiForwardingState = iota
+ claimUnsupported
+ notInstalled
+ machineLocal
+ dockerGlobal
+)
+
+func (p *Provider) NewMachine(opts machine.InitOptions) (machine.VM, error) {
+ return nil, machine.ErrNotImplemented
+}
+
+func (p *Provider) LoadVMByName(name string) (machine.VM, error) {
+ return nil, machine.ErrNotImplemented
+}
+
+func (p *Provider) List(opts machine.ListOptions) ([]*machine.ListResponse, error) {
+ return nil, machine.ErrNotImplemented
+}
+
+func (p *Provider) IsValidVMName(name string) (bool, error) {
+ return false, machine.ErrNotImplemented
+}
+
+func (p *Provider) CheckExclusiveActiveVM() (bool, string, error) {
+ return false, "", machine.ErrNotImplemented
+}
+
+func (p *Provider) RemoveAndCleanMachines() error {
+ return machine.ErrNotImplemented
+}
+
+func (p *Provider) VMType() string {
+ return vmtype
+}
diff --git a/pkg/machine/config.go b/pkg/machine/config.go
index 253601dad..5162006db 100644
--- a/pkg/machine/config.go
+++ b/pkg/machine/config.go
@@ -66,6 +66,7 @@ var (
ErrVMAlreadyExists = errors.New("VM already exists")
ErrVMAlreadyRunning = errors.New("VM already running or starting")
ErrMultipleActiveVM = errors.New("only one VM can be active at a time")
+ ErrNotImplemented = errors.New("functionality not implemented")
ForwarderBinaryName = "gvproxy"
)
diff --git a/pkg/machine/qemu/machine.go b/pkg/machine/qemu/machine.go
index 7974c261e..213f7ce5d 100644
--- a/pkg/machine/qemu/machine.go
+++ b/pkg/machine/qemu/machine.go
@@ -42,7 +42,7 @@ var (
vmtype = "qemu"
)
-func GetQemuProvider() machine.Provider {
+func GetVirtualizationProvider() machine.Provider {
return qemuProvider
}