diff options
author | Jason T. Greene <jason.greene@redhat.com> | 2022-01-29 03:10:28 -0600 |
---|---|---|
committer | Jason T. Greene <jason.greene@redhat.com> | 2022-02-16 03:49:17 -0600 |
commit | c74f8f04fd368ce74e35cc081e32133f7502d89e (patch) | |
tree | 1a098c2671edeaef87996fcdad018d1171122d41 /pkg/machine/config.go | |
parent | 8f5ba05ec4e0f58da80137f24fcb4ab27a2998fe (diff) | |
download | podman-c74f8f04fd368ce74e35cc081e32133f7502d89e.tar.gz podman-c74f8f04fd368ce74e35cc081e32133f7502d89e.tar.bz2 podman-c74f8f04fd368ce74e35cc081e32133f7502d89e.zip |
Introduce podman machine init --root=t|f and podman machine set --root=t|f
Switch default to rootless for mac and windows
Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
Diffstat (limited to 'pkg/machine/config.go')
-rw-r--r-- | pkg/machine/config.go | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/pkg/machine/config.go b/pkg/machine/config.go index 97237f5e5..efb1eda15 100644 --- a/pkg/machine/config.go +++ b/pkg/machine/config.go @@ -27,6 +27,7 @@ type InitOptions struct { URI url.URL Username string ReExec bool + Rootful bool } type QemuMachineStatus = string @@ -35,7 +36,8 @@ const ( // Running indicates the qemu vm is running Running QemuMachineStatus = "running" // Stopped indicates the vm has stopped - Stopped QemuMachineStatus = "stopped" + Stopped QemuMachineStatus = "stopped" + DefaultMachineName string = "podman-machine-default" ) type Provider interface { @@ -89,6 +91,10 @@ type ListResponse struct { IdentityPath string } +type SetOptions struct { + Rootful bool +} + type SSHOptions struct { Username string Args []string @@ -107,6 +113,7 @@ type RemoveOptions struct { type VM interface { Init(opts InitOptions) (bool, error) Remove(name string, opts RemoveOptions) (string, func() error, error) + Set(name string, opts SetOptions) error SSH(name string, opts SSHOptions) error Start(name string, opts StartOptions) error Stop(name string, opts StopOptions) error |