7 Replies Latest reply on May 11, 2010 7:21 AM by s0ckpuppet

    vmrun unable to connect to host

    droog93 Lurker

       

      So I've been searching high and low for a solution to my issue and havn't came across a solution yet.

       

       

      I have a backup script I created with VMWare Server 1.0 which shuts the VM down, copies it to another location, starts the vm backup, then copies the temp location to another server.  This was all with vmware-cmd.

       

       

      I have another server that is running VMWare Server 2.0 on Windows Server 2003 64bit and not matter what variation I use of the vmrun command I cannot get passed the error 'unable to connect to host'

       

       

      I'm using the following command

       

       

      vmrun -T server -h https://hostname/sdk -u username -p password list

       

       

      now I have substituded https://hostname:8333/sdk and have used localhost instead of the host name.  I have tried local admins, domain admins with local admin rights and I still it comes back with the same results.  And I can login to the webinterface for Vmware Server 2.0

       

       

      On my workstation 6.5 I can run this command fine against my local WS install, however the 6.5 vmrun doesn't have a type of 'server'.  I also have another Vmware Server 2.0 box that is doing the exact same thing.  Are there some components missing?  I checked the tomcat folder and although there is a ui folder which loads the ui that allows you to control the VM's I did not see an SDK folder. 

       

       

      Also when you view the options for vmrun it shows examples for workstation and linux but not windows, so Im assuming that the syntax is like that of linux.  I've seen where users have this working and have ran into other issues, but I can't seem to get a basic list command to run so I can at least verify that vmrun is even somewhat partially working. 

       

       

      Help.

       

       

       

       

       

        • 1. Re: vmrun unable to connect to host
          droog93 Lurker

          never mind.  the only way i could connect was by using the IP address of the machine even though the hostname resolved fine.  also the parameter when starting or stoping the vm was case sensitive, i must have missed that when going through the documentation.

          • 2. Re: vmrun unable to connect to host
            guyrleech Virtuoso

             

            Running vmrun from a Vista x86 client  to Server running on openSUSE 1.03 x64, I can use the name fine with the -h option. Same when running vmrun locally on the Server itself. I can also specify upper or lower case for any of the letters in the "list" command and it still works. Haven't tried any others though.

             

             

             

             

             

             

             

             

            • 3. Re: vmrun unable to connect to host
              droog93 Lurker

              the funny thing is that i can connect to https://hostname:8333/ui just fine to connect to the console from either the server or a client.  but the vmrun command was being ran on the server because i needed to do some local file copy, etc.  i have two servers that both are behaving the same way.

              • 4. Re: vmrun unable to connect to host
                dayeuhkolot Lurker

                I can do fine in my gentoo box

                 

                vmrun -T server -h https://myserver:8333/sdk -u admin -p secret stop "[[ standard ]] sandbox/sandbox.vmx"

                vmrun -T server -h https://myserver:8333/sdk -u admin -p secret start "[[ standard ]] sandbox/sandbox.vmx"

                • 5. Re: vmrun unable to connect to host
                  mpaytonnj Novice

                  I know this is an old post, but i figured I'd post in case it helps anyone else...

                   

                  I'm also running Server 2.0 on Windows 2003 - 32 bit in this case, but still Windows as opposed to a Linux host.  I also had the issue of vmrun "unable to connect to host" when using the hostname, and could also connect when using the IP. 

                  All I did was add an entry for the host to it's Windows\System32\drivers\etc\hosts file and I can now connect via the hostname using vmrun.  Name resolution was working properly for everything else, and all DNS records for the host were correct.  So I'm not sure why this would matter, but for me it worked.

                  • 6. Re: vmrun unable to connect to host
                    noxad Lurker

                    I ran into the same problem as the original poster. I could connect using the IP address but not the machine name, getting an  "Unable to connect to the host" error, even though everything resolved just fine when using it elsewhere (e.g., web access).

                     

                     

                     

                     

                     

                    Then I tried using the fully qualified domain name for the machine, e.g., myserver.mydomain.com, and that did the trick:

                     

                     

                     

                     

                    • 7. Re: vmrun unable to connect to host
                      s0ckpuppet Novice

                      I'm running VMware server 2.0 on x64 windows 2003 server enterprise.

                      I was getting "unable to connect to host" and "unknown error" errors when using vmrun.exe. I attribute this to the incorrect syntax being in the help file and published on the web.

                       

                      Here is what I did.

                       

                      1) Create a local user and add them to the administrators group

                      2) From the command prompt go to the directory C:\Program Files (X86)\VMWare\VMware Server

                      3) Now type (All case sensitive):   vmrun -T server -H https://localhost:8333/sdk -u localadminusername -p localadminusernampassword list

                      (localadminusername = Local admin account you created in step 1 and localadminusernampassword is the password for the account)

                      4) This will now produce the name of your datastore and the Vmware server paths

                      windows2003/windows2003.vmx

                      Windows2000/win2KServer.vmx

                      Win2008/Windows Server 2008 Standard.vmx

                       

                      5) If you want to start, stop suspend the syntax will be:

                      vmrun -T server -H https://localhost:8333/sdk -u localadminusername -p localadminusernampassword start "]standard[ windows2003/windows2003.vmx"

                       

                      vmrun -T server -H https://localhost:8333/sdk -u localadminusername -p localadminusernampassword suspend "]standard[ windows2003/windows2003.vmx"

                       

                      6) If you don't have a "127.0.0.1  localhost" in your host file then you may need to add it or substitute localhost for machine name or IP address.

                       

                      Anything in between these symbols ] [ gets converted to an attachment, so I reversed the brackets in the syntax for step 5)

                      The correct syntax is: opensquarebracket standard closedsquarebracket