0

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 
http://[hostnameofguest] 

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:

127.0.0.1   localhost
127.0.1.1       customhostname

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

Thanks!

2 Answers 2

0

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.

2
  • Yes, it is looking like firewall issue; will post soon... Thanks. Feb 19, 2013 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! Feb 19, 2013 at 21:41
0

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).

C:\Windows\System32\drivers\etc\hosts

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.

Enjoy!!

Edit:

@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.

1
  • 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. Feb 27, 2013 at 12:51

You must log in to answer this question.

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