# How to access Guest (Window XP) Internet from Host (Windows 7) in Vmware Workstation?



## Bit Hacker (Feb 12, 2009)

I am using a 3G USB modem in Windows 7 x64. For some odd reason, it gives me BSOD whenever I try to connect it. So what I did is installed Windows XP SP2, in vmware and now I can use it inside the GUEST OS.

My question is, How can I use this Internet Connection in Windows XP (GUEST) from Windows 7 (HOST). (I haven't changed any default setting, yet.)


----------



## lorjack (Nov 15, 2007)

You should just have to enable ICS on the USB modem


----------



## Bit Hacker (Feb 12, 2009)

lorjack said:


> You should just have to enable ICS on the USB modem


I've enabled it but still can't access the internet from Windows 7 [HOST]


----------



## Jay_JWLH (Apr 30, 2008)

Have you got a Host-only network as well?


----------



## Bit Hacker (Feb 12, 2009)

Jay_JWLH said:


> Have you got a Host-only network as well?


How do I check that? Please check the attachment. Is this the setting that you want?


----------



## lorjack (Nov 15, 2007)

Oh, lol I misunderstood I thought it was the other way around and the XP machine couldn't connect. 

You can't do it that way, you'll have to make it work with Win7. What's the error code on the BSOD that you are getting?


----------



## Bit Hacker (Feb 12, 2009)

lorjack said:


> You can't do it that way, you'll have to make it work with Win7. What's the error code on the BSOD that you are getting?


What? Are you saying that I cannot access internet in Windows 7 [HOST]? I donno the error code, it just flashes and the system restarts. I still can't believe that its not possible to access [GUEST]'s internet from [HOST]. :sigh:


----------



## Phou (May 26, 2011)

I think it's possible, if I can access the VMware machines on the host system it's possible to route traffic to it. 

Try enabling a 2nd network card and set it as bridged. You probably will have to configured ICS on the XP machine. There might be another way but I can't seem to think of any other but ICS and a 2nd network card.


----------



## lorjack (Nov 15, 2007)

To keep the computer from restarting right click on My Computer and select properties > Advanced system settings > click settings under startup and recovery > then under system failure uncheck 'automatic restart'. That should let you see the error code. 

The fact that the VM machine can use the modem means that it works on Win7, its just that you are getting an error when you open a browser which could be some other problem. 

If you can get that to work remember that you'll have to have the VM machine running just to access the internet.....very inconvenient and restrictive IMO. So I'd just fix the BSOD and have it work like its supposed to.


----------



## Phou (May 26, 2011)

The software that came with it, can you run it in XP compatible mode? Perhaps this might be the easiest route.


----------



## Bit Hacker (Feb 12, 2009)

Phou said:


> I think it's possible, if I can access the VMware machines on the host system it's possible to route traffic to it.
> 
> Try enabling a 2nd network card and set it as bridged. You probably will have to configured ICS on the XP machine. There might be another way but I can't seem to think of any other but ICS and a 2nd network card.


OK, this is what I've done. As there was already a VMware network adapter in the GUEST machine, so I've set it to 'bridged' in the 'Network Adapter' Settings of VMware and have also setup the 'Internet Connection Sharing'. [Attachments]
Is there any other extra setting that I need to do? Because I still can't access internet from Windows 7. [HOST]


----------



## Bit Hacker (Feb 12, 2009)

lorjack said:


> To keep the computer from restarting right click on My Computer and select properties > Advanced system settings > click settings under startup and recovery > then under system failure uncheck 'automatic restart'. That should let you see the error code.
> 
> The fact that the VM machine can use the modem means that it works on Win7, its just that you are getting an error when you open a browser which could be some other problem.
> 
> If you can get that to work remember that you'll have to have the VM machine running just to access the internet.....very inconvenient and restrictive IMO. So I'd just fix the BSOD and have it work like its supposed to.


It did work on my Windows 7 when I did a fresh install, but stopped working after some time. Maybe I installed some application or another hardware that might have caused this problem. I've checked it with my friend's Windows 7, and it works flawlessly there. The BSOD occurs at my side when I try to use the software that came with it, to connect to internet. I did what you asked me and here is the error.

IRQL_NOT_LESS_OR_EQUAL

**** STOP1 0X000000A ......

And NO, It also doesn't work with XP COMPATIBILITY MODE.


----------



## lorjack (Nov 15, 2007)

It won't work bridged in that way. I have an idea but I don't know if it will work but I'm curious to see if it does. 

In the VM network settings change the network adapter to host only. Now in XP enable ICS on the USB modem. That should change the other network connection to where it has an IP of 192.168.0.1. 

In Win7 open up the network connections and set the host adapter to a static IP of 192.168.0.2, mask of 255.255.255.0, and the gateway as 192.168.0.1, and the DNS server to set the same as it is in the XP settings. 

In theory this should work, not sure if it will though.


----------



## Bit Hacker (Feb 12, 2009)

yea. it didn't work. Everything was done as per your say. 'No Internet Access'.


----------



## Phou (May 26, 2011)

I was able to get this working but my setup differ, however I think it still apply and in theory should still work for you. The way I had it setup is the traffic from the Win7 machine is sent to 192.168.0.1 (LAN on XP), it's then move out the 192.168.2.194 (WAN on XP) back to my network, which in turns moves it out the router.

I know it works if I don't have XP running, there is no Internet connection. Refer to the image if you need help. Make sure you check the routing table, the network 192.168.0.0 should be in there.


----------



## Jay_JWLH (Apr 30, 2008)

It is my understanding that you have a Windows XP hosted in a virtual machine from within a Windows 7 computer. And that you have successfully managed to port the USB modem from the host OS USB port to the guest OS USB exclusively. Then connect to the Internet using it.

There are of course two solutions that you are probably fully aware of:
Correct the BSOD and eliminate the need for a VM.
Route the traffic from the VM to the host.

For the BSOD, can you tell us the details of the 3G USB modem that you are using? Is the driver from the manufacturer, or one from Windows? If you can troubleshoot and resolve the BSOD issue, then that would be the best route.

You seem to already have the correct settings. Just first try to make sure that you can access a network share both ways to verify the network connection. Perhaps ping between them.

A third option additional option would be to use a USB router, to handle the connection first, and pass it over a LAN (ethernet). Costs money.... obviously. But sounds like fun.


----------



## Bit Hacker (Feb 12, 2009)

Phou said:


> I was able to get this working but my setup differ, however I think it still apply and in theory should still work for you. The way I had it setup is the traffic from the Win7 machine is sent to 192.168.0.1 (LAN on XP), it's then move out the 192.168.2.194 (WAN on XP) back to my network, which in turns moves it out the router.
> 
> I know it works if I don't have XP running, there is no Internet connection. Refer to the image if you need help. Make sure you check the routing table, the network 192.168.0.0 should be in there.


I tried exactly as you said, and yes, you are right about the setup. It is different from yours. I'm attaching the screenshots, showing my GUEST and HOST setups and how I configured them. It didn't work. :sigh:


----------



## Bit Hacker (Feb 12, 2009)

Jay_JWLH said:


> It is my understanding that you have a Windows XP hosted in a virtual machine from within a Windows 7 computer. And that you have successfully managed to port the USB modem from the host OS USB port to the guest OS USB exclusively. Then connect to the Internet using it.


Yes, your understanding is spot on. 




> For the BSOD, can you tell us the details of the 3G USB modem that you are using? Is the driver from the manufacturer, or one from Windows? If you can troubleshoot and resolve the BSOD issue, then that would be the best route.


You are right about this, upon clean installation of the Windows 7 SP1 64 bit, I installed the drivers and software that came with the 3G USB Modem and it worked fine. After about a month or so, whenever I tried to do connect manually [dialup] or through software, it would show me the BSOD.

This is the 3G USB Modem and drivers that I'm using. Welcome to PTCL





> You seem to already have the correct settings. Just first try to make sure that you can access a network share both ways to verify the network connection. Perhaps ping between them.


Yes, I can communicate between the Windows XP and Windows 7. I've pinged and also tried the file transfer, successfully.



> A third option additional option would be to use a USB router, to handle the connection first, and pass it over a LAN (ethernet). Costs money.... obviously. But sounds like fun.


As a matter of fact, I already am using a 3G USB Modem because my room mates also connect to the internet through it. I want this GUEST/HOST setup just because its not working on my Windows 7, when I'm outside and have to use the USB Modem on my laptop.


----------



## Phou (May 26, 2011)

There are 3 reasons why your setup doesn't work compare to mine.

1)You don't need 2 network card for your setup, you just need 1 modem and 1 LAN. Think about it, my XP WAN is your modem. So redo the ICS on the XP machine, make sure the XP machine has Internet access before proceeding. 

