← Back to list

Modify Multipass Instances: Update Resources and Share Data with Instance

Modify CPUs, disk and memory sizes of multipass instance and share data with instance.

Karan Bishwakarma · 2024-05-07 07:01 · 1 claps · 3.3 min read
#multipass #ubuntu #virtual-machine #software-deployment
Open on Medium ↗
Wiki topics: 🔓 · Open Source

Modify Multipass Instances: Update Resources and Share Data with Instance

As I showed in previous blog A Beginner’s Guide to Multipass: Create and Manage Ubuntu VMs in Minutes, creating ubuntu instances is simple and straightforward. Once you deploy your instances, chances are you might need to modify them. Maybe you underestimated the resource needs or your workload has changed.

While thought of recreating the instance from scratch can be tempting, but it’s not always practical. With Multipass, its just few CLI commands and you can alter the instance setup and configuration. This blog shows how we can modify instance resources like disk, memory size or CPUs and also how data can be shared between host machine and instances.

Modify Disk and Memory sizes

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).

To get the list of properties of the instances, you can use multipass get command . This will list out all the properties you can modify for available instances

To modify one of these properties, first stop the instance and then issue the multipass set command and set required resources as shown below

When increasing the disk size of an instance, the partition may not expand automatically to use the new available space. This usually happens if the partition was already full when trying to increase the disk size. In such cases, the partition must be expanded manually, as follows.

Only properties of stopped, non-deleted instances can be updated, but trying to update an instance that is running, suspended, or deleted, results in an error. You can read more about modify other configuration on Manage Instances documentation.

Share Data with Instance

Sharing data between your host machine and your VMs is another common scenario. Multipass makes it convenient through simple CLI commands. There are two methods: mounting and transferring.

Using mount (Recommended):

This method allows your host folders to be accessible within the instance. Suppose you have a local folder named “local_folder” that you want to access on your “myUbuntuInstance” VM, simply run:

multipass mount local_folder myUbuntuIstance

This will mount your local folder in the instance. You can verify it using multipass info

You can also specify the exact path within the instance where you want the local folder to be mounted,

Mounts can also be defined during instance creation using the launch command with the --mount option.

multipass launch --mount /some/local/path:/some/instance/path

You can mount as multiple directories to instances from local to instance.

The umount command allows you to detach previously mounted local directories from the VM. Specify the desired path to unmount a specific directory, or omit the path to unmount all mounted directories.

  • unmount all
multipass unmount myUbuntuInstance

z

z

  • unmount specific/folder

Using transfer (File Copying):

This method is useful for simply copying files back and forth between host and instances. If a file is inside an instance, prefix its path with <instance name>:

transfer file from instance to local

With Multipass, modifying existing Ubuntu VMs and sharing data between your host and instances is easy and straightforward. Leraging the power of CLI commands, you can efficiently manage your resources and keep your virtualized workflow running smoothly.


메타데이터
post_id
c17315dd33d0
slug
modify-multipass-instances-update-resources-and-share-data-with-instance-c17315dd33d0
url
https://medium.com/@karan.bk/modify-multipass-instances-update-resources-and-share-data-with-instance-c17315dd33d0
canonical_url
https://medium.com/@karan.bk/modify-multipass-instances-update-resources-and-share-data-with-instance-c17315dd33d0
author_url
https://medium.com/@karan.bk
status
ok
fetched_at
2026-07-23 22:13:10