3 Replies Latest reply on Apr 1, 2016 12:02 AM by InsertCoin

    Can't backup VMs to NFS server

    AlexanderB1 Lurker

      Hello everyone,

       

      really stuck configuring GhettoVCB script to backup some VMs...

       

      I have only one physical hard drive 'datastore1' on my ESXi 6.0 host. I also have NFS server:


      /nfs

      IP addr: 192.168.3.200

       

      First I made a little test: I have added this NFS server (file system is ext4) as a new storage 'teststorage' using vSphere Client. When i type from console

      # mkdir /vmfs/volumes/datastore1/somefolder

      # mkdir /vmfs/volumes/teststorage/newfolder

      everyghing is ok. Also:

      # esxcli storage nfs add -H 192.168.3.200 -s /nfs/backups -v backup

      # mkdir /vmfs/volumes/backup/tesfolder

      Well looks like everything is working. So I have unmounted NFS from vSphere Client.

       

      Next step I tried to configure the script:

      VM_BACKUP_VOLUME=/vmfs/volumes/datastore1/autobackup

      DISK_BACKUP_FORMAT=thin

      VM_BACKUP_ROTATION_COUNT=1

      POWER_VM_DOWN_BEFORE_BACKUP=0

      ENABLE_HARD_POWER_OFF=0

      ITER_TO_WAIT_SHUTDOWN=3

      POWER_DOWN_TIMEOUT=5

      ENABLE_COMPRESSION=0

      VM_SNAPSHOT_MEMORY=0

      VM_SNAPSHOT_QUIESCE=0

      ALLOW_VMS_WITH_SNAPSHOTS_TO_BE_BACKEDUP=1

      NFS_SERVER=192.168.3.200

      NFS_MOUNT=/nfs/backups

      NFS_VM_BACKUP_DIR=autobackup

      ENABLE_NON_PERSISTENT_NFS=0

      UNMOUNT_NFS=1

      SNAPSHOT_TIMEOUT=15

      EMAIL_LOG=1

      EMAIL_SERVER=mail.core.local

      EMAIL_SERVER_PORT=25

      EMAIL_DELAY_INTERVAL=1

      EMAIL_TO=admins@mail.local

      EMAIL_FROM=ghettoVCB@vm01.core.local

      VM_SHUTDOWN_ORDER=

      VM_STARTUP_ORDER=

      and launched them with a command using SSH:

      # /ghettoVCB-master/ghettoVCB.sh -g /ghettoVCB-master/my.conf -f /ghettoVCB-master/my.list > /ghettoVCB-master/ghettoVCB14.log

       

      So I got the next output:

      Logging output to "/tmp/ghettoVCB-2016-03-31_04-34-07-3440436.log" ...

      2016-03-31 04:34:07 -- info: ============================== ghettoVCB LOG START ==============================

       

       

      2016-03-31 04:34:07 -- info: CONFIG - USING GLOBAL GHETTOVCB CONFIGURATION FILE = /ghettoVCB-master/kanon.conf

      2016-03-31 04:34:07 -- info: CONFIG - VERSION = 2015_05_06_1

      2016-03-31 04:34:07 -- info: CONFIG - GHETTOVCB_PID = 3440436

      2016-03-31 04:34:07 -- info: CONFIG - VM_BACKUP_VOLUME = /vmfs/volumes/datastore1/autobackup

      2016-03-31 04:34:07 -- info: CONFIG - VM_BACKUP_ROTATION_COUNT = 1

      2016-03-31 04:34:07 -- info: CONFIG - VM_BACKUP_DIR_NAMING_CONVENTION = 2016-03-31_04-34-07

      2016-03-31 04:34:07 -- info: CONFIG - DISK_BACKUP_FORMAT = thin

      2016-03-31 04:34:07 -- info: CONFIG - POWER_VM_DOWN_BEFORE_BACKUP = 0

      2016-03-31 04:34:07 -- info: CONFIG - ENABLE_HARD_POWER_OFF = 0

      2016-03-31 04:34:07 -- info: CONFIG - ITER_TO_WAIT_SHUTDOWN = 3

      2016-03-31 04:34:07 -- info: CONFIG - POWER_DOWN_TIMEOUT = 5

      2016-03-31 04:34:07 -- info: CONFIG - SNAPSHOT_TIMEOUT = 15

      2016-03-31 04:34:07 -- info: CONFIG - LOG_LEVEL = info

      2016-03-31 04:34:07 -- info: CONFIG - BACKUP_LOG_OUTPUT = /tmp/ghettoVCB-2016-03-31_04-34-07-3440436.log

      2016-03-31 04:34:07 -- info: CONFIG - ENABLE_COMPRESSION = 0

      2016-03-31 04:34:07 -- info: CONFIG - VM_SNAPSHOT_MEMORY = 0

      2016-03-31 04:34:07 -- info: CONFIG - VM_SNAPSHOT_QUIESCE = 0

      2016-03-31 04:34:07 -- info: CONFIG - ALLOW_VMS_WITH_SNAPSHOTS_TO_BE_BACKEDUP = 1

      2016-03-31 04:34:07 -- info: CONFIG - VMDK_FILES_TO_BACKUP = all

      2016-03-31 04:34:07 -- info: CONFIG - VM_SHUTDOWN_ORDER =

      2016-03-31 04:34:07 -- info: CONFIG - VM_STARTUP_ORDER =

      2016-03-31 04:34:07 -- info: CONFIG - RSYNC_LINK = 0

      2016-03-31 04:34:07 -- info: CONFIG - BACKUP_FILES_CHMOD =

      2016-03-31 04:34:07 -- info: CONFIG - EMAIL_LOG = 1

      2016-03-31 04:34:07 -- info: CONFIG - EMAIL_SERVER = mail.core.local

      2016-03-31 04:34:07 -- info: CONFIG - EMAIL_SERVER_PORT = 25

      2016-03-31 04:34:07 -- info: CONFIG - EMAIL_DELAY_INTERVAL = 1

      2016-03-31 04:34:07 -- info: CONFIG - EMAIL_FROM = ghettoVCB@vm01.core.local

      2016-03-31 04:34:07 -- info: CONFIG - EMAIL_TO = admins@mail.local

      2016-03-31 04:34:07 -- info: CONFIG - WORKDIR_DEBUG = 0

      2016-03-31 04:34:07 -- info:

      2016-03-31 04:34:08 -- info: Powering off initiated for

      , backup will not begin until VM is off...

      2016-03-31 04:34:08 -- info: VM is powerdOff

      2016-03-31 04:34:11 -- info: Initiate backup for Debian_Experimental

      2016-03-31 04:34:11 -- info: Creating Snapshot "ghettoVCB-snapshot-2016-03-31" for Debian_Experimental

      2016-03-31 04:34:12 -- info: ERROR: wrong DISK_BACKUP_FORMAT "thin

      \ specified for Debian_Experimental

      2016-03-31 04:34:13 -- info: Removing snapshot from Debian_Experimental ...

      2016-03-31 04:34:13 -- info: Backup Duration: 2 Seconds

      2016-03-31 04:34:13 -- info: ERROR: Unable to backup Debian_Experimental due to error in VMDK backup!

       

       

      2016-03-31 04:34:13 -- info: ###### Final status: ERROR: No VMs backed up! ######

       

       

      2016-03-31 04:34:13 -- info: ============================== ghettoVCB LOG END ================================

       

       

       

      2016-03-31 03:21:30 -- info: ###### Final status: ERROR: All VMs failed! ######

       

       

      2016-03-31 03:21:30 -- info: ============================== ghettoVCB LOG END ================================

       

      I have tried:

      DISK_BACKUP_FORMAT=zeroedthick, eagerzeroedthick, thin, 2gbsparse

      VM_SNAPSHOT_MEMORY=0/1

      VM_SNAPSHOT_QUIESCE=0/1

      Still the same error in VMDK format.

       

      WM is working fine, no damages.

      There is no any snapshot. VM version: 11

       

      Any ideas?

      Thanks in advance for the help.