Fog Creek Software
g
Discussion Board




VMWare Tips

Hi,

I know VMWare is pretty popular among JoS readers, so I was wondering if anyone could help me with the set up. Basically, I've installed a Fedora VM just to try a play around with Linux for educational purposes, however it seems my VM is unable to connect to the internet. I will briefly describe my setup:

Host Machine running on WinXP Pro
On-board Network Adapter(NForce2)
Internet connection PPPoE through a D-Link DI-604 Router

I know there are 3 possible network setups for the virtual machine(Bridged, NAT, Host-Only) and I've tried them all. In any case, my Linux installation can't get an IP address for its network device and I can't access anything. I've looked into the documentation I could found, but I didn't find anything to help me solve the problem.

If anyone can help or link to some good VMware references, I'd appreciate it.

My Code Has Low "Carbs"
Monday, February 9, 2004

Since you're directly connected to the 'net with just a single computer, I'd recommend NAT mode.

In NAT mode, it should be getting its IP address directly from VMware (via DHCP over the virtual network adapter). Have you configured the network device in Fedora to use DHCP?

Brad Wilson (dotnetguy.techieswithcats.com)
Monday, February 9, 2004

Look in the RedHat-specific setup instructions in the help file from VMWare.

You have to edit something deep and dark in a magical place and then everything will work.

I believe what you want is:

To work around this problem, become root (su -) and use a text editor to edit the following files in the guest operating system. If only one of these files exist, make the change for that file only.

/etc/sysconfig/network-scripts/ifcfg-eth[n]

/etc/sysconfig/networking/devices/ifcfg-eth[n]

In both cases, [n] is the number of the Ethernet adapter - for example, eth0.

Add the following section to each of these two files:

check_link_down () {

return 1;

}

Then run the command ifup eth[n] (where [n] is the number of the Ethernet adapter) or restart the guest operating system.

Joel Spolsky
Fog Creek Software
Monday, February 9, 2004

BTW, VMWare has a great tech support forum: http://www.vmware.com/community/

Egor Shipovalov
Monday, February 9, 2004

What Joel said, it's pretty much the first thing I do everything I install Fedora (or RedHat 9) into a linux guest OS installation.

Li-fan Chen
Monday, February 9, 2004

Ok, I've tried what Joel suggested, but it still doesn't work. I see that my router has leased an address to the eth0 mac address, but I still can't get on the web.

I think I'll drop by the forum mentionned earlier and look for more Redhat specific documentation.

My Code Has Low "Carbs"
Wednesday, February 11, 2004

Basically you can do the following (assuming you have external NAT (meaning it's not provided by VMWare) and you aren't interested in virtual networks)

1. Network settings: turn off/disable every virtual network cept Net0, turn off vmware NAT, turn off vmware DHCPd, go bridging only, map bridging to the NIC card your WinXP uses to exist in the 192.168.* world.

2. Do what Joel said with the rest.

3. ip up on your eth0 (one of the scripts you are staring at in that directory does this trick)

4. What does this do?

4.1. XP Host OS exist as whatever your private network's DHCP assigned to it (say 192.168.1.100) say using an Intel NIC card.

4.2. Linux Guest OS pops up, sniffs at the Intel NIC card, associate Net0 with it, never bother to start VMWare DHCP nor VMWare virtual networks, ask your private network's DHCP to assign an address to it (say 192.168.1.101)

Li-fan Chen
Wednesday, February 11, 2004

well, i see nothing was posted here for awhile, but incase someone else checks out this forum, imma update it a little.  I followed the check_link_down advice, and was able to get an address, however my resolv.conf was not updated with a DNS nameserver.  You need to add your router's IP address to the resolv.conf(/etc/resolv.conf) like this:

nameserver=192.168.0.1(or whatever your router's IP is)


If you can't even ping any other nodes on your network, then this isn't going to help you.  But if you can get out using IP's, then this is more than likely your problem.

Joe
Monday, May 3, 2004

*  Recent Topics

*  Fog Creek Home