diff options
author | Ashley Cui <acui@redhat.com> | 2022-04-21 09:09:49 -0400 |
---|---|---|
committer | Ashley Cui <acui@redhat.com> | 2022-04-27 13:56:14 -0400 |
commit | e7390f30b95daf90c0f32e8cf963dce3f8d5cf9d (patch) | |
tree | c0b962e598a1643f6f91cfd365c04cf0dc2a2d86 /pkg/machine/config.go | |
parent | 5ac00a7287e4a9e6292f4a6ca5dfa9a02e5ca907 (diff) | |
download | podman-e7390f30b95daf90c0f32e8cf963dce3f8d5cf9d.tar.gz podman-e7390f30b95daf90c0f32e8cf963dce3f8d5cf9d.tar.bz2 podman-e7390f30b95daf90c0f32e8cf963dce3f8d5cf9d.zip |
Allow changing of CPUs, Memory, and Disk Size
Allow podman machine set to change CPUs, Memory and Disk size of a QEMU machine after its been created.
Disk size can only be increased.
If one setting fails to be changed, the other settings will still be applied.
Signed-off-by: Ashley Cui <acui@redhat.com>
Diffstat (limited to 'pkg/machine/config.go')
-rw-r--r-- | pkg/machine/config.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/pkg/machine/config.go b/pkg/machine/config.go index 1103933cd..9aa66f880 100644 --- a/pkg/machine/config.go +++ b/pkg/machine/config.go @@ -95,7 +95,10 @@ type ListResponse struct { } type SetOptions struct { - Rootful bool + CPUs *uint64 + DiskSize *uint64 + Memory *uint64 + Rootful *bool } type SSHOptions struct { @@ -118,7 +121,7 @@ type InspectOptions struct{} type VM interface { Init(opts InitOptions) (bool, error) Remove(name string, opts RemoveOptions) (string, func() error, error) - Set(name string, opts SetOptions) error + Set(name string, opts SetOptions) ([]error, error) SSH(name string, opts SSHOptions) error Start(name string, opts StartOptions) error State(bypass bool) (Status, error) |