Setup & Purpose
I use a headless Ubuntu server as VM host running a nextcloud appliance using multipass.
I want to access the VM from another Desktop System in the same network for testing.
- local hardware server running Ubuntu LTS 16.04
- machine reachable in local network over wired ethernet under IP
192.168.168.107assigned via DHCP.
- Multipass 1.3.0 is installed and working using snap
- A Multipass instance is running Ubuntu Core 18 with the official nextcloud appliance
- guest VM is reachable only from the host system by ping via IP
There is a BigBlueButton install on the host using docker for greenlight that will show up in the network with its bridge as well but should not be relevant.
For my usecase to access the VM from Outside the host, bridging seemed to be the right way to go. Unfortunately there is almost no documentation how to set up bridging for multipass VMs except for Setups using Virtualbox and he Virtualbox bridging capabilities e.g. described for Windows. I also tried routing as described later.
I use the default Quemu virtualisation provider and it seems I need to stick with it.
I tried various approaches to setup a bridge or routing to the VM but cannot get it to work.
- the network we want to connect to: 10.252.236.0
- the subnet mask: /24
- the VM IP address: 10.252.236.79
- the IP through which we can reach the Host system server: 192.168.168.107
- the hardware network interface: enp7s0f0
route -n output::
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 192.168.168.1 0.0.0.0 UG 0 0 0 enp7s0f0 10.252.236.0 0.0.0.0 255.255.255.0 U 0 0 0 mpqemubr0 172.17.0.0 0.0.0.0 255.255.0.0 U 0 0 0 docker0 172.23.0.0 0.0.0.0 255.255.0.0 U 0 0 0 br-b874056c3ec6 192.168.168.0 0.0.0.0 255.255.255.0 U 0 0 0 enp7s0f0
I tried to find a reliable example, but cannot find something that applies to my setup.
I tried routing using on the host
sudo ip route add 10.252.236.0/24 via 192.168.168.220 dev enp7s0f0 sudo ip route add 10.252.236.79 via 192.168.168.220 dev enp7s0f0
192.168.168.220 should be the IP to reach through.
Until I revoke this, I cannot reach the VM anymore under