You are not logged in.

#1 2021-12-27 14:46:54

jfabernathy
Member
From: North Carolina
Registered: 2019-01-03
Posts: 123

How to ssh into a VM using hostname.local?

My homelab is a mixture of PC, raspberry pi's, and servers all on the same subnet. I can ssh into any of them using their /etc/hostname with dot 'local' as in

ssh jim@my-server.local

However, I can't do that to any of my VM's created with virt-manager. The VMs are on an Archlinux system that is setup like a server with systemd-networkd and has a bridge defined there. My eno1 is slaved to that bridge. 

My VM are all connected to that local bridge, 'br0'. If I know the IP address any PC can ssh into the VM, but using mDNS makes it easier for all my local servers. Just not working for VMs.

It is interesting that my AP/Router that provides the DHCP services to the whole network including VMs knows the VM hostnames and they are listed on the DHCP page on the router admin site.

Any idea on how to solve this?

Offline

#2 2021-12-28 03:20:47

jfabernathy
Member
From: North Carolina
Registered: 2019-01-03
Posts: 123

Re: How to ssh into a VM using hostname.local?

I found a workaround, but not sure it's correct or a solution. In this case all my VMs are Ubuntu 20.04 Servers with just the basic install. Once I installed avahi on these VM servers, I could ssh using the .local domain from any PC on the local network. The packages installed were:

sudo apt install avahi-daemon avahi-autoipd

The Archlinux system hosting KVM was installed using archinstall with Desktop/XFCE4 and already has avahi installed but that seems to not help on it's own.

Offline

Board footer

Powered by FluxBB