13 Replies Latest reply on Jun 22, 2007 3:54 PM by mathias-uw

    cannot connect to virtual machine from network

    mathias-uw Novice

      hi,

       

      I'm running vmware server on a host machine (centos), and I have a virtual machine running (suse). the host machine has three interfaces (eth0, eth1, eth2) on three test networks. vmnet0 is bridged to eth0, vmnet2 to eth1, vmnet3 to eth2.

       

      I have set the network configuration in the virtual machine OS, and on each of the three vitual interfaces, I can connect to machines on the three different networks from my virtual machine (I have tried curl, ping, and ssh).

       

      HOWEVER I cannot do the reverse. from a seperate physical machine, I cannot ping, curl, or ssh my virtual machine. using tcpdump, the virtual machine sees the request but never responds to it.

       

      why!! =(

        • 1. Re: cannot connect to virtual machine from network
          oreeh Guru

          With multiple bridged network you shouldn't use vmnet0 - try to assign eth0 to vmnet4 instead.

          • 2. Re: cannot connect to virtual machine from network
            OASEDV Novice

            Did you try the following:

            -Go into the VMWare Network Utility

            -Choose Automatic Bridging

            -And then add in the Backup VLAN

            Hopefully this information helps!

            • 3. Re: cannot connect to virtual machine from network
              Build_Interns Enthusiast

              Hey Mathius, I had a similar problem.

               

              Here is what I did to fix this thanks to the help of Nick and RPDPETRUSKA.

               

              What you do first is make sure your ethernet cards are connected for your VM so run IPCONFIG in your guest os and make sure that they are configured.  Than what I suggest is to make the guest os use bridged networking that way the guest os shares the same connection as your host.

              When doing hte last step make sure on VM-- NETWORK SETTINGS that its on automatically connect and it shud work.

              • 4. Re: cannot connect to virtual machine from network
                mathias-uw Novice

                thanks for the replies.

                 

                I think the network utility is only for a windows host, and I'm using a linux host. when I go to the Host tab in the VMware Server Console, the Virtual Network Settings option is greyed out.

                 

                I went through the user manual and there is a very indepth section on configuring automatic bridging for a windows host, and there is absolutely nothing about doing it on a linux host.

                 

                do you guys know any way to configure automatic bridging with a linux host?

                • 5. Re: cannot connect to virtual machine from network
                  boogieshafer Expert

                  thanks for the replies.

                   

                  I think the network utility is only for a windows

                  host, and I'm using a linux host. when I go to the

                  Host tab in the VMware Server Console, the Virtual

                  Network Settings option is greyed out.

                   

                  I went through the user manual and there is a very

                  indepth section on configuring automatic bridging for

                  a windows host, and there is absolutely nothing about

                  doing it on a linux host.

                   

                  do you guys know any way to configure automatic

                  bridging with a linux host?

                   

                  the easiest way to edit the host network configuration on linux is to just rerun the config script

                   

                  [b]vmware-config.pl[/b][/i]

                   

                  capture the output while you are running that script so that if it still doesnt work you can post it here

                   

                  likewise you will want to post the output from

                   

                  [b]ifconfig -a[/b][/i]

                   

                  and a vmx file for one of your guests

                  1 person found this helpful
                  • 6. Re: cannot connect to virtual machine from network
                    mathias-uw Novice

                    I'm still having the problem described in the original post. here are the outputs of the config script, and the ifconfigs for the host and guest operating systems... any help is greatly appreciated.

                     

                    my next idea is to create a virtual machine using VMware workstation and then running it on VMware server. thoughts? my last resort is to use a windows host operating system... hopefully it won't come to that.

                     

                     

                     

                    vmware-config.pl[/b]

                     

                    Making sure services for VMware Server are stopped.

                     

                    Stopping VMware services:

                       Virtual machine monitor                                 \[  OK  ]

                       DHCP server on /dev/vmnet1                              \[  OK  ]

                       Host-only networking on /dev/vmnet1                     \[  OK  ]

                       Bridged networking on /dev/vmnet2                       \[  OK  ]

                       Bridged networking on /dev/vmnet3                       \[  OK  ]

                       Bridged networking on /dev/vmnet4                       \[  OK  ]

                       DHCP server on /dev/vmnet8                              \[  OK  ]

                       NAT service on /dev/vmnet8                              \[  OK  ]

                       Host-only networking on /dev/vmnet8                     \[  OK  ]

                       Virtual ethernet                                        \[  OK  ]

                     

                    Configuring fallback GTK+ 2.4 libraries.

                     

                    In which directory do you want to install the mime type icons?

                    /usr/share/icons

                     

                    What directory contains your desktop menu entry files? These files have a

                    .desktop file extension. /usr/share/applications

                     

                    In which directory do you want to install the application's icon?

                    /usr/share/pixmaps

                     

                    Trying to find a suitable vmmon module for your running kernel.

                     

                    The module bld-2.4.21-32.EL_i386-i686up-RHEL3 loads perfectly in the running

                    kernel.

                     

                    You have already setup networking.

                     

                    Would you like to skip networking setup and keep your old settings as they are?

                    (yes/no) \[no]

                     

                    Do you want networking for your virtual machines? (yes/no/help) \[yes]

                     

                    Would you prefer to modify your existing networking configuration using the

                    wizard or the editor? (wizard/editor/help) \[editor]

                     

                    The following virtual networks have been defined:

                     

                    . vmnet1 is a host-only network on private subnet 172.16.138.0.

                    . vmnet2 is bridged to eth1

                    . vmnet3 is bridged to eth2

                    . vmnet4 is bridged to eth0

                    . vmnet8 is a NAT network on private subnet 192.168.115.0.

                     

                    Do you wish to make any changes to the current virtual networks settings?

                    (yes/no) \[no]

                     

                    Trying to find a suitable vmnet module for your running kernel.

                     

                    The module bld-2.4.21-32.EL_i386-i686up-RHEL3 loads perfectly in the running

                    kernel.

                     

                       Shutting down http.vmware:                              \[  OK  ]

                       Starting httpd.vmware:                                  \[  OK  ]

                    Please specify a port for remote console connections to use \[902]

                     

                    Stopping xinetd:                                           \[  OK  ]

                    Starting xinetd:                                           \[  OK  ]

                    Configuring the VMware VmPerl Scripting API.

                     

                    Building the VMware VmPerl Scripting API.

                     

                    Using compiler "/usr/bin/gcc". Use environment variable CC to override.

                     

                    Installing the VMware VmPerl Scripting API.

                     

                    The installation of the VMware VmPerl Scripting API succeeded.

                     

                    Do you want this program to set up permissions for your registered virtual

                    machines?  This will be done by setting new permissions on all files found in

                    the "/etc/vmware/vm-list" file. \[no]

                     

                    Generating SSL Server Certificate

                     

                    In which directory do you want to keep your virtual machine files?

                    /var/lib/vmware/Virtual Machines

                     

                    Do you want to enter a serial number now? (yes/no/help) \[no]

                     

                    Starting VMware services:

                       Virtual machine monitor                                 \[  OK  ]

                       Virtual ethernet                                        \[  OK  ]

                       Host-only networking on /dev/vmnet1 (background)        \[  OK  ]

                       Bridged networking on /dev/vmnet2                       \[  OK  ]

                       Bridged networking on /dev/vmnet3                       \[  OK  ]

                       Bridged networking on /dev/vmnet4                       \[  OK  ]

                       Host-only networking on /dev/vmnet8 (background)        \[  OK  ]

                       NAT service on /dev/vmnet8                              \[  OK  ]

                       Starting VMware virtual machines...                     \[  OK  ]

                     

                    The configuration of VMware Server 1.0.3 build-44356 for Linux for this running

                    kernel completed successfully.

                     

                    Setup found that the VMware Management Interface is installed on your machine.

                    The VMware Management Interface configurator (/usr/bin/vmware-config-mui.pl)

                    needs to be run. Do you want to run this program now? \[yes]

                     

                    Configuring httpd.conf to run Apache as:

                    User: nobody and Group: nobody

                     

                    Set the number of minutes before a http session times out. (This is the length

                    of time before someone connecting to VMware Management Interface will be logged

                    out) \[-1]

                     

                    Generating SSL Server Certificate

                     

                       Starting httpd.vmware:                                  \[  OK  ]

                    The configuration of VMware Management Interface completed successfully.

                     

                     

                     

                     

                     

                     

                     

                     

                    ifconfig -a (host OS)[/b]

                     

                     

                    eth0      Link encap:Ethernet  HWaddr 00:08:74:26:00:4E

                              inet addr:172.27.240.1  Bcast:172.27.240.127  Mask:255.255.255.128

                              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

                              RX packets:3168902 errors:0 dropped:0 overruns:0 frame:0

                              TX packets:6561855 errors:0 dropped:0 overruns:0 carrier:0

                              collisions:0 txqueuelen:1000

                              RX bytes:958342200 (913.9 Mb)  TX bytes:405543052 (386.7 Mb)

                              Base address:0xdc80 Memory:ff6c0000-ff6e0000

                     

                    eth1      Link encap:Ethernet  HWaddr 00:D0:B7:26:B5:70

                              inet addr:172.21.21.1  Bcast:172.21.21.255  Mask:255.255.255.0

                              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

                              RX packets:153089 errors:0 dropped:0 overruns:0 frame:0

                              TX packets:97248 errors:4 dropped:0 overruns:0 carrier:4

                              collisions:0 txqueuelen:1000

                              RX bytes:9824758 (9.3 Mb)  TX bytes:5164410 (4.9 Mb)

                     

                    eth2      Link encap:Ethernet  HWaddr 00:E0:29:00:EC:B5

                              inet addr:172.21.42.1  Bcast:172.21.42.255  Mask:255.255.255.0

                              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

                              RX packets:86374 errors:1 dropped:0 overruns:0 frame:0

                              TX packets:3571 errors:3 dropped:0 overruns:0 carrier:3

                              collisions:0 txqueuelen:1000

                              RX bytes:5348097 (5.1 Mb)  TX bytes:260805 (254.6 Kb)

                              Interrupt:10 Base address:0x4c00

                     

                    lo        Link encap:Local Loopback

                              inet addr:127.0.0.1  Mask:255.0.0.0

                              UP LOOPBACK RUNNING  MTU:16436  Metric:1

                              RX packets:1113694 errors:0 dropped:0 overruns:0 frame:0

                              TX packets:1113694 errors:0 dropped:0 overruns:0 carrier:0

                              collisions:0 txqueuelen:0

                              RX bytes:118945739 (113.4 Mb)  TX bytes:118945739 (113.4 Mb)

                     

                    vmnet1    Link encap:Ethernet  HWaddr 00:50:56:C0:00:01

                              inet addr:172.16.138.1  Bcast:172.16.138.255  Mask:255.255.255.0

                              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

                              RX packets:0 errors:0 dropped:0 overruns:0 frame:0

                              TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

                              collisions:0 txqueuelen:1000

                              RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

                     

                    vmnet8    Link encap:Ethernet  HWaddr 00:50:56:C0:00:08

                              inet addr:192.168.115.1  Bcast:192.168.115.255  Mask:255.255.255.0

                              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

                              RX packets:0 errors:0 dropped:0 overruns:0 frame:0

                              TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

                              collisions:0 txqueuelen:1000

                              RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

                     

                     

                     

                     

                     

                     

                    ifconfig -a (guest OS)[/b]

                     

                    eth0      Link encap:Ethernet  HWaddr 00:0C:29:CB:EE:60

                              inet addr:172.27.240.6  Bcast:172.27.240.127  Mask:255.255.255.128

                              inet6 addr: fe80::20c:29ff:fecb:ee60/64 Scope:Link

                              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

                              RX packets:0 errors:0 dropped:0 overruns:0 frame:0

                              TX packets:2 errors:0 dropped:0 overruns:0 carrier:0

                              collisions:0 txqueuelen:1000

                              RX bytes:0 (0.0 b)  TX bytes:140 (140.0 b)

                              Interrupt:11 Base address:0x1400

                     

                    eth1      Link encap:Ethernet  HWaddr 00:0C:29:CB:EE:6A

                              inet addr:172.21.21.6  Bcast:172.21.21.255  Mask:255.255.255.0

                              inet6 addr: fe80::20c:29ff:fecb:ee6a/64 Scope:Link

                              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

                              RX packets:22 errors:0 dropped:0 overruns:0 frame:0

                              TX packets:3 errors:0 dropped:0 overruns:0 carrier:0

                              collisions:0 txqueuelen:1000

                              RX bytes:1320 (1.2 Kb)  TX bytes:226 (226.0 b)

                              Interrupt:10 Base address:0x1480

                     

                    eth2      Link encap:Ethernet  HWaddr 00:0C:29:CB:EE:74

                              inet addr:172.21.42.6  Bcast:172.21.42.255  Mask:255.255.255.0

                              inet6 addr: fe80::20c:29ff:fecb:ee74/64 Scope:Link

                              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

                              RX packets:28 errors:0 dropped:0 overruns:0 frame:0

                              TX packets:3 errors:0 dropped:0 overruns:0 carrier:0

                              collisions:0 txqueuelen:1000

                              RX bytes:1680 (1.6 Kb)  TX bytes:226 (226.0 b)

                              Interrupt:5 Base address:0x1800

                     

                    lo        Link encap:Local Loopback

                              inet addr:127.0.0.1  Mask:255.0.0.0

                              inet6 addr: ::1/128 Scope:Host

                              UP LOOPBACK RUNNING  MTU:16436  Metric:1

                              RX packets:0 errors:0 dropped:0 overruns:0 frame:0

                              TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

                              collisions:0 txqueuelen:0

                              RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

                     

                    sit0      Link encap:IPv6-in-IPv4

                              NOARP  MTU:1480  Metric:1

                              RX packets:0 errors:0 dropped:0 overruns:0 frame:0

                              TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

                              collisions:0 txqueuelen:0

                              RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

                    • 7. Re: cannot connect to virtual machine from network
                      boogieshafer Expert

                      your guest seems to have 3 virtual nics and ips for all 3 different network segments

                       

                      its easy to have a misconfiguration with your routing tables in a setup like that, and that is likely the reason why you arent getting return traffic to your test system, even though the guest is seeing the traffic in tcpdump

                       

                      please post the output of your routing table here

                       

                      [b]netstat -rn[/b][/i]

                       

                      --

                      i would first try to get the "simple" configuration working.....e.g. 1 virtual nic running in the guest

                       

                      from there you will need to add the other adapters....and when you add the other adapters you shouldnt need to define a "default gateway" as you might have with the first adapter. with multi-nic setups this is a common problem......make sure you have only one "0.0.0.0" or "default" entry in your routing table...

                       

                      if you want multiple defaults, you are probably better off running an actual dynamic routing service on the system

                      1 person found this helpful
                      • 8. Re: cannot connect to virtual machine from network
                        mathias-uw Novice

                        well I tried installing a different guest OS (centOS) instead of suse. I can get everything to work correctly on centOS, but suse is still not cooperating. I am feeling better about this now because I know that it must have something to do with the operating system and not the vmware software.

                         

                        anyway, here is my output for netstat-rn on the guest os (running suse). I tried to space it to look pretty but the forums wont't let me.

                         

                        Kernel IP routing table

                        Destination       Gateway            Genmask               Flags   MSS Window  irtt Iface

                        172.27.240.0    0.0.0.0               255.255.255.128   U         0      0          0     eth0

                        172.21.42.0      0.0.0.0               255.255.255.0       U         0      0          0     eth1

                        172.21.21.0      0.0.0.0               255.255.255.0       U         0      0          0     eth2

                        127.0.0.0          0.0.0.0               255.0.0.0               U         0      0          0     lo

                        0.0.0.0             172.27.240.126  0.0.0.0                   UG       0      0          0     eth0

                        • 9. Re: cannot connect to virtual machine from network
                          boogieshafer Expert

                          sounds like its definetely a guest OS configuration issue if you have things working for a centos guest.

                           

                          what is the version of SUSE you are running?

                           

                          the routing config looks fine.

                           

                          did you install the tools in this guest already?

                          --in the past on SUSE 10.1 i have had to force a compile of the vmware modules (this was true with 1.0.1 release of vmware, i havent tried since).. the default modules would "load" but were flakey and i would get errors in the system log

                          try installing the tools in the guest, and running the configure script with a "compile" at the end (you will need to have the necessary kernel files/compiler/etc for the compile to work)

                          • 10. Re: cannot connect to virtual machine from network
                            boogieshafer Expert

                            -what virtual ethernet device are you using? the default/vmxnet? or the e1000?

                            --i have usually had better luck with the e1000 virtual nic under linux as it has native drivers under all the recent distros and you dont need the tools installed to get it working (esp helpful with newer kernels where the vmxnet stuff requires some patching)

                             

                            to try the e1000 device type for your virtual nic, add the following to your guest vmx.

                             

                            Ethernet0.virtualDev = "e1000"

                            /code

                             

                            depending on the version of suse you may need to do some work to clean up any stale MAC addressess

                             

                            check the [b]/etc/udev/rules.d/30-net_persistent_names.rules[/b][/i] file if you are seeing odd device names after you change the device type to e1000

                            • 11. Re: cannot connect to virtual machine from network
                              mathias-uw Novice

                              no I do not have the tools installed. I will try these things, thank you!

                              • 12. Re: cannot connect to virtual machine from network
                                VirtualEntity Hot Shot

                                Why shouldn't we use VMNET0 when we have two bridged networks?

                                • 13. Re: cannot connect to virtual machine from network
                                  mathias-uw Novice

                                  hey,

                                   

                                  thanks for all the input, boogieshafter. it turned out that the distro I was using had numerous configuration settings specific to where I work, and it took a lot of work to make those settings match with the network I had configured.

                                   

                                  thanks again!