Uploaded image for project: 'VCL'
  1. VCL
  2. VCL-928

Reference vmx file not saved during image capture if vmprofile.vmdisk = dedicated and repository is mounted on host

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.4.2
    • 2.5
    • vcld (backend)
    • None

    Description

      There's a corner case bug which can occur during a VMware image capture if vmprofile.vmdisk = dedicated, the vmprofile.repositorypath is populated, and the repository is mounted on the host.

      The VMware.pm::capture subroutine first determines if the .vmx and .vmdk files being used by the VM should be renamed or copied on the host to the eventual datastore path for the new image. It only does this if vmprofile.vmdisk = shared or the repository is not mounted on the host:

      if ($vmprofile_vmdisk =~ /(local|dedicated)/ && $repository_mounted_on_vmhost) {
        # Leave files as-is and delete after capture
      }
      

      The VM's .vmx file remains in its original form when this case is encountered. Later on in the capture process, the .vmdk still residing in the VM's working directory is copied to the repository. This step does not copy a vmx.reference file to the repository because the VM's .vmx file was not renamed earlier to match the image name:

      VMware.pm:copy_vmdk|5925|reference vmx file not copied to vmdk directory because it does not exist:
      

      The image capture succeeds but images fail to load if the captured VM was using a storage adapter different than the one chosen if the vmx.reference file does not exist.

      Attachments

        Activity

          People

            arkurth Andrew Kurth
            arkurth Andrew Kurth
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: