Get started - a hands-on introduction to Multipass for new users.

1 Like


I am new to multipass and am trying to configure things such that my personal machine on my LAN can directly access the VMs created in multipass. I have an Ubuntu Linux server where I am able to run multipass and launch VM, but given the VMs are on a private 10.x.x.x network and my machine is 192.168.1.x, I cannot connect directly to the VMs.

I have gone through the documentation and am clearly missing how things can be setup to make this work. I have seen references to creating a static route on my localmachine to the 10 network, but it seems there should be a better way to do this. I have also found a reference to using network-manager that results in the VMs getting an IP from the local LAN, but have not been able to get network-manager to load / make this work.

Really hoping somebody can assist me in getting the network configuration set such that I can access the VMs directly from my LAN.

Thank you!

Hey @boursawb, you need to bridge your VMs to the outside. You can achieve that using the --network option to launch, e.g.: multipass launch --network eth0. multipass networks displays available network interfaces. However, on Linux this is only supported with the LXD driver.

Have a look at this how-to for more.

1 Like

Thank you, @ricab!

I went through the tutorial, and after a few more changes (getting NetworkManager loaded, service running, etc.), I was able to launch an instance that was bridged and I could access it as expected from my multipass host as well as my local machine on the LAN - Perfect!

I assumed this information would be retained in the configuration such that if I stop and start the VM that the bridged network would remain, but this does not seem to be the case.

Is that expected behavior, or should I be able to stop/start the VMs after the initial launch and have the bridged network remain?

Is it preferred to start a VM via a cloud-init script which calls on a specific netplan each time you want to stand up a VM?

Is it not intended to remain the VMs for a period of time and start/stop them as required?

I’ve looked at several of the docs/tutorials on cloud init scripts for multipass, but there seems to be chunks of info assumed/missing and I’m struggling to put this all together.

Any info you could throw my way to help me get this sorted out/better understand how this all works and what the requirements are would be awesome!

Thank you for your time.

Hi @boursawb, you’re welcome! I am glad you got it at least partially working :slight_smile:

An instance launched with a bridged network should definitely retain it. Once generated, Multipass keeps it alone. That includes the network interface inside the instance, the cloud-init config under the hood, and the generated bridge on the host.

If this is not what you’re seeing, something is going wrong. What exactly do you observe? Missing IP? No connectivity? Did you perhaps enable a firewall in the meantime, which could be blocking DHCP?

Otherwise, would you mind filing an issue with all relevant info, so that we can better follow up? Thanks.

1 Like