Change Multipass instance memory and CPU allocation after launch
I started using Multipass recently to host and run Ubuntu server instances on my MacBook Pro. I also usually pre-define the amount of vCPUs and memory that is allocated to the instance when I launch it. However, the CLI does not provide a way to change the Multipass instance memory and CPU allocation once you have launched them. Not until this new feature is provided to us.
Changing Multipass instance memory and CPU allocation
Time Needed : 5 minutes
Tl;DR: Here is how you change the Multipass instance memory and CPU allocation
Unload multipassd
sudo launchctl unload /Library/LaunchDaemons/com.canonical.multipassd.plist
Edit the multipassd-vm-instances.json file
sudo vi /var/root/Library/Application\ Support/multipassd/multipassd-vm-instances.json
Reload multipassd:
sudo launchctl load /Library/LaunchDaemons/com.canonical.multipassd.plist
Tools
- macOS Terminal app or iTerm2
- vi
Materials
- Ubuntu Multipass
The details of the steps for the uninitiated
To change the configuration of the Multipass instance, you have to do edit the multipassd-vm-instances.json config file.
But first you have to unload the multipassd service first. Otherwise, the configuration will not take hold. The following command will do that for you.
sudo launchctl unload /Library/LaunchDaemons/com.canonical.multipassd.plist
Once you’ve unloaded the multipassd service, you can now edit the multipassd-vm-instances.json file. On my Mac, it is located at /var/root/Library/Application Support/multipassd/.
sudo vi /var/root/Library/Application\ Support/multipassd/multipassd-vm-instances.json
You should see the configuration looking like the screenshot below.

Edit the mem_size or the num_cores as you require. Note that the mem_size is in bytes. Stating the obvious, doing this will change the Multipass instances memory and CPU allocation upon reload of the multipassd service.
Once done, load the the multipassd service again and you will be able to start the Multipass instance with the new memory and CPU configuration. The following command will do that for you.
sudo launchctl load /Library/LaunchDaemons/com.canonical.multipassd.plist
With that, you would have reconfigured the Multipass instances with a new memory and/or CPU allocation.


Speaking of virtualisation, find out if you can actually play Windows games on a Mac machine using Parallels Desktop.

If this post has been useful, support me by buying me a latte or two 🙂
