Instance Modification

Note: Incorporated into How to modify an instance. Please see that document instead.


Contents:

Instance properties as settings

Settings also provide a way to modify instances. While instance properties can be determined at launch, some of them can be updated after the instance has been created. Specifically, an instance’s memory, disk space, and the number of its CPUs are exposed via daemon settings: local.<instance-name>.(cpus|disk|memory).

Preconditions

Only properties of stopped, non-deleted instances can be updated, but all instances can have their properties fetched. Settings keys are therefore available for all Multipass-managed instances at that instant. Yet, trying to update an instance that is running, suspended, or deleted, results in an error.

Future

We would like to allow modifying running instances, with changes being applied on the following restart, but that will come only at a later time. Live/hot modifications – changing the properties of running instances without a restart – is not in our plans (at least for current properties). It would seldom be supported by the hypervisors Multipass supports, and add little gain.

1 Like

Can you provide an example how to do the modification?

I’ve looked in the docs, tried to get help of most commands available, but none were giving a hint how to modify an stopped instance.

Is this not possible on Windows host?

Hi @madalin,

First thing, you need a test version of Multipass that has this in order to have the instance modification functionality. You can find test packages at https://github.com/canonical/multipass/pull/2353/checks and on the left, click on Multipass CI and then click on the platform you are interested in, such as Windows.

Once you install that test package, then in a terminal, you should be able to modify existing, stopped instances. For example, if you have an instance named foo and want to increase memory to 4GB, you would do the following:

$ multipass set local.foo.memory=4GB

This functionality will be released formally in the Multipass v1.10 release which we hope to have out in a month or two.

Hope this helps!

1 Like