3 Replies Latest reply on Sep 24, 2014 11:17 AM by whitemice

    Can't get vim_service - at /usr/lib/perl5/5.10.0/VMware/VICommon.pm line 1660

    Olivier2554 Novice

      Hi,

       

      I think I have vMA running fine and ghettoVCBg2 properly installed but when I try to do any backup, I get:

       

      vma:~/ghettoVCBg2> ./ghettoVCBg2.pl --vmlist vmlist

      Can't get vim_service - the session object is uninitialized or not logged in at /usr/lib/perl5/5.10.0/VMware/VICommon.pm line 1660

       

      And in the log, everything goes right, until:

       

              09-17-2014 14:47:28 --  debug: CopyThread: Start backing up VMDK(s) ...

              09-17-2014 14:47:28 --  debug: backupVMDK: Backup progress: Elapsed time 0 min

       

      and stops.

       

      I am running ESXi 5.5.0.1 free.

       

      vma:/tmp> uname -a

      Linux vma 3.0.101-0.7.17-default #1 SMP Tue Feb 4 13:24:49 UTC 2014 (90aac76) x86_64 x86_64 x86_64 GNU/Linux

       

      TIA,

       

      Olivier

        • 1. Re: Can't get vim_service - at /usr/lib/perl5/5.10.0/VMware/VICommon.pm line 1660
          Olivier2554 Novice

          It must be because /usr/bin/vmkfstools -i does not work for free ESXi.

          • 2. Re: Can't get vim_service - at /usr/lib/perl5/5.10.0/VMware/VICommon.pm line 1660
            whitemice Novice

            I see the same failure message and I'm running licensed ESX5.1.  But my backup seems to get a bit further

            ...

            09-24-2014 06:22:00 --  debug: CopyThread: Start backing up VMDK(s) ...

                09-24-2014 06:22:00 --  debug: backupVMDK: Backup progress: Elapsed time 0 min

                09-24-2014 06:22:01 --  debug: copyTask: send copySuccess message ...

                09-24-2014 06:22:01 --  debug: copyTask: waiting for next job and sleep ...

                09-24-2014 06:23:01 --  debug: backupVMDK: Successfully completed backup for [FC-VMWareESX01] Cornice-Green/Cornice-Green.vmdk Elapsed time: 1 min

                09-24-2014 06:23:03 --  debug: Removing Snapshot "ghettoVCBg2-snapshot-2014-09-24" for Cornice-Green

                09-24-2014 06:23:03 --  debug: checkVMBackupRotation: Starting ...

                09-24-2014 06:23:03 --  debug: Unable to purge [Cornice-Blue] ghetto/Cornice-Green/Error: Can not list directory '[Cornice-Blue] ghettoCornice-Green'. due to rotation max

            It seems odd that the backup takes only a minute.  And in the Cornice-Blue data store no files are created.

            • 3. Re: Can't get vim_service - at /usr/lib/perl5/5.10.0/VMware/VICommon.pm line 1660
              whitemice Novice

              I commented out the section of code call for rotation. Now it runs without error.

              #####################

              # CHECK ROTATION

              #####################

              # &checkVMBackupRotation($vm_view,"[$VM_BACKUP_DATASTORE] $VM_BACKUP_DIRECTORY/$vm_name","[$VM_BACKUP_DATASTORE] $VM_BACKUP_DIRECTORY/$vm_name/$vm_name\-$VM_BACKUP_DIR_NAMING_CONVENTION",$vm_name,$vmx_file);

              &log("info", "Rotation disabled by code modification.\n");

              Only, it doesn't do anything.  I creates no files in the backup data store.  It runs, creates the snapshot, drops the snapshot, and reports success.  And nothing wrote the the backup datastore.  Modification times on the folders remain unchanged.