14 Replies Latest reply on Sep 2, 2013 2:26 AM by aaber

    VM Studio 2.6 - VM building error

    gorsoun Novice

      I am trying to build the VM based on RH 5.5 x64 and CentOS 5.6 x64

      During the process i get the same error for the both OS.

      In the DEBUG.LOG it looks as

       

      16/07/2012 14:05:44 [info] Cleaning up ...
      16/07/2012 14:05:44 [dbug]
      16/07/2012 14:05:44 [dbug] Input Command: </opt/vmware/share/build/datastore --test --server istarndvc.ca.com --port 443 --user VPMBuilder --datastore 'VMFS_2' --folder 'iso' --file 'rhel-server-5.5-x86_64-dvd.iso.lock' --datacenter 'Israel - RnD Share'>
      16/07/2012 14:05:44 [dbug] Expect wait-time: <60> max-time: <7200>
      16/07/2012 14:05:44 [dbug] Command to spawn: <rm -f /tmp/cuezMWu9vp; /opt/vmware/share/build/datastore --test --server istarndvc.ca.com --port 443 --user VPMBuilder --datastore 'VMFS_2' --folder 'iso' --file 'rhel-server-5.5-x86_64-dvd.iso.lock' --datacenter 'Israel - RnD Share' 2>&1; echo $? > /tmp/cuezMWu9vp>
      16/07/2012 14:05:45 [dbug] Command stdout: <
      Failure: (22, 'The requested URL returned error: 404')

       

      Does someone know how to fix this?

      Thanks.

        • 1. Re: VM Studio 2.6 - VM building error
          asharpe Hot Shot
          VMware Employees

          This is not the error. This is simply trying to remove lock files *after* a failure. Look up a little bit in the debug log, and you will find the cause of the real error.

          1 person found this helpful
          • 2. Re: VM Studio 2.6 - VM building error
            gorsoun Novice

            You are right. But the build process was failured because of that.

            Maybe is absent some permissions is reason?
            Thanks.
            • 3. Re: VM Studio 2.6 - VM building error
              asharpe Hot Shot
              VMware Employees

              gorsoun wrote:

               

              You are right. But the build process was failured because of that.

              Maybe is absent some permissions is reason?
              Thanks.

              No. You misunderstand. This is *not* an error; it is the normal exit from a build process. You are getting a 404 because the file is not there, NOR IS IT SUPPOSED TO BE. Please look above that in the debug log to find the real error. Then, we can go from there. Look for words like Failure, and Aborting.

              • 4. Re: VM Studio 2.6 - VM building error
                gorsoun Novice

                Ok. I am at home now.

                I will check the log tomorrow.

                Thank you!

                • 5. Re: VM Studio 2.6 - VM building error
                  asharpe Hot Shot
                  VMware Employees

                  You are certainly not the first person who thought that the 404 from the attempt to clean up the lock file was the error when a build fails, so we are going to make that specific operation *not* produce an error in the debug log. Because, after all, it is *not* an error, and it's obviously very misleading. Thanks for your input, I'm off to code a fix for this.

                  • 6. Re: VM Studio 2.6 - VM building error
                    gorsoun Novice

                    This means that I have yet to find the true cause of build failure.

                    Thank you!

                    • 7. Re: VM Studio 2.6 - VM building error
                      gorsoun Novice

                      At the same time in a Build Log file, found the following entry:

                       

                      16/07/2012 14:05:43 [info] Removing transient VM from provisioning host.
                      16/07/2012 14:05:44 [error] Aborted by user or system intervention (signal Undefined subroutine &Can't call method "state" on an undefined value at /usr/share/perl/5.8/VMware/VICommon.pm line 1878.
                      ::fault_string called at /opt/vmware/lib/build/VADK/ProvInterface/Vim.pm line 2145
                      was caught).

                       

                      and in the vCenter Resent Tasks:

                       

                      Delete file
                      VMFS_2
                      File [VMFS_2]
                      10.219.20.59_tes-
                      tProfile2.1 was not
                      found
                      VPMBuilder

                       

                      Status of the build - Failed.

                      • 8. Re: VM Studio 2.6 - VM building error
                        asharpe Hot Shot
                        VMware Employees

                        We have seen this, but rarely. It appears to be a bug in the VI SDK that Studio is using to talk to vCenter/ESX. We have already worked around this in the current development code, but you can change three lines in Vim.pm to get around this issue.

                         

                        The fix is to change all occurences of $@->fault_string to simply $@. The three places are in the file /opt/vmware/lib/build/VADK/ProvInterface/Vim.pm, and look like the following:

                         

                        -               VADK::Log::dMsg('PowerOnVM error: '. $@->fault_string);                                                  
                        +               VADK::Log::dMsg('PowerOnVM error: '. $@);                                                                

                         


                        -               VADK::Log::dMsg('UnregisterVM error: '. $@->fault_string);                                               
                        +               VADK::Log::dMsg('UnregisterVM: error: '. $@);                                                            

                         


                        -         VADK::Log::wMsg("Failed to delete <".$vmDsPath."> from <".$self->{&K_PROVHOSTNAME}.">: ".$@->fault_string);    
                        +         VADK::Log::wMsg("Failed to delete <".$vmDsPath."> from <".$self->{&K_PROVHOSTNAME}.">: ".$@);              

                        1 person found this helpful
                        • 9. Re: VM Studio 2.6 - VM building error
                          gorsoun Novice

                          Great!

                          Thank You a lot!

                           

                          Now I have a new question.
                          I am trying to build VM based on CentOS 6.2 or 6.3
                          In both cases I do not see the packages descriptions in the tab Application.
                          For the builtin packages I see:
                               Package details are not available. Unable to verify that package exists on the ISO.
                          And I can not add anything.

                          Please see the attached file build_profile.xml

                           

                          Thanks

                          • 10. Re: VM Studio 2.6 - VM building error
                            gorsoun Novice

                            And in the Application Install Log I've got the following error:

                             

                            http://10.219.20.59/build/CentOS_6.3_x64_test.1/repo/iso/Server/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404"
                            Trying other mirror.
                            Error: Cannot retrieve repository metadata (repomd.xml) for repository: iso. Please verify its path and try again
                            STUDIO ABORT: Error: Error while updating yum.

                            • 11. Re: VM Studio 2.6 - VM building error
                              asharpe Hot Shot
                              VMware Employees

                              We have not tested CentOS 6.2 or 6.3. So, you can add support using the studiocli --newos option. But, perhaps RHEL/CentOS has moved the package metadata file on the DVD from where we expect  it, or the format has changed. The UI uses that metadata file to let you browse and choose packages; the backend code uses that metadata file to build the manifest list for updates. We look for the file referenced in the build profile in the ISO element, retrieved by the following xpath expression:

                              /ovf:Envelope/Section[@xsi:type='vadk:JEOSSection_Type']/vadk:ISO/@vadk:packageMetadataPath

                              In your build profile, that attribute contains:
                              "repodata/primary.xml.gz"


                              In case the format of this file also changed, the backend code is in  /opt/vmware/lib/build/VADK/findRedHatPackage.py. Near the top of the file, we  have a comment that details what we think the format is.

                              • 12. Re: VM Studio 2.6 - VM building error
                                gorsoun Novice

                                Are you going to fix it in the nearest time?

                                 

                                Thanks.

                                • 13. Re: VM Studio 2.6 - VM building error
                                  asharpe Hot Shot
                                  VMware Employees

                                  There is nothing to fix. Each new version of an operating system is quite often different, and usually subtly so. The OS vendors have no reason to make this exactly the way they were in previous releases, and they don't seem to care about automatic installation mechanisms that break when they feel like changing something. This is why Studio has so many places that can be configured.

                                  • 14. Re: VM Studio 2.6 - VM building error
                                    aaber Novice

                                    Hello asharpe,

                                    Thanks for the Vim.pm fix above.

                                    Solved my problem and made my day

                                    x10

                                     

                                    AAber