I created a Ubuntu 12.10 virtual machine in VMware which runs an Apache server. The VMware machine is on a bridged network adapter, so it's using the physical network connected on my host.

For now I can access the web server in the VM using its dynamically assigned IP address, e.g.:

http://192.168.1.8/...

However, its IP address is likely to change everytime I restart the VM (because of DHCP). In order not to have to determine the IP address of the machine over and over again, I'd like to access it using a domain/host name, e.g.:

http://name.local/...

How can I accomplish this?

EDIT:

It's a VMware vm with bridged networking.

My host OS is Ubuntu 12.10 too.

My local network uses DHCP and I'd rather not using static IP address.

The DHCP server is the one built-in my router. And I don't know about the DNS sever (Do I have a local one by default?)

What kind of virtualization are you using? Libvirt/KVM, VirtualBox, VMware, etc. Is this DHCP server managed by the hypervisor or external (e.g. bridged networking)? And is your host using the same DNS server as the guests? The 'default' virtualization Libvirt/KVM allows you to specify a fixed MAC address and IP-address for the guests in the virtual network configuration file for example.
–
gertvdijkDec 30 '12 at 15:19

Your answer is still incomplete. Do you have access to your DNS/DHCP server? If so, what kind of server is this? (Ubuntu based?) What host operating system are you on? Do you need to use DHCP on your network or could you assign a static address?
–
gertvdijkDec 30 '12 at 16:14