12 Replies Latest reply on Nov 15, 2013 7:06 AM by Desrtrider

    Getting this error during the build step: Failed to communicate with VI server

    Horus09 Lurker

      Hopefully someone has some insight as to what may be causing this.

       

      Our VMware Administrator has given my Windows domain account the permissions listed in the Developer's Guide. However I've been unable to build a VA to this point using VMware Studio v2.6 on vSphere 5.1. The error along with the preceding log is listed below. I can however successfully create a standard VM on vCenter using the vSphere Client.

       

      20/06/2013 14:21:29 [info] Added to build queue
      20/06/2013 14:21:30 [info] VMware Studio Version - 2.6.0.0 Build 631426
      Description - VMware Studio 2.6.0.0

      20/06/2013 14:21:30 [info] Validating profile schema...
      20/06/2013 14:21:30 [info] Connecting to <vCenter> at <vCenterHost.MyCompany.com> as <MyCompany\MyUserAccount>.
      20/06/2013 14:21:30 [info] Validating build profile's version...
      20/06/2013 14:21:30 [info] Validating the VM's version formatting...
      20/06/2013 14:21:30 [info] Validating the VM's basic memory requirements...
      20/06/2013 14:21:30 [info] Validating all file/directory names in profile...
      20/06/2013 14:21:30 [info] Validating the VM's usernames and passwords...
      20/06/2013 14:21:30 [info] Validating the VM's logo path...
      20/06/2013 14:21:30 [info] Validating the VM's disk configurations...
      20/06/2013 14:21:30 [info] Validating provisioning host's entry...
      20/06/2013 14:21:30 [info] Validating provisioning timers...
      20/06/2013 14:21:30 [info] Validating ApplicationPackages URL...
      20/06/2013 14:21:30 [info] Validating non-empty ISO path...
      20/06/2013 14:21:30 [info] Validating non-duplicate OS package elements...
      20/06/2013 14:21:30 [info] Validating Windows' installation configurations...
      20/06/2013 14:21:30 [info] Validating management services' availability...
      20/06/2013 14:21:30 [info] Validating provisioning engine restrictions...
      20/06/2013 14:21:30 [info] Validating provisioning engine connection...
      20/06/2013 14:21:31 [info] Scanning for conflicting VM on provisioning host.
      20/06/2013 14:21:31 [info] Validating the basic capabilities of provisioning engine...
      20/06/2013 14:21:35 [info] Validating network address' availability for provisioning...
      20/06/2013 14:21:35 [info] Validating available disk space...
      20/06/2013 14:21:35 [info] Preparing the OS installation files.
      20/06/2013 14:21:35 [info] Looking for /opt/vmware/www/ISV/ISO/en_windows_server_2008_r2_with_sp1_x64_dvd_617601.iso
      20/06/2013 14:21:35 [info] Creating the template vm.
      20/06/2013 14:21:36 [info] Transporting VM from Studio to provisioning host; this may take a few minutes...
      20/06/2013 14:21:42 [warn] VM transporting failed! Error:
      20/06/2013 14:21:42 [warn] ********
      Opening VI target: vi://MyCompany%5CMyUserAccount@vCenterHost.MyCompany.com:443/LDC-Standalone/host/ManagedHostCluster.MyCompany.com/
      Error: Failed to communicate with VI server
      Completed with errors

        • 1. Re: Getting this error during the build step: Failed to communicate with VI server
          samdoyle Enthusiast
          VMware Employees

          Hi,

          Check the additional debug logs located in /opt/vmware/www/build/<yourbuildprofile>.x/status which should hopefully provide more information than what you see here

          1 person found this helpful
          • 2. Re: Getting this error during the build step: Failed to communicate with VI server
            Horus09 Lurker

            Thanks, I did look but not knowing vSphere extensively makes its difficult to troubleshoot. Essentially it looks like it's trying to use ovftool to transfer the temp build over to a datastore and is unable to connect.

             

            Command: </opt/vmware/share/ovftool/ovftool --acceptAllEulas '--name=10.41.106.145_mna-client-build-test-v01.8' '--datastore=LDC41PDVM10_LOCAL' '--network=VMWare Studio'    '--diskMode=thin' '/opt/vmware/www/build/mna-client-build-test-v01.8/va/MNA-Client-Test-v01.vmx' 'vi://MyCompany%5CMyUserAccount@vCenterHost.MyCompany.com:443/LDC-Standalone/host/ManagedHostCluster.MyCompany.com/'>

             

            The administrator has given me the permissions listed in the developer guide and I can create a VM manually using the vSphere Client so I'm not sure why I can't do it using Studio.

            • 3. Re: Getting this error during the build step: Failed to communicate with VI server
              samdoyle Enthusiast
              VMware Employees

              Hi, I have suspicion it might be your uri percent encoding i.e. the %5C. Although it should be case-insensitive it isn't always the case. Can you try with %5c and see if that works? If not, I would focus on verifying the connectivity first by using something like curl or wget for example.

              • 4. Re: Getting this error during the build step: Failed to communicate with VI server
                Desrtrider Novice

                ok, so I have the exact same problem when I try Vcenter.. BUT I think I get that we could modify the script issued so that it would use %5c to try this-- could you please Identify exactly where and what script to modify to replace this? I think I can if I dig enough but it'd help alot if you knew/know where it is and I'll try this.

                meanwhile connectivity on my system works.. (as far as I can tell)

                thanks!!

                • 5. Re: Getting this error during the build step: Failed to communicate with VI server
                  samdoyle Enthusiast
                  VMware Employees

                  I think you are looking for /opt/vmware/lib/build/VADK/ProvInterface/Vim.pm ?

                  • 6. Re: Getting this error during the build step: Failed to communicate with VI server
                    Desrtrider Novice

                    I dug all around in Vim.pm and their appears to be no easy way to simply "insert %5c vs %5C." from within that file. When the command is issued each part of it is derived in different places, its not a simple insert as far as I can tell.

                    (Is there a place that you suggest  would replace part of the code with a hard coded address - I may do that next)

                     

                    SO, I tried two things:

                    1) I tried in the "build" section of the vmware studio tool to set up my login "domain/user" to be "domain%5C" and "domain%5c" - neither of these worked at all-- even though URL encodings were used in a different part of the build page and inserted there by the "wizard".   I think these are legal URL and recognized regardless.. though.. why does it not? recognize these? It puts them in itself..

                     

                    2) I  found the Admin and she nicely consented to run all my stuff as root, so now with super powers

                    I ran this and got this message:

                    I think there is a bug in here somewhere. What next?

                    03/09/2013 14:31:46 [info] Transporting VM from Studio to provisioning host; this may take a few minutes...
                    03/09/2013 14:31:46 [dbug] Transporting VM between vCenter and Studio via ovftool.
                    03/09/2013 14:31:46 [dbug] 
                    03/09/2013 14:31:46 [dbug] Input Command: </opt/vmware/share/ovftool/ovftool --acceptAllEulas '--

                    name=192.68.61.207_Courage.5' '--datastore=san-core8' '--network=V Network'    '--diskMode=thin'

                    '/opt/vmware/www/build/Courage.5/va/SUPERHERO.vmx' 'vi://domain%5CRootusername@ourcompany.com:443/NA

                    Core QA/host/Core cluster/'>
                    03/09/2013 14:31:46 [dbug] Expect wait-time: <60> max-time: <7200>
                    03/09/2013 14:31:46 [dbug] Command to spawn: <rm -f /tmp/1kb8CG7D2R; /opt/vmware/share/ovftool/ovftool --

                    acceptAllEulas '--name=192.68.61.207_Courage.5' '--datastore=san-core8' '--network=V Network'    '--diskMode=thin'

                    '/opt/vmware/www/build/Courage.5/va/SUPERHERO.vmx' 'vi://domain%5CRootusername@ourcompany.com:443/NA

                    Core QA/host/Core cluster/' 2>&1; echo $? > /tmp/1kb8CG7D2R>
                    03/09/2013 14:31:50 [dbug] Expected times of asking passwords: 1
                    03/09/2013 14:31:50 [dbug] Command stdout: <************
                    Error: Curl error: URL using bad/illegal format or missing URL
                    Completed with errors

                    • 7. Re: Getting this error during the build step: Failed to communicate with VI server
                      samdoyle Enthusiast
                      VMware Employees

                      Ok so this is coming from ovftool.

                      The version on Studio is a bit old. You might want to try the latest version which I believe has had some curl related changes.

                      https://my.vmware.com/group/vmware/get-download?downloadGroup=OVF-TOOL-3-0-1

                      You download the VMware-ovftool-3.0.1-801290-lin.i386.bundle from the options on that page

                      I just tried to install it on a 2.6 build and it was fine, that however will leave you with two versions, this version will get installed in /usr/bin while the default version shipped and used by studio is stored in /opt/vmware/share/ovftool as you can see.

                      You can take that command that was run and use the /usr/bin/ovftool instead.

                       

                      *edit*

                      One more thing, that file you download will want to append a .txt to it. It's actually a shell script that wraps the binary as an installer. So chmod +x and run it for the install.

                      • 8. Re: Getting this error during the build step: Failed to communicate with VI server
                        Desrtrider Novice

                        I did two things today, change the superuser password so that it did not have a "#" in it and try a build,

                        and download and install this new ovftool 3.01.

                        a) downloaded the tool to win7, then scp'd it to the ubuntu Vmwarestudio.

                        I looked at the file and it did not have a .txt -- it looked like a script, so I executed it with "./VMware-ovftool-3.0.1-801290-lin.i386-- it installed a new ovftool..

                        Tried to run the commands with this ovftool, no success, tried running it instead of the "present" tool, no error message and still a build fail..

                        I did not know what to do but then I thought about that "#" sign thing I read somewhere- so that was my next task..

                         

                        Is there any other way to use this new ovftool?? Or maybe it doesn't matter given that I was having the "#" issue and now I have the password changed?

                        any ideas are welcome..

                        thanks!

                         

                        Message was edited by: Desrtrider

                        • 9. Re: Getting this error during the build step: Failed to communicate with VI server
                          Desrtrider Novice

                          2nd thing I did was run with the root password changed so no "#"

                          It gave me a NEW error, and it transported fine, or appeared to.. the disk-core8 data store works for everything else..

                           

                          Any ideas what to do next with all this?

                          here is the error log:

                           

                          04/09/2013 192:36:12 [dbug] The attribute "vadk:enabled" is not defined and will default to "false"

                          04/09/2013 192:36:12 [info] Transporting VM from Studio to provisioning host; this may take a few minutes...

                          04/09/2013 192:36:12 [dbug] Transporting VM between vCenter and Studio via ovftool.

                          04/09/2013 192:36:12 [dbug] 

                          04/09/2013 192:36:12 [dbug] Input Command: </opt/vmware/share/ovftool/ovftool --acceptAllEulas '--name=192.68.51.209_Tenacity.9' '--datastore=disk-core8' '--network=VM MCS Private'    '--diskMode=thin' '/opt/vmware/www/build/Tenacity.9/va/VM-happydays.vmx' 'vi://domainname%5Croot@virtcenter.company.com:443/NA Core QA/host/NA Core cluster/'>

                          04/09/2013 192:36:12 [dbug] Expect wait-time: <60> max-time: <7200>

                          04/09/2013 192:36:12 [dbug] Command to spawn: <rm -f /tmp/M2Fe6ytPgP; /opt/vmware/share/ovftool/ovftool --acceptAllEulas '--name=192.68.51.209_Tenacity.9' '--datastore=disk-core8' '--network=VM MCS Private'    '--diskMode=thin' '/opt/vmware/www/build/Tenacity.9/va/VM-happydays.vmx' 'vi://domainname%5Croot@virtcenter.company.com:443/NA Core QA/host/NA Core cluster/' 2>&1; echo $? > /tmp/M2Fe6ytPgP>

                          04/09/2013 192:36:15 [dbug] Expected times of asking passwords: 1

                          04/09/2013 192:36:20 [dbug] Command launched.

                          04/09/2013 192:36:20 [dbug] Command stdout: <************

                          Opening VI target: vi://domainname%5Croot@virtcenter.company.com:443/NA%20Core%20QA/host/NA%20Core%20cluster/

                          Warning:

                          - The specified operating system identifier '' (id: 80) is not supported on the selected host. It will be mapped to the following OS identifier: 'Other Linux (64-bit)'.

                          Deploying to VI: vi://domainname%5Croot@virtcenter.company.com:443/NA%20Core%20QA/host/NA%20Core%20cluster/

                          Disk progress: 0%>

                           

                          04/09/2013 192:36:20 [dbug] Waiting for command to complete...

                          04/09/2013 192:36:20 [dbug] Verbose interval - 60s

                          04/09/2013 192:36:51 [dbug] Command stdout: <95% Disk progress: 96% Disk progress: 97% Disk progress: 98% Disk progress: 99% Disk Transfer Completed                    

                           

                          Completed successfully

                          >

                           

                          04/09/2013 192:36:52 [dbug] Command stdout: <>

                           

                          04/09/2013 192:36:52 [dbug] VM transporting completed.

                          04/09/2013 192:36:52 [dbug] 

                          04/09/2013 192:36:52 [dbug] Input Command: </opt/vmware/share/build/datastore --verbose --put  --server virtcenter.company.com --port 443 --user domainname\root --datastore 'disk-core8' --folder '192.68.51.209_Tenacity.9' --file '/opt/vmware/www/build/Tenacity.9/192.68.51.209_Tenacity.9_provstart.iso' --datacenter 'NA Core QA'>

                          04/09/2013 192:36:52 [dbug] Expect wait-time: <60> max-time: <7200>

                          04/09/2013 192:36:52 [dbug] Command to spawn: <rm -f /tmp/376WTDCdhm; /opt/vmware/share/build/datastore --verbose --put  --server virtcenter.company.com --port 443 --user domainname\root --datastore 'disk-core8' --folder '192.68.51.209_Tenacity.9' --file '/opt/vmware/www/build/Tenacity.9/192.68.51.209_Tenacity.9_provstart.iso' --datacenter 'NA Core QA' 2>&1; echo $? > /tmp/376WTDCdhm>

                          04/09/2013 192:36:58 [dbug] Command launched.

                          04/09/2013 192:36:58 [dbug] Command stdout: <

                          %3  %7  %11  %15  %19  %23  %26  %30  %34  %38  %42>

                           

                          04/09/2013 192:36:58 [dbug] Waiting for command to complete...

                          04/09/2013 192:36:58 [dbug] Verbose interval - 60s

                          04/09/2013 192:37:09 [dbug] Command stdout: < Failure: (22, 'The requested URL returned error: 401')

                          >

                           

                          04/09/2013 192:37:10 [dbug] Command stdout: <>

                           

                          04/09/2013 192:37:10 [warn] Unable to upload /opt/vmware/www/build/Tenacity.9/192.68.51.209_Tenacity.9_provstart.iso to the disk-core8 datastore.

                          04/09/2013 192:37:10 [warn] 

                          %3  %7  %11  %15  %19  %23  %26  %30  %34  %38  %42 Failure: (22, 'The requested URL returned error: 401')

                           

                          04/09/2013 192:37:10 [dbug] Ran system shell command "/opt/vmware/share/build/status --set --instance Tenacity.9 --key 'Operation' --value 'canceling' 2>/tmp/ZvIcORSPtQ"

                          04/09/2013 192:37:10 [dbug] system shell command returned: exit 0, signal 0, core 0

                          04/09/2013 192:37:10 [error] Encountered a fatal build error!

                          04/09/2013 192:37:10 [info] 

                          04/09/2013 192:37:10 [info] 

                          04/09/2013 192:37:10 [info] Cleaning up ...

                          04/09/2013 192:37:10 [dbug] 

                          04/09/2013 192:37:10 [dbug] Input Command: </opt/vmware/share/build/datastore --test  --server virtcenter.company.com --port 443 --user domainname\root --datastore 'disk-core8' --folder 'iso' --file 'CentOS-6.4-x86_64-bin-DVD1.iso.lock' --datacenter 'NA Core QA'>

                          04/09/2013 192:37:10 [dbug] Expect wait-time: <60> max-time: <7200>

                          04/09/2013 192:37:10 [dbug] Command to spawn: <rm -f /tmp/NSjkCy0np3; /opt/vmware/share/build/datastore --test  --server virtcenter.company.com --port 443 --user domainname\root --datastore 'disk-core8' --folder 'iso' --file 'CentOS-6.4-x86_64-bin-DVD1.iso.lock' --datacenter 'NA Core QA' 2>&1; echo $? > /tmp/NSjkCy0np3>

                          04/09/2013 192:37:11 [dbug] Command stdout: <

                          Failure: (22, 'The requested URL returned error: 401')

                          >

                           

                          04/09/2013 192:37:11 [dbug] Waiting for command to complete...

                          04/09/2013 192:37:11 [dbug] Verbose interval - 60s

                          04/09/2013 192:37:11 [dbug] Command stdout: <>

                           

                          04/09/2013 192:37:12 [dbug] Command stdout: <>

                           

                          04/09/2013 192:37:12 [info] Cleaning up provisioning host...

                          04/09/2013 192:37:12 [info] Checking if the virtcenter.company.com connection is still active...

                          04/09/2013 192:37:12 [info] Checking if the virtcenter.company.com connection is still active...

                          04/09/2013 192:37:12 [dbug] Unregistering <192.68.51.209_Tenacity.9> from <virtcenter.company.com>.

                          04/09/2013 192:37:13 [info] Removing transient VM from provisioning host.

                          04/09/2013 192:37:15 [dbug] Deleted <[disk-core8] 192.68.51.209_Tenacity.9> from <virtcenter.company.com> successfully.

                          04/09/2013 192:37:15 [dbug] Refreshing datastore's capacity information.

                          04/09/2013 192:37:15 [dbug] Disconnecting from <vCenter>.

                          04/09/2013 192:37:15 [dbug] 

                          04/09/2013 192:37:15 [dbug] Input Command: </opt/vmware/share/build/datastore --test  --server virtcenter.company.com --port 443 --user domainname\root --datastore 'disk-core8' --folder 'iso' --file 'CentOS-6.4-x86_64-bin-DVD1.iso.lock' --datacenter 'NA Core QA'>

                          04/09/2013 192:37:15 [dbug] Expect wait-time: <60> max-time: <7200>

                          04/09/2013 192:37:15 [dbug] Command to spawn: <rm -f /tmp/5lAvY5eSkR; /opt/vmware/share/build/datastore --test  --server virtcenter.company.com --port 443 --user domainname\root --datastore 'disk-core8' --folder 'iso' --file 'CentOS-6.4-x86_64-bin-DVD1.iso.lock' --datacenter 'NA Core QA' 2>&1; echo $? > /tmp/5lAvY5eSkR>

                          04/09/2013 192:37:17 [dbug] Command stdout: <

                          Failure: (22, 'The requested URL returned error: 401')

                          >

                           

                          04/09/2013 192:37:17 [dbug] Waiting for command to complete...

                          04/09/2013 192:37:17 [dbug] Verbose interval - 60s

                          04/09/2013 192:37:17 [dbug] Command stdout: <>

                           

                          04/09/2013 192:37:18 [dbug] Command stdout: <>

                           

                          04/09/2013 192:37:18 [info] Cleaning up provisioning host...

                          04/09/2013 192:37:18 [dbug] Disconnecting from <vCenter>.

                          04/09/2013 192:37:18 [dbug] Removing symlink /opt/vmware/www/build/.0.

                          04/09/2013 192:37:18 [info] Removing temporary files.

                          04/09/2013 192:37:18 [dbug] Deleting the file tree /opt/vmware/www/build/Tenacity.9/va

                           

                          04/09/2013 192:37:18 [dbug] Ran system shell command "rm -rf /opt/vmware/www/build/Tenacity.9/va 2>/tmp/YIWWoePgAn"

                          04/09/2013 192:37:18 [dbug] system shell command returned: exit 0, signal 0, core 0

                          04/09/2013 192:37:18 [dbug] Deleting the file tree /opt/vmware/www/build/Tenacity.9/installer

                           

                          04/09/2013 192:37:18 [dbug] Ran system shell command "rm -rf /opt/vmware/www/build/Tenacity.9/installer 2>/tmp/qwFZAiUXr7"

                          04/09/2013 192:37:18 [dbug] system shell command returned: exit 0, signal 0, core 0

                          04/09/2013 192:37:18 [dbug] Deleting the file tree /opt/vmware/www/build/Tenacity.9/repo

                           

                          04/09/2013 192:37:18 [dbug] Ran system shell command "rm -rf /opt/vmware/www/build/Tenacity.9/repo 2>/tmp/YwDPU0eR9n"

                          04/09/2013 192:37:18 [dbug] system shell command returned: exit 0, signal 0, core 0

                          04/09/2013 192:37:18 [dbug] Deleting the file tree /opt/vmware/www/build/Tenacity.9/customize

                           

                          04/09/2013 192:37:18 [dbug] Ran system shell command "rm -rf /opt/vmware/www/build/Tenacity.9/customize 2>/tmp/3YPo9tAFTJ"

                          04/09/2013 192:37:18 [dbug] system shell command returned: exit 0, signal 0, core 0

                          04/09/2013 192:37:18 [dbug] Deleting the file tree /opt/vmware/www/build/Tenacity.9/script

                           

                          04/09/2013 192:37:18 [dbug] Ran system shell command "rm -rf /opt/vmware/www/build/Tenacity.9/script 2>/tmp/YTyOnsBaSh"

                          04/09/2013 192:37:18 [dbug] system shell command returned: exit 0, signal 0, core 0

                          04/09/2013 192:37:18 [info] Build/Validation process has successfully aborted.

                           

                          04/09/2013 192:37:18 [dbug] Ran system shell command "/opt/vmware/share/build/status --set --instance Tenacity.9 --key 'Status' --value 'failed' 2>/tmp/a7uwVq1zQI"

                          04/09/2013 192:37:18 [dbug] system shell command returned: exit 0, signal 0, core 0

                           

                          Loading...Loading...

                          • 10. Re: Getting this error during the build step: Failed to communicate with VI server
                            samdoyle Enthusiast
                            VMware Employees

                            Hi, to use the new ovftool you can run the command that is being produced manually to try it. You don't need to go through the full build process.

                            • 11. Re: Getting this error during the build step: Failed to communicate with VI server
                              mfinn Novice

                              I see that you are using vSphere 5.1 as a virtualization platform for provisioning.  While I don't know if this will work, I'm concerned that it may not as only 5.0 is listed for supported virtualization platforms.  Studio 2.6 was built and released before 5.1 was released, so it is possible it is not listed as an option for this reason and may still work.  However, you may keep peeling this onion and find more and more issues as you go?

                              • 12. Re: Getting this error during the build step: Failed to communicate with VI server
                                Desrtrider Novice

                                Got it  to work, the problem was not the platform so much as the fact that in one vSphere they were using lots of non DOS names, with spaces, etc. in them. Even passwords with "#" in them caused very odd issues. Moved to a setup with out this and, it started working fine, well, as fine as it gets. I could build and use vms with interfaces that mostly worked.I also had to switch to a Chrome browser because of some odd java errors (in the vmstudio itself.)

                                Onions are great-- if they are baked completely!