简体   繁体   中英

Connect to server in vmware player while host is not connected to a network

I am using VMWare Player 3.1.0 on Host OS Windows 7 Professional 64-bit. My guest is is SUSE Linux ES 10. My guest OS (SUSE) runs JBoss App Server which I access from host using HTTP. I used a "Bridged" connection to set up all this.

My problem: When I am connected to network on the Host (using wired network adapter) I can connect to the http server on the Guest OS and browse the application. However, when I am disconnected from the network on Host (unplugged the wire), I cannot access to the guest OS app server and browse the application. I use the guest OS ifconfig command to find out ip address of the guest OS. This ip address does not change whether connected or disconnected. I have even tried using Wireless Data card, but that does not work either.

I have tried "NAT" as well as "Host Only" connection and rebooted the guest but it does not work either. I think for some reason the guest OS can only recognize the physical network card (which is disconnected).

I need to run this machine (my laptop) independently of the network because I use this for demo and need to be able to connect from my host OS to Guest OS.

I am not sure I understand exactly what you are trying to do, but I do know setting up a working NAT configuration will offer you the most flexibility.

Click the networking icon and select settings, Select NAT.

Follow these steps on your Unix OS

  1. cd /etc/sysconfig/network-scripts
  2. Make a backup of your ethernet adapter configuration
  3. cp ifcfg-eth0 ifcfg-eth0.bak
  4. Next modify the settings to look like the following:
    DEVICE="eth0"
    BOOTPROTO="dhcp"
    HWADDR="What ever was here on your system" br/> NM_CONTROLLED="yes"
    ONBOOT="yes"
  5. Save your changes
  6. Restart your network adapters
    /etc/init.d/network restart
  7. Try nslookup www.google.com

You should now be able to connect back and forth from your Windows Host and Linux guest.

theJay28

-ps I had screenshots, but I do not have the 10 points yet to post images.

I figured that the solution is to restart the VM after making the changes to the NetWork setting on the VMWare. I selected Network for the VM as "Host Only" shutdown the VM and started it again. After that I was able to do what I wanted to do (ie browse the web application on guest from the browser in the host machine) without connecting the host to the network.

So key to the solution in my case was to make the network changes and restart the VM.

Any comments suggestions welcome...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM