2 Replies Latest reply on Oct 28, 2015 1:46 PM by Dson

    ESXI 6.0 - Can't create directory

    Dson Lurker

      Hi - I seem to be having a permissions problem when running the main backup script - it will not create the VM_BACKUP_VOLUME directory as stated in the docs.

       

      I am logged in as root over SSH and installed using the VIB. Same error through WinSCP and PuTTY.

       

      Any ideas?

       

       

      [root@UNKNOWN:/opt/ghettovcb/bin] ./ghettoVCB.sh -m homeMedia -g /etc/ghettovcb/backup.conf -d debug
      Logging output to "/tmp/ghettoVCB-2015-10-26_22-40-06-4788334.log" ...
      2015-10-26 22:40:06 -- info: ============================== ghettoVCB LOG START ==============================
      
      2015-10-26 22:40:06 -- debug: Succesfully acquired lock directory - /tmp/ghettoVCB.work
      
      2015-10-26 22:40:06 -- debug: HOST VERSION: VMware ESXi 6.0.0 build-2494585
      2015-10-26 22:40:06 -- debug: HOST LEVEL: VMware ESXi 6.0.0 GA
      2015-10-26 22:40:06 -- debug: HOSTNAME: UNKNOWN
      
      2015-10-26 22:40:06 -- info: CONFIG - USING GLOBAL GHETTOVCB CONFIGURATION FILE = /etc/ghettovcb/backup.conf
      2015-10-26 22:40:06 -- info: CONFIG - VERSION = 2015_05_06_1
      2015-10-26 22:40:06 -- info: CONFIG - GHETTOVCB_PID = 4788334
      2015-10-26 22:40:06 -- info: CONFIG - VM_BACKUP_VOLUME = /vmfs/volumes/backups
      2015-10-26 22:40:06 -- info: CONFIG - VM_BACKUP_ROTATION_COUNT = 2
      2015-10-26 22:40:06 -- info: CONFIG - VM_BACKUP_DIR_NAMING_CONVENTION = 2015-10-26_22-40-06
      2015-10-26 22:40:06 -- info: CONFIG - DISK_BACKUP_FORMAT = thin
      2015-10-26 22:40:06 -- info: CONFIG - POWER_VM_DOWN_BEFORE_BACKUP = 0
      2015-10-26 22:40:06 -- info: CONFIG - ENABLE_HARD_POWER_OFF = 0
      2015-10-26 22:40:06 -- info: CONFIG - ITER_TO_WAIT_SHUTDOWN = 3
      2015-10-26 22:40:06 -- info: CONFIG - POWER_DOWN_TIMEOUT = 5
      2015-10-26 22:40:06 -- info: CONFIG - SNAPSHOT_TIMEOUT = 15
      2015-10-26 22:40:06 -- info: CONFIG - LOG_LEVEL = debug
      2015-10-26 22:40:06 -- info: CONFIG - BACKUP_LOG_OUTPUT = /tmp/ghettoVCB-2015-10-26_22-40-06-4788334.log
      2015-10-26 22:40:06 -- info: CONFIG - ENABLE_COMPRESSION = 0
      2015-10-26 22:40:06 -- info: CONFIG - VM_SNAPSHOT_MEMORY = 0
      2015-10-26 22:40:06 -- info: CONFIG - VM_SNAPSHOT_QUIESCE = 0
      2015-10-26 22:40:06 -- info: CONFIG - ALLOW_VMS_WITH_SNAPSHOTS_TO_BE_BACKEDUP = 0
      2015-10-26 22:40:06 -- info: CONFIG - VMDK_FILES_TO_BACKUP = all
      2015-10-26 22:40:06 -- info: CONFIG - VM_SHUTDOWN_ORDER =
      2015-10-26 22:40:06 -- info: CONFIG - VM_STARTUP_ORDER =
      2015-10-26 22:40:06 -- info: CONFIG - RSYNC_LINK = 0
      2015-10-26 22:40:06 -- info: CONFIG - EMAIL_LOG = 0
      2015-10-26 22:40:06 -- info:
      Datastore not found.
      
      Datastore not found.
      
      Datastore not found.
      
      2015-10-26 22:40:08 -- debug: Storage Information before backup:
      2015-10-26 22:40:08 -- debug: SRC_DATASTORE: server
      2015-10-26 22:40:08 -- debug: SRC_DATASTORE_CAPACITY: 63488.0
      2794.2 GB
      2015-10-26 22:40:08 -- debug: SRC_DATASTORE_FREE: 2567.4 GB
      2015-10-26 22:40:08 -- debug: SRC_DATASTORE_BLOCKSIZE: 1
      2015-10-26 22:40:08 -- debug: SRC_DATASTORE_MAX_FILE_SIZE: 256 GB
      2015-10-26 22:40:08 -- debug:
      2015-10-26 22:40:08 -- debug: DST_DATASTORE: backups
      2015-10-26 22:40:08 -- debug: DST_DATASTORE_CAPACITY: 0.0 GB
      2015-10-26 22:40:08 -- debug: DST_DATASTORE_FREE: 0.0 GB
      2015-10-26 22:40:08 -- debug: DST_DATASTORE_BLOCKSIZE: NA
      2015-10-26 22:40:08 -- debug: DST_DATASTORE_MAX_FILE_SIZE: NA
      2015-10-26 22:40:08 -- debug:
      mkdir: can't create directory '/vmfs/volumes/backups/': Operation not permitted
      2015-10-26 22:40:08 -- info: Unable to create "/vmfs/volumes/backups/homeMedia"! - Ensure VM_BACKUP_VOLUME was defined correctly
      
      
        • 1. Re: ESXI 6.0 - Can't create directory
          Dson Lurker

          So I've tried writing to /tmp instead, as the "root" account has full access to that directory. This furthers it slightly, but is ultimately not enough to start a backup.

           

          I find it very strange that upon logging in as root, I get the following prompt (note the lack of #):

          [root@unknown:~]
          
          

           

          Root user is set up as an Administrator with the correct permissions in authorization.xml (as per this kb article):

          <ACEDataRoleID>-1</ACEDataRoleID>
          

           

          New failure message:

          2015-10-28 21:07:47 -- debug: SRC_DATASTORE_FREE: 2567.4 GB
          2015-10-28 21:07:47 -- debug: SRC_DATASTORE_BLOCKSIZE: 1
          2015-10-28 21:07:48 -- debug: SRC_DATASTORE_MAX_FILE_SIZE: 256 GB
          2015-10-28 21:07:48 -- debug:
          2015-10-28 21:07:48 -- debug: DST_DATASTORE:
          2015-10-28 21:07:48 -- debug: DST_DATASTORE_CAPACITY: 0.0 GB
          2015-10-28 21:07:48 -- debug: DST_DATASTORE_FREE: 0.0 GB
          2015-10-28 21:07:48 -- debug: DST_DATASTORE_BLOCKSIZE: NA
          2015-10-28 21:07:48 -- debug: DST_DATASTORE_MAX_FILE_SIZE: NA
          2015-10-28 21:07:48 -- debug:
          2015-10-28 21:07:48 -- debug: getVMDKs() - homeMedia_1.vmdk###100:homeMedia.vmdk###80:
          2015-10-28 21:07:48 -- info: Initiate backup for homeMedia
          2015-10-28 21:07:48 -- info: Creating Snapshot "ghettoVCB-snapshot-2015-10-28" for homeMedia
          2015-10-28 21:07:49 -- debug: Waiting for snapshot "ghettoVCB-snapshot-2015-10-28" to be created
          2015-10-28 21:07:49 -- debug: Snapshot timeout set to: 900 seconds
          2015-10-28 21:07:50 -- debug: findVMDK() - Searching for VMDK: "homeMedia_1.vmdk" to backup
          2015-10-28 21:07:50 -- debug: /sbin/vmkfstools -i "/vmfs/volumes/server/homeMedia/homeMedia_1.vmdk" -a "lsilogic" -d "thin" "/tmp/backups/homeMedia/homeMedia-2015-10-28_21-07-45/homeMedia_1.vmdk"
          
          2015-10-28 21:07:50 -- info: ERROR: error in backing up of "/vmfs/volumes/server/homeMedia/homeMedia_1.vmdk" for homeMedia
          2015-10-28 21:07:50 -- debug: findVMDK() - Searching for VMDK: "homeMedia.vmdk" to backup
          2015-10-28 21:07:50 -- debug: /sbin/vmkfstools -i "/vmfs/volumes/server/homeMedia/homeMedia.vmdk" -a "lsilogic" -d "thin" "/tmp/backups/homeMedia/homeMedia-2015-10-28_21-07-45/homeMedia.vmdk"
          
          2015-10-28 21:07:50 -- info: ERROR: error in backing up of "/vmfs/volumes/server/homeMedia/homeMedia.vmdk" for homeMedia
          2015-10-28 21:07:53 -- info: Removing snapshot from homeMedia ...
          2015-10-28 21:07:53 -- info: Backup Duration: 5 Seconds
          2015-10-28 21:07:53 -- info: ERROR: Unable to backup homeMedia due to error in VMDK backup!
          
          2015-10-28 21:07:53 -- info: ###### Final status: ERROR: No VMs backed up! ######
          
          2015-10-28 21:07:53 -- debug: Succesfully removed lock directory - /tmp/ghettoVCB.work
          
          
          • 2. Re: ESXI 6.0 - Can't create directory
            Dson Lurker

            Ok, so even though I searched the forums, I somehow came across this thread which solves the issue.

             

            After changing the backup dir to /vmfs/volumes/server/backups, it works ok. I really think that the default conf file should contain this, or maybe clarify a bit more in the docs.