I have a KVM/QEMU virtual machine created in Virtual Machine Manager.
From this machine I can ping the host by IP, but I can't ping it by hostname:
elopio@ubuntu-xenial:~$ ping 192.168.2.207
PING 192.168.2.207 (192.168.2.207) 56(84) bytes of data.
64 bytes from 192.168.2.207: icmp_seq=1 ttl=64 time=0.142 ms
elopio@ubuntu-xenial:~$ host calchas
calchas has address 127.0.1.1
So, if I try to access calchas (the host, ip=192.168.2.207) by name from ubuntu-xenial (the guest), I will be accessing the guest instead.
How can I ping the host by name?
The solution was to append .lan to the hostname: