How to configure proxy in multipass virtual machine

de flag

My host computer (macOS Monterey M1) needs to connect through a proxy, which I can configure by setting the address as an environment variable (among other places):

export https_proxy=http://.../

This allows me to run something like:

$> curl

I'd like to run Focal 20.04 in a multipass virtual machine, which I've got all setup and launched, but it doesn't appear to see the network once inside the vm.

I've added the same $https_proxy to the .bashrc file, but either with it or without it the curl command still hangs.

I've also set up a "traditional" 20.04 vm using VMware Fusion (tech preview) and making those proxy environment changes worked and the network is visible.

However, I also tried setting up a vm using UTM, which I believe uses QEMU just like multipass, and I couldn't get that to ever properly work. I didn't try that hard, but there weren't many resources, and I gave up and moved on to VMWare.

So are there any suggestions to get the proxy working in multipass? Another complication, if it matters, is I'm also running a VPN using tunnelblick and OpenVPN on the host.

If it helps, I tested the multipass vm by turning off the host VPN and disabling the proxy environment and the vm sees the network as expected, so it's for certain an issue related to proxies and/or vpn.



Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.