14 Replies Latest reply: Mar 5, 2009 5:14 PM by rgmmm RSS

    How to assign public IP to vmware guest

    rgmmm Novice

       

      Hi, we are running dedicated server with CentOS. We installed VMware in

      order to run a win2003 server. the problem is we need to access that

      server from outside (public).  I contacted the Hosting company support and this is what they say:

       

       

      "dedicated server environments use STATIC ips and there is no DHCP

      server like he is talking about. If vmware cannot assign a static IP to

      your guest then it's just not going to work. But I still think your

      main issue is the lack of a network interface in the guest.......eitehr

      way this is way beyond anything I am able to support at this point.

      Asking forums for help probably won't work, you'll need to talk to real

      tech support."

       

       

      Below is my configuration:  (thanks in advance)

       

       

      1. Configuration:

      guest.commands.enabledonhost = "TRUE"

      vmnet1.hostonlyaddress = "192.168.252.1"

      authd.client.port = "902"

      authd.proxy.nfc = "vmware-hostd:ha-nfc"

      loop.fullpath = "/usr/bin/vmware-loop"

      guest.commands.anonguestpasswordonhost = ""

      product.buildnumber = "122956"

      vmnet1.hostonlynetmask = "255.255.255.0"

      authd.proxy.vim = "vmware-hostd:hostd-vmdb"

      bindir = "/usr/bin"

      dhcpd.fullpath = "/usr/bin/vmnet-dhcpd"

      guest.commands.anonguestusernameonhost = ""

      control.fullpath = "/usr/bin/vmware-cmd"

      product.version = "2.0.0"

      authd.fullpath = "/usr/sbin/vmware-authd"

      guest.commands.allowanonrootguestcommandsonhost = "FALSE"

      vmware.fullpath = "/usr/bin/vmware"

      libdir = "/usr/lib/vmware"

      guest.commands.allowanonguestcommandsonhost = "FALSE"

      vmdir = "/home/cocotuc/vm"

      authd.soapserver = "TRUE"

      product.name = "VMware Server"

       

      2. Troubleshooting steps:

      tried to use NAT, bridged and host-only

      tried to statically assigning the eth1 IP to the virtual machine and not able to access the outside world

      i'm able to ping anything when the vmware machine is 192.168.252.1

       

      3. Not sure where/what to find 'diagnostic output'

      4. Not sure where/what to find 'logging'

      5. We are using:

      VMware Infrastructure Web Access

      Version 2.0.0

      Build 122589

       

      VMware Server

      Version 2.0.0

      Build 122956

       

       

       

       

       

       

        • 1. Re: How to assign public IP to vmware guest
          guyrleech Virtuoso

           

          Does this server have multiple NICs and if so do you need the guest VM to connect to the public and non-public networks? If you have multiple NICs that require connecting to guests then you will need to run vmware-config.pl and create a uniquely named bridged network for each NIC you want to bridge. If you want multiple NICs in the guest then just add another NIC via the Add Hardware option.

           

           

          I think you want to make the VM bridged, assigning the static IP address to the guest's NIC. Then you should remove the IP address on this public interface on the host, possibly rebooting the router that connects it to the outside world depending on the type.

           

           

          FYI. You can use Dynamic DNS services, like http://www.dyndns.com, to allow external access to servers without having to use static IP addresses.

           

           

           

          ---

          If you found this or any other answer useful please consider the use of the Helpful or Correct buttons to award points.

           

           

          • 2. Re: How to assign public IP to vmware guest
            rgmmm Novice

             

            1. Yes this server has multiple NIC cards (3 with IPs public).  I followed the support guy's instructions:

             

             

            " I assume you're currently doing NAT on your vm node.  Chances are you needto remove one of the IPs from cpanel"

             

             

            i did remove one the IPs and assigned to the vmmachine, but it does not recognizes the network card.  then the support guy said:

             

             

            "dedicated server environments use STATIC ips and there is no DHCP server. If vmware cannot assign a static IP to your guest then it's just not going to work. But I still think your main issue is the lack of a network interface in the guest.......eitehr way this is way beyond anything I am able to support at this point. Asking forums for help probably won't work, you'll need to talk to real tech support. "

             

             

            What do you suggest?

             

             

            Thanks guyrleech!

             

             

            • 3. Re: How to assign public IP to vmware guest
              canyonbreeze Enthusiast

              Set your networking to bridged.  In your Windows guest set up networking to use an available fixed private address on your local network.  Then set port forwarding in your router to send server traffic to the guest.  If you don't have a router you can probably configure this using NAT but I'm not sure how.  Maybe easier just to buy a small router.  I do this in my wireless router.

              • 4. Re: How to assign public IP to vmware guest
                rgmmm Novice

                 

                canyonbreeze,

                 

                 

                this is a remote server.  i only have remote access to it.

                 

                 

                thanks

                 

                 

                • 5. Re: How to assign public IP to vmware guest
                  guyrleech Virtuoso

                   

                  What do you mean by

                  but it does not recognizes the network card

                  please?

                   

                   

                   

                  ---

                  If you found this or any other answer useful please consider the use of the Helpful or Correct buttons to award points.

                  • 6. Re: How to assign public IP to vmware guest
                    canyonbreeze Enthusiast

                     

                    Missed the remote part. Good luck with that then.

                     

                     

                     

                     

                     

                     

                     

                     

                    • 7. Re: How to assign public IP to vmware guest
                      rgmmm Novice

                      it means that i see a red 'x' next to the device 'Network Adapter 1' Bridged.

                      • 8. Re: How to assign public IP to vmware guest
                        guyrleech Virtuoso

                        Please post, as in attach, "ifconfig -a" output from your host, "ipconfig /all" from the guest, the file /etc/vmware/netmap.conf and the results of running "ps -ef|grep vmnet-bridge".

                         

                        Do you get anything in the logs in /var/log/vmware if you try and connect the disconnected NIC?

                        • 9. Re: How to assign public IP to vmware guest
                          rgmmm Novice

                          Attached are the anwsers to your questions.......I really appreciate your help guyrleech!

                          • 10. Re: How to assign public IP to vmware guest
                            guyrleech Virtuoso

                             

                            Thanks. Please also attach the .vmx file for this VM.

                             

                             

                            I don't like these lines in the log:

                             

                             

                            An error occurred while loading configuration "/usr/lib/vmware/settings",not all entries are being read. It is strongly encouraged that you manually inspect the file and fix any corruptions.

                             

                             

                            which I don't get. Another post suggests creating a symbolic link from /usr/lib/vmware/config to this "missing" settings file. I don't know if this has any relationship to your issue though.

                             

                             

                             

                            ---

                            If you found this or any other answer useful please consider the use of the Helpful or Correct buttons to award points.

                             

                             

                            • 11. Re: How to assign public IP to vmware guest
                              rgmmm Novice

                               

                              Attached is the .vmx file.

                               

                               

                              Thanks again!

                               

                               

                              • 12. Re: How to assign public IP to vmware guest
                                guyrleech Virtuoso

                                Nothing looks obviously wrong. Try creating a new VM and using the disk from this VM just in case it is a vmx file "funny". It really shouldn't be this difficult!

                                 

                                 

                                 

                                 

                                ---

                                If you found this or any other answer useful please consider the use of the Helpful or Correct buttons to award points.

                                • 13. Re: How to assign public IP to vmware guest
                                  JPRPI Enthusiast

                                  Hi,

                                   

                                  I had similar problems getting my VMWare environment running at my ISP. My host OS is Windows 2008 64bit.

                                   

                                  The problem was releated to the way an ISP binds a server to the internet. In my case a got 4 public IP addresses which I wanted to bind to my virtual machines on a bridged interface. Each bridged interface has its own mac address. This vmware-generated mac address was blocked by the ISP-switch my dedicated server was connected to. The reason my ISP gave was, that all mac addresses which are not directly bound to the hardware nic of the server are blocked by the switch to prevent mac address spoofing.

                                   

                                  So I ended up with a dedicated server which has 4 public ip addresses bound to a single nic with a static single mac address.

                                   

                                  My solution was to set up one virtual machine with bridged networking, sharing all ip addresses of the host server. This vm gets an additional nic bound to the nat network. All other virtual machines use nat networking. All virtual machines bound to the same nat network can communicate with each other. So I configured (in Windows) the RAS&Routing servcies (I guess IPTables on linux) to receive all IP traffic on the bridged vm and distibute it to the additional vms only bound to the nat network.

                                   

                                  At least I got a working envirionment...

                                   

                                  Jan

                                  • 14. Re: How to assign public IP to vmware guest
                                    rgmmm Novice

                                     

                                    thanks guys,

                                     

                                     

                                    this is what i'm going to try:

                                     

                                    1. The support guys at the my host company said this at the beginning of all:

                                     

                                    "This is not something I can really do for you as it revolves around configuring your vmware installation...

                                    However I am going to offer you some possible suggestions

                                    I assume you're currently doing NAT on your vm node.  Chances are you

                                    need to remove one of the IPs from cpanel (maybe the .133 can be

                                    removed because .131 and .132 are your nameservers which you can't

                                    remove)

                                    Then you need to reconfigure your VM to use that IP.:"

                                     

                                     

                                    then when i did that they said I needed to change NAT > Bridge for this to work.

                                     

                                     

                                           2. I'm creating a new VM and using the disk from this VM and see what happens.

                                     

                                     

                                           Should I remove the current VM?  Well, I will let you know the result tonight.  thanks again!