3

I have Ubuntu running in VMware Player. I am able to access an Apache instance on this VM by using the IP address but not by machine name.

How do I make the name of the VM visible to the host? How do I add the machine name to my DNS? I am running within a Windows network.

5
  • Why the close vote? If we can discuss editors, furniture and interviews then why can't we discuss networking? FYI, I'm trying to set up SVN on the VM and access that from the host. Does that make it "programming related" enough? Apr 22, 2009 at 10:50
  • I agree. I don't know why we shouldn't talk about these topics here on SO as well. Networking for many programmers is an important part of what they have to deal with.
    – Martin C.
    Apr 22, 2009 at 10:58
  • @martin it's a slippery slope, but definitely not programming related. Apr 22, 2009 at 23:51
  • @Roger Pate: I believe the title: "Make VM Machine name..." would make it more obvious that we're talking about VMs here. Also, this is more Google friendly than "guest" to those who are searching for VM related quries. Aug 27, 2010 at 8:39
  • @Vulcan: I was avoiding "Virtual Machine Machine" (from "VM Machine"), but if there's a tweak you'd like to apply, feel free.
    – Roger Pate
    Aug 27, 2010 at 9:42

3 Answers 3

1

Put it in either DNS or in /etc/hosts.

EDIT: If the host is a Windows machine, put it in C:\WINDOWS\system32\drivers\etc\host.

Both are bascially the same syntax, which is

IP hostname1 hostname2 hostname3 ...

e.g.

127.0.0.1 localhost localhost.mydomain.tld
1

Or use mDNS, giving your name an automacic .local domain.

apt-get install avahi

or see: http://avahi.org/

0

If the host is Windows: Go to C:\Windows\System32\drivers\etc\ open file "hosts" and add a line:

IP Address Hostname

example:

192.168.1.5 ubuntu

If the host is Linux

sudo vi /etc/hosts

Then the same.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .