What's needed to access my VM using hostname.local instead of IP?

May 28, 2018
68
8
13
35
I have the latest version of Proxmox with a few containers and VMs and was wondering what if required for the other machines (Linux and Mac) to be able to reach these containers and VMs using `hostname.local` instead of using their IPs.

On a Mac, you can tyrpically use the `hostname.local` notation to find other Macs, but with Proxmox this doesn't seam to work out of the box.

I know about DNS etc, but setting up my own DNS server is overkill.

Is this a setting on the Proxmox host or a setting inside each VM / container? I believe this feature is called mDNS, but not sure how to setup and configure.

Can someone help me out here?
 

Lorenz.S

Member
Staff member
Apr 12, 2021
61
11
8
20
No, the PVE can't help you in this case. If you don't want to set up a DNS server, the simplest solution would be to edit your /etc/hosts file (Linux) to include your desired names and corresponding addresses. In Windows and MacOS there is a similar file - just ask your favorite search engine :)
 
Mar 16, 2019
247
36
33
59
California, USA
If you want your VM's to participate in the mDNS protocol you need to install it on the VM's. On Debian you would do:

apt install avahi-daemon

I think this is installed by default if you select one of the "desktop" tasks during installation. And of course your firewall has to allow the appropriate ports (sorry, I don't know which ones off the top of my head).

Other Linux distros will typically have a similar package.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE and Proxmox Mail Gateway. We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get your own in 60 seconds.

Buy now!