4 Replies Latest reply on May 8, 2015 2:16 AM by NetWraith

    ghettoVCB - not working with VMs containing SATA-disks (VMDKs)

    NetWraith Novice

      Hi,

       

      I just downloaded and tested ghettoVCB with one of my VMs.

      Unfortunately this VM uses a SATA controller and a SATA-disk.

       

      The VM (HW-Version 10) runs on an ESXi 5.5 Hypervisor.

       

      I checked ghettoVCB.sh and recognized, that at line 408 only "scsi" or "ide" VMDKs will be checked and found:

       

      getVMDKs() {
        #get all VMDKs listed in .vmx file
          VMDKS_FOUND=$(grep -iE '(^scsi|^ide)' "${VMX_PATH}" | grep -i fileName | awk -F " " '{print $1}')
      

       

      I've added "^sata" and then it runs:

       

      getVMDKs() {
          #get all VMDKs listed in .vmx file
          VMDKS_FOUND=$(grep -iE '(^scsi|^ide|^sata)' "${VMX_PATH}" | grep -i fileName | awk -F " " '{print $1}')
      

       

      I think it will be the same at the ghettoVCB-restore.sh at line 166:

       

              #supports DIR or .TGZ from ghettoVCB.sh ONLY!
      
              if [ -d "${VM_TO_RESTORE}" ]; then
      
                  #figure out the contents of the directory (*.vmdk,*-flat.vmdk,*.vmx)
      
                  VM_ORIG_VMX=$(ls "${VM_TO_RESTORE}" | grep ".vmx")
      
                  VM_VMDK_DESCRS=$(ls "${VM_TO_RESTORE}" | grep ".vmdk" | grep -v "\-flat.vmdk")
      
                  VMDKS_FOUND=$(grep -iE '(scsi|ide)' "${VM_TO_RESTORE}/${VM_ORIG_VMX}" | grep -i fileName | awk -F " " '{print $1}')
      
                  VM_FOLDER_NAME=$(echo "${VM_TO_RESTORE##*/}")
      

       

      Corrected version:

       

             #supports DIR or .TGZ from ghettoVCB.sh ONLY!
      
              if [ -d "${VM_TO_RESTORE}" ]; then
      
                  #figure out the contents of the directory (*.vmdk,*-flat.vmdk,*.vmx)
      
                  VM_ORIG_VMX=$(ls "${VM_TO_RESTORE}" | grep ".vmx")
      
                  VM_VMDK_DESCRS=$(ls "${VM_TO_RESTORE}" | grep ".vmdk" | grep -v "\-flat.vmdk")
      
                  VMDKS_FOUND=$(grep -iE '(scsi|ide|sata)' "${VM_TO_RESTORE}/${VM_ORIG_VMX}" | grep -i fileName | awk -F " " '{print $1}')
      
                  VM_FOLDER_NAME=$(echo "${VM_TO_RESTORE##*/}")
      

       

      Does anyone had the same issue?

       

      @lamw:

      Do we have to fix any other lines in your script?

       

       

      Best regards,

      Florian