This guide explains how to use Multipass remotely. This can be useful, for example, if you want to run your VMs on a more powerful machine.
Expose Multipass to your network
To expose Multipass to your network, use the --address
option when starting the daemon. The syntax to use is:
multipassd --address <server_name:port>
The client accepts the MULTIPASS_SERVER_ADDRESS
environment variable that overrides the default:
MULTIPASS_SERVER_ADDRESS=<hostname>:51001 multipass find
Sample output:
Image Aliases Version Description
...
21.10 impish 20220118 Ubuntu 21.10
Caveats:
- Because mounts are executed as privileged users, it is recommended to use client authentication to explicitly grant access to clients via a shared passphrase. See How to authenticate clients with the Multipass service.
Alternatively, you can use the commandmultipass set local.privileged-mounts=false
to disable the mounts feature altogether. - The
multipass mount
command takes a target filepath which is resolved daemon-side, meaning that directories are mounted from the system that the daemon is running on, not the client. - Some commands (
shell
,exec
,mount
) currently rely on direct networking between the client and the instance. For these to work, you’ll need to ensure routing between them is possible.
Change the daemon settings
You can run the command systemctl edit snap.multipass.multipassd.service
and place content along these lines (replace <hostname>
with the hostname or the IP you want it to listen on) in:
[Service]
ExecStart=
ExecStart=/usr/bin/snap run multipass.multipassd --address <hostname>:51005
Restart the service:
snap stop multipass
snap start multipass
On macOS you’ll need to add it to the service definition (again, replace <hostname>
) and reload it:
sudo /usr/libexec/PlistBuddy \
-c "Add :ProgramArguments: string --address" \
-c "Add :ProgramArguments: string <hostname>:51001" \
/Library/LaunchDaemons/com.canonical.multipassd.plist
sudo launchctl unload /Library/LaunchDaemons/com.canonical.multipassd.plist
sudo launchctl load /Library/LaunchDaemons/com.canonical.multipassd.plist
Reinstalling or upgrading Multipass will overwrite these changes.
On Windows you’d need to edit/recreate the service definition, and that’s non-trivial (if you do, remember to pass /svc
as the first argument to the multipassd.exe
binary, and that we currently use the LocalService
account)…
As a one-time thing you can use the Start parameters field in the Services panel after stopping the service: