VMware

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  

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) posted: Dec 5, 2007 6:10 AM

Click to view johninbklyn's profile Novice 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.
Click to view nospamboz's profile Enthusiast 106 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.
Click to view nospamboz's profile Enthusiast 106 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.
Click to view nospamboz's profile Enthusiast 106 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
Click to view nospamboz's profile Enthusiast 106 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.
Click to view WoodyZ's profile Guru 10,142 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

Click to view WoodyZ's profile Guru 10,142 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.

VMware Developer

SDKs, APIs, Videos, Learn and much more in the Developer community.

Learn More

Developer Sample Code

Increase your developer productivity with VMware API sample code.

Learn More

VMworld Sessions & Labs

Online access to the latest VMworld Sessions & Labs and online services.

Learn more

Purchase PSO Credits Online

Purchase credits to redeem training and consulting services online.

Buy Now

Community Hardware Software

View reported configurations or report your own.

Learn More

VMware vSphere

Come witness the next giant leap in virtualization.

Register Today

Communities