This may be just some configuration in my Ubuntu setup and may not anything to do with Vmware Workstation but I thought to give all the info. I have a Win 7 'host' workstation running Vmware Workstation with an Ubuntu Server as 'guest'. The VMware network is VMnet0(auto-bridging) for the Ubuntu VM. The guest OS is getting its own IP from the corporate network and is able to surf to web. The guest OS can also access the host's website just fine. So far so good.

But I need to be able to run a LAMP environment in the guest. I have Apache installed on the guest and and in both

http://localhost and 

the apache web page shows up fine in the guest's Firefox. But typing http://[hostnameofguest] or even http://[GuestIPAddress] inside the host does not bring up anything; ping to GuestIPAddress does work but ping to hostnameofguest does not work inside the host machine.

This is probably not a firewall issue--I I have that disabled (using Firestarter, I think) otherwise even ping to guest IP shouldn't work? /etc/hosts looks like:   localhost       customhostname

Any idea how I can make the LAMP environment to work>



Run 'nslookup hostnameofguest' on the Win 7 host to make sure the dns is resolving the hostnameofguest to the correct ip address.

If the firewall isn't the issue, then you will likely have to modify the Apache config to allow http://[GuestIPAddress] to work.

This is probably not a firewall issue--I I have that disabled (using Firestarter, I think) otherwise even ping to guest IP shouldn't work?

A firewall can be configured to block http but allow icmp (ping) to work.

| improve this answer | |
  • Yes, it is looking like firewall issue; will post soon... Thanks. – IrfanClemson Feb 19 '13 at 21:29
  • Somehow Firewall was still running; using Firestarter I tried to create an exception for incoming from my host computer's name but that did not work. Nslookup hostnameofguest came with a response from some corporate server, saying that hostnameofguest could not be found. Anyway, I can access Apache website from the host workstation using the ip address of the guest; would have preferred the guest system's hostname but I can live with the IP address. Thanks for your help! – IrfanClemson Feb 19 '13 at 21:41

In your case you can modify the Host file of Windows 7 which is your host OS. Windows 7 host file can be found at below path (there is no extension to the file name).


Before editing the above file assign a static IP to your guest OS on VM.

Do not change anything else apart than adding the below line at the end of the file.

Your_VM_Guest-OS_host_name       Your_VM_Guest-OS_IP

Save and Exit. Now open command prompt and enter below command to flush cache of old dns entries to be on safer side.

ipconfig /flushdns

Enter & then close the command prompt. Now you should be able to open the HTTP pages hosted on VM with it's hostname.



@Meengla please check 2 things ... 1st your vm's network adapter has to be in bridged mode. You can change and check it by rights clicking on the vm in vmware and then by selecting "Properties" please check the screenshot below for the same.

enter image description here

  • If you want it to work only in LAN / Intranet, then create a static DNS entry in your physical firewall or router for that website.

  • If you want it to work on the internet, then align your public IP to the registered domain using your domain provider's website / web based application. then you will have to do NATing for the between your Public IP and VM's private IP in your physical firewall / router which ever you have at your location.

let me know if that solves your issue.

| improve this answer | |
  • Hi, thanks! The hosts file solution would work except then I'd be the only one able to see the guest site by hostname unless others too in the intranet would change their hosts file. Also, the guest os gets its ip from the corporate network. – IrfanClemson Feb 27 '13 at 12:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.