VMware Communities > VMTN > Desktop Products > VMware Fusion (for the Mac) > Discussions

This Question is Answered

1 "helpful" answer available (6 pts)
1 2 Previous Next
16 Replies Last post: Dec 14, 2007 5:25 AM by johninbklyn
Reply

How can Mac OS use the VM's internet connection? Need to access Verizon USB tethered modem, which only runs on Windows. (Fusion 1.1)

Dec 5, 2007 6:10 AM

Click to view johninbklyn's profile Novice johninbklyn 11 posts since
Dec 5, 2007
Running Fusion 1.1 (62573) on Mac OS X 10.5.1.

I have a Blackberry that, for reasons that are too boring to get into, is not supported as a dial-up USB modem by Verizon Wireless on Mac OS X. They do, however, support it on Windows machines using their native VZAccess desktop client.

I am able to connect with the Blackberry using my Windows XP virtual machine. What I would like to do us use the virtual machine as a gateway through which the Mac OS will get its internet connection.

In short, I want to use the Windows XP virtual machine solely as a means of getting access to the tethered (and, most likely faster -- that is, relative to what I can get through the Bluetooth tethered dial-up connection on the Mac side) connection.

I'm guessing that if this is possible it entails using Bridged networking and a particular set of networking configurations on the Windows VM, but this is beyond the scope of my knowledge, and I would appreciate any help offered.

Thanks.
Reply Re: How can Mac OS use the VM's internet connection? Need to access Verizon USB tethered modem, which only runs on Windows. (Fusion 1.1) Dec 6, 2007 7:47 PM
Click to view nospamboz's profile Enthusiast nospamboz 105 posts since
Jan 10, 2007
I think this all boils down to routing and gateways. I assume your Verizon modem
will be assigned an IP address when it connects to Verizon, and your VZaccess
sets up Windows networking to use Verizon's routing as an internet gateway.

It looks like you'll need two things. First, regardless of whether you use NAT
or bridged networking in Fusion, your Windows VM is going to need to route
packets between the two network "cards" it will have: one for the modem
and one to the VM's host system. I'm not quite sure how to do that, but a
good place to start searching will be along the lines of "How to use Windows
as a router between two network cards?". There's probably free software that
does it, if Windows doesn't do it natively already. It will probably be known as
something like Windows Internet Sharing.

Second, you'll need to tell Mac OS X to use the VM network interface as
its default gateway. I don't have access to my Mac at the moment, but
Mac OS is very BSD-ish, so the command will probably be something like:

route add default gw IP-address-of-Windows-VM-via-NAT-or-bridged

Your question implies that there is no other networking on your Mac OS system,
so there shouldn't be an already existing default gateway to cause problems.

I hope that's enough information to get you started.
Reply Re: How can Mac OS use the VM's internet connection? Need to access Verizon USB tethered modem, which only runs on Windows. (Fusion 1.1) Dec 9, 2007 10:25 AM
in response to: nospamboz
Click to view johninbklyn's profile Novice johninbklyn 11 posts since
Dec 5, 2007
Ok. I give. I gave it my best shot but, not being a Windows or BSD person, I kept running around in circles. I got as far as using the Windows Internet Connection sharing interfaces, but beyond that I had no success. I don't even know how to get the Windows machine's IP address. The two ethernet connections appear on the Mac side as en2 with an IP of 10.37.129.2 and en3 with and IP address of 10.211.55.2. I assume that one of these is the VMWare's ethernet connection.

Any chance you could provide further instructions?
Reply Re: How can Mac OS use the VM's internet connection? Need to access Verizon USB tethered modem, which only runs on Windows. (Fusion 1.1) Dec 9, 2007 7:08 PM
in response to: johninbklyn
Click to view nospamboz's profile Enthusiast nospamboz 105 posts since
Jan 10, 2007
Can you post the output of the following command in a Terminal window on your Mac?

netstat -nr

You need to do it twice: once without the VM running, once with.

That will provide some useful information regarding your current networking setup.
Reply Re: How can Mac OS use the VM's internet connection? Need to access Verizon USB tethered modem, which only runs on Windows. (Fusion 1.1) Dec 10, 2007 6:20 AM
in response to: nospamboz
Click to view johninbklyn's profile Novice johninbklyn 11 posts since
Dec 5, 2007
Virtual Machine Off
Attachments:
Reply Re: How can Mac OS use the VM's internet connection? Need to access Verizon USB tethered modem, which only runs on Windows. (Fusion 1.1) Dec 10, 2007 6:21 AM
in response to: nospamboz
Click to view johninbklyn's profile Novice johninbklyn 11 posts since
Dec 5, 2007
Virtual Machine On
Attachments:
Reply Re: How can Mac OS use the VM's internet connection? Need to access Verizon USB tethered modem, which only runs on Windows. (Fusion 1.1) Dec 10, 2007 6:22 AM
in response to: nospamboz
Click to view johninbklyn's profile Novice johninbklyn 11 posts since
Dec 5, 2007
My Network Preferences (screens for en2 and en3)
Attachments:
Reply Re: How can Mac OS use the VM's internet connection? Need to access Verizon USB tethered modem, which only runs on Windows. (Fusion 1.1) Dec 10, 2007 6:13 PM
Click to view nospamboz's profile Enthusiast nospamboz 105 posts since
Jan 10, 2007
It looks to me like your Mac thinks that it already has internet connectivity.
These are all the important network interfaces I see:

192.168.1.x I think it must be Airport?
192.168.86.x vmnet1 (bridged VM network)
192.168.235.x vmnet8 (NAT VM network)
10.37.129.x en2
10.211.55.x en3

This sure is complicated. What are en2 and en3, and why do they only appear when your VM is started?
They've been given IP addresses (10.37.129.2 and 10.211.55.2, repectively), so something is using them.
Was your VM migrated from Parallels, by any chance?

I don't think they're associated with Fusion. The Fusion ones are vmnet1 and vmnet8, bridged and NAT,
respectively. It looks like neither one is being used, as your VM and host haven't assigned IP addresses.

I'm guessing that your Airport wireless network is active. Your Mac is 192.168.1.4, and your wireless
router is 192.168.1.1. Right now, your system thinks your wireless router is connected to the Internet,
and is routing packets that way. That's what the default gateway reference means.

Can you run this command on your Windows VM in a command prompt window, and post the output?

ipconfig /all
Reply Re: How can Mac OS use the VM's internet connection? Need to access Verizon USB tethered modem, which only runs on Windows. (Fusion 1.1) Dec 11, 2007 5:09 AM
in response to: nospamboz
Click to view johninbklyn's profile Novice johninbklyn 11 posts since
Dec 5, 2007
Sorry about the last posting. I think I can simplify the screenshots.

I downloaded and installed the trial version of Parallels but I haven't even gotten around to making a VM for it. So, no -- the VMWare Windows XP installation I'm running was not migrated from Parallels. Now that you mention it, those "en2" and "en3" connections were Parallels connections, I believe. In any event, I removed them.

I disabled Airport and took the following screenshots:

netstat_with_vmware_off
This is netstat -nr in a stock configuration. No Airport connected.

netstat_with_vmware_on
This is netstat -nr once I booted WIndows XP in VMWare, and connected with my Blackberry using the Window's Verizon software. At this point I'm able reach websites on the Windows side. VMWare is set to host-only networking.

ipconfig_all
This is the output from ipconfig /all run from the WIndows command prompt.

192.168.86.129 (vmnet1) appears to be the common denominator here. Is it a matter of adding this address as the default gateway on the Mac side?

Thanks for your help.
Reply Re: How can Mac OS use the VM's internet connection? Need to access Verizon USB tethered modem, which only runs on Windows. (Fusion 1.1) Dec 12, 2007 12:34 AM
in response to: johninbklyn
Click to view nospamboz's profile Enthusiast nospamboz 105 posts since
Jan 10, 2007
johninbklyn wrote:

those "en2" and "en3" connections were Parallels connections, I believe.
In any event, I removed them.


Aside: Now you know why I decided on VMware instead of Parallels.
Imagine, littering my system with pseudo-interfaces! If you look around
a bit, you'll find that's not all the clutter they leave around. The VMware
implementation is much cleaner.

VMWare is set to host-only networking.

I think you need to use bridge mode to do what you're planning on doing.

192.168.86.129 (vmnet1) appears to be the common denominator here.
Is it a matter of adding this address as the default gateway on the Mac side?

Basically, yes, although it's whatever the VM IP address turns out to be when
you switch to bridge mode. Also, on the Windows side, you need to setup
internet connection sharing between your Ethernet adapter (VM-host) and
PPP adapter (Verizon). I'm not sure what kind of nomenclature that system uses,
but basically you're going to be sharing your VM's internet connection with your
host (Mac OS), as if you were sharing your internet connection with the rest of your
home LAN.

You'll notice that none of the Internet destinations in the "netstat -nr" output have the
G flag indicating a gateway. That's good, because it means adding a gateway shouldn't
break anything.

Before adding the gateway, make sure your bridged host-VM connection works
with a command like:

ping -n 192.168.86.129

The gateway command I gave you before was more Linux-ish. The BSD-ish command
will be more like:

route add default 192.168.86.129

Of course, you need to do that as root, so "sudo" it, if required. If successful, it should
add a line to the "netstat -nr" output that looks like:

default 192.168.86.129 UGSc

That way, your VM will be the Mac host's internet gateway, and the VM's internet
connection sharing will route the packets properly.

To test the Windows internet sharing from the Mac, see if you can ping your Verizon gateway.

ping -n 72.119.31.129

Last (I think) you need to tell your Mac what to use for DNS. Just edit the file
"/etc/resolv.conf" to reference the same name servers the Verizon modem uses
as indicated by the Windows "ipconfig /all" output. Using your sample, the
file needs to contain the lines:

nameserver 66.174.95.44
nameserver 69.78.96.14

(Actually, I only suspect that DNS trick will work, as I'm no expert at Mac DNS.
Better "ping -n" those addresses first from the Mac to make sure they're accessible.)

To test DNS, try the command "host www.vmware.com". If that works, try going there in
your Mac browser.
Reply Re: How can Mac OS use the VM's internet connection? Need to access Verizon USB tethered modem, which only runs on Windows. (Fusion 1.1) Dec 12, 2007 7:19 AM
in response to: nospamboz
Click to view johninbklyn's profile Novice johninbklyn 11 posts since
Dec 5, 2007
Wow. Very thorough. Thank you so much for taking the time to write.

Lots of progress, and I think I'm almost there.

One issue is that I'm unable to start VMWare in bridged mode. I get the "/dev/vmnet0 not running" error. (I'm running the latest 1.1 version of Fusion on OS X 10.5.1.) Not quite sure what's causing this. I started in "host-only" mode just to see how far I could get.

1. Started VM with Windows XP. Connected with my Blackberry.
2. Added the default gateway 192.168.86.129
3. Added the Verizon nameservers to resolv.conf
4. Reloaded the DNS cache on the Mac with sudo dscacheutil -flushcache

At this point things are going well. I can ping to the outside world, and host www.vmware.com (and so on) resolves the names successfuly. And, obviously, I can call up websites in my web browser by IP address and clearly see the difference in speed. Tethered USB is a **much** better deal than Bluetooth dial-up, and I know this effort is worth it.

The rub is this -- although I can resolve names from the command prompt, none of my web browsers are able to do so. I can't get to http://www.vmware.com/ in Safari, in other words.

So, with that, I'm off to do some more creative Googling for the answer. You say you're not a Mac person per se so I don't expect you to have the answer to this current issue, but I'm grateful for all the help you given my so far. Thanks again.
Reply Re: How can Mac OS use the VM's internet connection? Need to access Verizon USB tethered modem, which only runs on Windows. (Fusion 1.1) Dec 12, 2007 8:13 AM
in response to: johninbklyn
Click to view WoodyZ's profile Guru WoodyZ 9,999 posts since
Apr 22, 2004
johninbklyn wrote: One issue is that I'm unable to start VMWare in bridged mode. I get the "/dev/vmnet0 not running" error. (I'm running the latest 1.1 version of Fusion on OS X 10.5.1.) Not quite sure what's causing this. I started in "host-only" mode just to see how far I could get.


Is this the message you got? vmnet0_error.png If the Host does not have an active network connection on either the NIC or WiFi NIC then this message is quite normal and nothing is necessarily wrong with Fusion because of this message.

The rub is this -- although I can resolve names from the command prompt, none of my web browsers are able to do so. I can't get to http://www.vmware.com/ in Safari, in other words.

I know your goal is to use Windows as your Gateway via your Blackberry however are you able to browse by URL in Windows? Have you tried using the IP Address in the Safari Browser? Try the following to see if you can get to Microsoft in Safari: http://207.46.197.32

Reply Re: How can Mac OS use the VM's internet connection? Need to access Verizon USB tethered modem, which only runs on Windows. (Fusion 1.1) Dec 12, 2007 9:58 AM
in response to: WoodyZ
Click to view johninbklyn's profile Novice johninbklyn 11 posts since
Dec 5, 2007
Hi,

Yes, that is the message I got concerning /dev/vmnet0.

Yes, once connected with my Blackberry, I'm able to surf with no restrictions on the Windows side. And -- once I've done the steps mentioned above -- I can view web pages by IP address in Safari on the Mac side.

The only remaining issue seems to be that I cannot view web pages by URL on the Mac side.
Reply Re: How can Mac OS use the VM's internet connection? Need to access Verizon USB tethered modem, which only runs on Windows. (Fusion 1.1) Dec 12, 2007 10:45 AM
in response to: johninbklyn
Click to view WoodyZ's profile Guru WoodyZ 9,999 posts since
Apr 22, 2004
johninbklyn wrote:I can view web pages by IP address in Safari on the Mac side. The only remaining issue seems to be that I cannot view web pages by URL on the Mac side.


Then I'd suggest that the issue is with DNS. I would try setting DNS on the Mac to the IP Address(es) used by Windows and see if that make a differance.

Reply Re: How can Mac OS use the VM's internet connection? Need to access Verizon USB tethered modem, which only runs on Windows. (Fusion 1.1) Dec 13, 2007 5:54 AM
in response to: nospamboz
Click to view johninbklyn's profile Novice johninbklyn 11 posts since
Dec 5, 2007
OK -- so the issue was that I could resolve names from the command prompt but not from my desktop applications. It turns out that one of the network interfaces in System Preferences must be turned on.

There might be better ways to do this, but I simply did a computer-to-computer network with Airport. I added Verizon's nameservers from the System Preferences, clicked apply, and my desktop applications were able to connect. (312 kbps download, vs. ~150 I was getting on Bluetooth.)

Thanks everyone for your help.
1 2 Previous Next
Actions