Score:0

How to connect to UTM VM exposed port from the host?

US flag

I have a windows VM set up with UTM on my M1 mac but cannot access it event though it is set on shared network in the preferences.

I've tried localhost:5432, 127.0.0.1:5432... with no success.

settings of UTM showing shared network

Benoît P avatar
md
I felt like managing server VMs and networking would be best suited for ServerVault. Sad to see it marked as off-topic since it's not really suited to Stack Overflow or Super User
Score:0
US flag

Running Get-NetIPAddress in a Powershell window, I realized that even if my network was supposed to be shared with the host, my IP address was different.

powershell result

I tried 192.168.64.2:5432 and still no result...

windows settings

I disabled windows's multiple firewalls and could finally reach my server on 192.168.64.2:5432.

I do not recommend turning your firewall off entirely as it can pose a security risk but turning it off temporarily can allow you to test if it is the cause of the problem. In this case, the VM is not accessible from outside the local network of the computer so there is not much risk.

firewall disabled

Replace 192.168.64.2:5432 by the ip you found and the port of your server respectively.

I hope this can help someone and if you have a better answer, feel free to post it here.

I sit in a Tesla and translated this thread with Ai:

mangohost

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.