2)My setup is plugged into a switch to manipulate a loop, you're are not. In order to go mobile without the need for a cable you have to install a loopback adapter. You need to follow this instruction on the link below to install it. 

How to install a Loopback Adapter in Windows 7 | Windows Reference

After the installation is done, don't do anything to modify the loopback adapter.

3)Bridged the XP LAN adapter to the Win7 loopback adapter using Vmware>edit>virtual network editor. Look the the screenshot, focus on the highlight. I pick VMnet0 to bridge to the loopback, then set the network adapter to customs:VMnet0. You can pick any VMnet you want to do this, I just happen to pick VMnet0.

After the setup the loopback adapter should automatically receive the IP information and it should be in the same subnet as the XP LAN (192.168.0.0) with a default gateway & DNS of 192.168.0.1. If not try disable and re-enabling it.

Last, some helpful hints:
Take a look at my Win 7 route table, the first one shows two route to 0.0.0.0 network, that's the way to the Internet. Notice the difference, top one is the loopback with a metric of 30, now look at the second picture of the route table, notice my LAN cabled is unplugged. However the 0.0.0.0 network is there and it's using my loopback adapter.


----------



## Bit Hacker (Feb 12, 2009)

I don't know how to check the routing table. I removed one network adapter, changed other to custom. Added the loopback interface while the XP was running with the internet connection. Didn't work, I might be doing something wrong.


----------



## Phou (May 26, 2011)

Go to Start Menu, type in cmd 
At the command prompt type route print

Do for both XP and Win7 and let me see the results for IPv4 table. I hope you have ICS enable, from the screenshot it didn't appear so, just checking.

Also what is the IP info on the loopback adapter?


----------

