How to specify hostname in DHCP?

Discussions about using Solaris guests in VirtualBox.
Post Reply
supremedalek
Posts: 32
Joined: 17. Oct 2008, 17:10
Primary OS: Ubuntu other
VBox Version: OSE other
Guest OSses: Windows, Linux

How to specify hostname in DHCP?

Post by supremedalek »

I have a Solaris 10 vm in a Linux host. I would like to use dhcp but specify my hostname at the vm (not at the dhcp server). So, I created a /etc/hostname.e1000g0 file,

Code: Select all

root@unknown ~> cat /etc/hostname.e1000g0 
inet solaris10-x64
root@unknown ~> 
edited /etc/default/dhcpagent as described in http://docs.sun.com/app/docs/doc/806-55 ... s5a?a=view and then killed dhcpagent, removed, /etc/dhcp/interface.dhc, and rebooted. The vm still calls itself unknown. What else should I try?
SSCBrian
Volunteer
Posts: 365
Joined: 13. Jun 2008, 15:04
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Windows 8 RTM (MSDN)

Re: How to specify hostname in DHCP?

Post by SSCBrian »

You might have to try a Solaris OS specific forum for that since it's not actually related to the fact that Solaris is in a VM. It works the same way on bare metal. The normal situation is that if it's a server, people use static IPs, which let you specify the hostname, or if it's a DHCP workstation, it's specified on the DHCP server (or just left as unknown)...

I did change my hostname once, but I remember it was a big deal and there were still a place here and there where it didn't show up as changed. Unfortunately, I can't recall any of the details of that now as it was a couple years ago.
Hortnon
Posts: 22
Joined: 1. Jul 2009, 19:17
Primary OS: MS Windows 2008
VBox Version: PUEL
Guest OSses: Solaris, Linux, Windows

Re: How to specify hostname in DHCP?

Post by Hortnon »

Try the /etc/nodename file. I haven't really used DHCP on Solaris, so that's the extent of my knowledge.
Post Reply