Kinda lost with hostnames - it always worked before

jason99

New Member
Jul 6, 2011
14
0
1
I have had occasion to set up many Debian servers over the years for things like web development and file sharing, but there are many areas which I've barely touched because they always "just worked" for me. One such area is that of hostnames. When I used to set up Debian - and indeed on my working physical (not virtual) Debian 6 server - I would simply input a hostname at setup time and not include a domain name (this is a very small network and we don't have a domain). Then, as I recall, I could immediately ping this hostname from other computers and get replies back from the correct IP address. Things are not working out so smoothly with Proxmox itself and virtual Debian 6 servers created by it. Proxmox insists on having a domain during setup; I provided 'example.com'. I have no idea whether that has anything to do with this or not, but I cannot now ping the server by hostname, only by IP.

Here is my /etc/hosts:

Code:
127.0.0.1 localhost.localdomain localhost
192.168.2.102 proxmox.example.com proxmox pvelocalhost

# The following lines are desirable for IPv6 capable hosts

::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

And my /etc/resolvconf:

Code:
search example.com
nameserver 208.67.220.220

And finally, my /etc/hostname:

Code:
proxmox

I only dimly understand what all this stuff means and what it is supposed to do. Any help would be greatly appreciated.

Oh one more thing - this is a Windows network and, while I doubt Samba has anything to do with it, I always do set up Samba on my Debian servers with a proper workgroup and netbios name. I tried that one of the virtual servers, however (the above config is for the real Proxmox server itself) and still couldn't ping by hostname from other workstations.
 
Got it fixed. Turns out that Samba netbios won't work for me unless I use bridged networking for the guest. When I changed it to that and manually configured /etc/network/interfaces to give it a static IP, everything worked as before.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, 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 yours easily in our online shop.

Buy now!