Cant Ping to LXC Container in Multipass VM from MacbookPro Host

I have installed Multipass in a MacbookPro Laptop and created an Ubuntu VM. I also installed lxc client and lxc remote add ubuntuvm 192.168.64.10. I tried adding with the 10.189.6.1 IP for the VM bridge but i didnt manage. I have created an lxc container and installed prometheus and grafana.

Inside the VM curl to the prometheus works

curl http://localhost:9090/
<a href="/graph">Found</a>.

curl http://10.189.6.81:9090/
<a href="/graph">Found</a>.

but curl from the Host has error

curl http://10.189.6.81:9090/
curl: (7) Failed to connect to 10.189.6.81 port 9090 after 6 ms: Couldn't connect to server

also trying to ping 10.189.6.1 to the Multipass Ubuntu VM using the default bridge lxdbr0 created at

lxd init
but when i ping 192.168.64.10 host bridge it works.
the same applies to trying to ssh into the multipass VM.

multipass info ubuntuvm
Name:           ubuntuvm
State:          Running
IPv4:           192.168.64.10
                10.189.6.1
Release:        Ubuntu 23.04
Image hash:     1e35473cea5e (Ubuntu 23.04)
CPU(s):         1
Load:           0.05 0.02 0.00
Disk usage:     12.9GiB out of 96.9GiB
Memory usage:   1.1GiB out of 7.7GiB
Mounts:         --

lxc ls
+-----------+---------+---------------------+-----------------------------------------------+-----------+-----------+
|   NAME    |  STATE  |        IPV4         |                     IPV6                      |   TYPE    | SNAPSHOTS |
+-----------+---------+---------------------+-----------------------------------------------+-----------+-----------+
| metrics   | RUNNING | 10.189.6.81 (eth0)  | fd42:b872:2802:c310:216:3eff:fe94:be08 (eth0) | CONTAINER | 0         |
+-----------+---------+---------------------+-----------------------------------------------+-----------+-----------+

how can i solve this?

Hi @andodeki, thanks for reporting!

IIUC, the traffic from to 192.168.64.0 is routed through the Multipass bridge, created for bridging the physical interface. The default non-bridged interface on the VM is used by the daemon to connect to the instance, but there is no guarantee that any package from outside the Multipass internal network will correctly reach this interface.

Let me point out that we are currently experimenting with networks, and will take this use case into account.

Hi @luisp. Thank you for taking time to reply to my concern.
So in short ideally i cant access the prometheus server in the lxc container from the host or to the outside world unless i am in the Multipass VM?

hey @andodeki i am not an expert but this looks (specifically the ping/ssh issue) like the bridge configuration or firewall settings are wrong. i’m thinking you can try verifying that the lxdbr0 bridge is correctly configured and connected to the Multipass VM. like this:
sudo brctl show lxdbr0

Hi @andodeki,
I think you need to access your instance using the IP 192.168.64.10, because that address is routed through your local network. Please let me know if that works. Thanks!

you mean like this below

curl http://192.168.64.10:9090/

@junk-dog here is the output

Yes, that’s what I mean. Is that working?

Its not woking even with curl

Oh, I see. Two thoughts here: first, are you using firewall or VPN? Second, it seems the connection was somehow refused by the server; are connections from outside allowed by the software on port 9090?

No VPNs and Firewall is Off

I have installed prometheus using this guide
https://documentation.ubuntu.com/lxd/en/latest/metrics/
No where in the guide shows to expose the software to outside IP.

Unless i am getting something wrong
I have these two configuration from the link guide but nothing yet

lxc config set core.metrics_address “192.0.2.101:8444”
lxc config set core.metrics_address “:8444”

$ curl http://10.189.6.81:8443/
Client sent an HTTP request to an HTTPS server.
$ lxc config set core.metrics_address “:8444”
$ curl http://10.189.6.81:8443/
Client sent an HTTP request to an HTTPS server.
$ lxc config set core.metrics_address “192.168.64.10:8444”
Error: Cannot listen on http socket: Bind network address: listen tcp 192.168.64.10:8444: bind: cannot assign requested address
$ curl http://10.189.6.81:8443/metrics
Client sent an HTTP request to an HTTPS server.
$ curl http://192.168.64.10:8443/metrics
curl: (7) Failed to connect to 192.168.64.10 port 8443 after 0 ms: Couldn’t connect to server
$ lxc config set core.metrics_address “:8444”
$ curl http://192.168.64.10:8443/metrics
curl: (7) Failed to connect to 192.168.64.10 port 8443 after 0 ms: Couldn’t connect to server
$ curl http://10.189.6.81:8443/metrics
Client sent an HTTP request to an HTTPS server.

@luisp any ideas here kindly

@andodeki, the instance can be talked to just fine, as the info command in your first post shows. I don’t see anything pointing to Multipass’s involvement in that “connection refused” problem, so there isn’t much we can do to help.

Might be a firewall or misconfiguration of whatever is listening on that port, there is no way we can tell. If you find any evidence that Multipass is to blame, please let us know.

its a new MacOS Ventura Installation