Menu

v. 2.1.1 - line 801: arithmetic syntax error

33HOPS
2014-01-22
2014-04-01
  • 33HOPS

    33HOPS - 2014-01-22

    My command line is:
    /vmfs/volumes/48b736bb-f1997868-e6dc-001e4fa19b9f/xsibackup/xsibackup --backup-point=/vmfs/volumes/6ce12249-e40375a7/BACKUPS --backup-type=custom --backup-vms="EPPC-TCXX1A" --mail-from=sysmail@myserver.com --mail-to=sysmail@myserver.com --smtp-srv=192.168.33.5 --smtp-port=25 --smtp-usr=myusername --smtp-pwd=XXXXXX

    Please help

     

    Last edit: 33HOPS 2014-01-22
  • 33HOPS

    33HOPS - 2014-01-22

    This is caused by the real path (/vmfs/volumes/6ce12249-e40375a7/BACKUPS) being passed on to the --backup-point variable. By now you have to always use mount points instead of real paths to physical devices as the --backup-point.

     
  • lklepner

    lklepner - 2014-01-22

    I'm having a very similar problem.

    ./xsibackup --backup-point=/vmfs/volumes/datastoreHD1/backups -
    -backup-type=custom --backup-vms=webapp1
    backuppoint="/vmfs/volumes/datastoreHD1/backups

    du: /vmfs/volumes/52bc346a-0ce7b35e-1a01-00304894afec/aether: No such file or directory
    ./xsibackup: line 776: arithmetic syntax error
    ./xsibackup: line 776: arithmetic syntax error

     
    • 33HOPS

      33HOPS - 2014-01-23

      There is something that does not match, you are using a mount path like vmfs/volumes/datastoreHD1/backups but the program is failing at trying to find the used space inside this other directory /vmfs/volumes/52bc346a-0ce7b35e-1a01-00304894afec/aether that aparently has nothing to do with the VM being backed up

       
  • lklepner

    lklepner - 2014-01-22

    I ran another test with this command -
    ./xsibackup --backup-point=/vmfs/volumes/datastoreHD1/backups --backup-type=running --mail-from=email.sender@yourdomain.com --mail-to=email.recipient@anotherdomain.com --smtp-srv=smtp.33hops.com --smtp-port=25 --smtp-usr=username --smtp-pwd=password --test-mode=true

    And got errors:
    ./xsibackup: line 776: arithmetic syntax error

    I'm running ESXi 5.5
    ./xsibackup: line 776: arithmetic syntax error

     

    Last edit: lklepner 2014-01-22
    • 33HOPS

      33HOPS - 2014-01-23

      If the path /vmfs/volumes/datastoreHD1/backups exists and you have a more or less regular configuration nothing should go wrong.

      Send me your e-mail address through this form http://33hops.com/formulario-de-contacto.asp and I might find some time to log into your box and see whats happening, if you allow me to ;-)

       

      Last edit: 33HOPS 2014-01-23
  • Jim D

    Jim D - 2014-02-12

    I'm having this problem also. I think I have tracked it down to the fact that the du statement on line 594.

    this appears to be getting the wrong datastore (picking the last one instead of the first one ...

    im trying to pick my way through the code and decipher exactly which function is getting the wrong data, but its hard without an easy way of debugging the script

    now to the specifics of my setup ...

    Note: DataStoreX is replaced with the real location when running script, not the mount point, but I used the mount point to make it easier to read ...

    First syntax: ./xsibackup.sh --backup-point=/vmfs/volumes/datastore3 --backup-type=running

    Alt syntax: ./xsibackup.sh --backup-point=/vmfs/volumes/datastore2 --backup-type=custom --backup-vms="WS12"

    Datastores: 3x local datastores (individual HDDs for backups), 1x ISCSI (main storage), 1x NFS (for ISOs)

    VM Location: the only running VM is currently stored in Datastore1.

    The problem is that when I run the script using any location, it tries to find the running VM in the NFS datastore ... not Datastore1, where it resides.

     
    • 33HOPS

      33HOPS - 2014-02-12

      Please provide all the details, otherwise we cannot reproduce your error. We need the ESXi version, the literal error, the command run, datastores, VM names.

       
      • 33HOPS

        33HOPS - 2014-02-12

        The getVMSize() function loops though all the datastores to get the full size of the VM. so it cannot pick the wrong datastore as it picks all of them. Please send me more details and we'll find the problem. Send me a copy of the .vmx file if you can.

         
  • Da5id

    Da5id - 2014-02-19

    XSI is looking in the wrong datastore for the VM.

    Campbell is in 52857802-44c03458-0d85-c82a1455e2cc
    It is looking in 52856bf6-9f08d93c-f7a4-c82a1455e2cc

    ESXi 5.5 with the following:

    /vmfs/volumes # ls -l
    total 3136
    drwxr-xr-x 15556f7b-549b1acf-a16f-208f394216fe
    drwxr-xr-x 52856bee-fe7f71a8-8e9a-c82a1455e2cc
    drwxr-xr-t 52856bf6-9f08d93c-f7a4-c82a1455e2cc
    drwxr-xr-x 52856bf6-d238aa7a-a5b5-c82a1455e2cc
    drwxr-xr-t 52857802-44c03458-0d85-c82a1455e2cc
    drwxrwxr-x 96c77ec3-eb786299
    lrwxr-xr-x NFSdatastore1 -> 96c77ec3-eb786299
    lrwxr-xr-x datastore1 -> 52856bf6-9f08d93c-f7a4-c82a1455e2cc
    lrwxr-xr-x datastore2 -> 52857802-44c03458-0d85-c82a1455e2cc
    drwxr-xr-x f7eb8079-c42a290c-7ab5-54ec0497d59f

    Here is the command as run:

    /xsibackup # ./xsibackup --backup-point=/vmfs/volumes/NFSdatastore1/Backups --ba
    ckup-type=custom --backup-vms=Niska
    List of parsed variables:
    .........................
    backuppoint="/vmfs/volumes/NFSdatastore1/Backups"
    backuptype="custom"
    backupvms="Niska"
    Wed, 19 Feb 2014 17:26:35 +0000
    Found --backup-point at /vmfs/volumes/NFSdatastore1/Backups
    The e-mail report will not be sent becouse of the followig reasons:
    [truncated]

    Getting list of all VMs...
    Vmid Name File Guest OS Version Annotation
    1 Niska [datastore1] Niska/Niska.vmx darwin11_64Guest vmx-08
    2 campbell [datastore2] cambell/cambell.vmx otherLinux64Guest vmx-08
    du: /vmfs/volumes/52856bf6-9f08d93c-f7a4-c82a1455e2cc/cambell: No such file or directory
    ./xsibackup: line 807: arithmetic syntax error
    ./xsibackup: line 807: arithmetic syntax error

     
  • Da5id

    Da5id - 2014-02-19

    As a follow up: I tricked the script by creating a directory "cambell" within 52856bf6-9f08d93c-f7a4-c82a1455e2cc. It does not throw the error and is currently in the process of backing up my VM.

     
  • 33HOPS

    33HOPS - 2014-02-19

    For all of you with the error:

    du: /vmfs/volumes/XXXX : No such file or directory
    ./xsibackup: line 807: arithmetic syntax error

    You need NFS v3 with large file support for ESX/ESXi. It simply does not work with NFS servers implementing a lower version of NFS such as some basic NAS units.

    The problem relies in that this servers let ESXi mount their exports but ESXi fails at the time of reading its contents thus making XSIBackup fail, it does let you copy files to it anyway.

    You can try to trick the NFS share by adding the VM folder manually but this is not a solution. This folder will most of the times be created in the ESXi file structure. Do get a proper NFS server, you can use an old computer and install a Linux distro or use NAS free distributions like OpenFiler or OpenNAS

     

    Last edit: 33HOPS 2014-02-20
  • 33HOPS

    33HOPS - 2014-03-17

    Please note that the VM name and the name of the directories where every of the VM files reside has to be the same across all datastores for XSIBackup to work. This a requirement of XSIBackup not © ESXi itself.

     

    Last edit: 33HOPS 2014-03-17
  • efy-eugene

    efy-eugene - 2014-03-26

    I don't have NFS storage but I've still got an error ./xsibackup: line 807: arithmetic syntax error.
    This is because the script addresses another incorrecy datastore

    /vmfs/volumes # ls -l
    total 6144
    drwxr-xr-x 1 root root 8 Jan 1 1970 31411177-8e14b4bc-d895-1a9fc623d2e6
    drwxr-xr-x 1 root root 8 Jan 1 1970 529f7b14-1a38712e-50bd-6805ca1943f5
    drwxr-xr-t 1 root root 2800 Mar 22 12:15 529f7b21-ff132232-103b-6805ca1943f5
    drwxr-xr-x 1 root root 8 Jan 1 1970 529f7b22-ef5d6414-f1c6-6805ca1943f5
    drwxr-xr-t 1 root root 6440 Mar 23 22:24 52d05e77-5e66a921-3b12-6805ca1943f5
    drwxr-xr-t 1 root root 1960 Feb 11 07:31 52ee0e73-cdaa06b8-1e37-6805ca1943f5
    drwxr-xr-t 1 root root 3500 Feb 11 07:37 52ee4595-ad295e04-12bb-6805ca1943f5
    drwxr-xr-t 1 root root 3360 Mar 17 07:28 52ee6e2f-48ad1c53-8f1b-6805ca1943f5
    drwxr-xr-x 1 root root 8 Jan 1 1970 5961be71-839f52ee-520f-91178478af3f
    lrwxr-xr-x 1 root root 35 Mar 26 08:52 BackUp_1 -> 52d05e77-5e66a921-3b12-6805ca1943f5
    lrwxr-xr-x 1 root root 35 Mar 26 08:52 Hitachi_1Tb -> 52ee0e73-cdaa06b8-1e37-6805ca1943f5
    lrwxr-xr-x 1 root root 35 Mar 26 08:52 RAID10 -> 52ee6e2f-48ad1c53-8f1b-6805ca1943f5
    lrwxr-xr-x 1 root root 35 Mar 26 08:52 WD_Black_1Tb -> 52ee4595-ad295e04-12bb-6805ca1943f5
    lrwxr-xr-x 1 root root 35 Mar 26 08:52 datastore1 -> 529f7b21-ff132232-103b-6805ca1943f5

    .......
    105 Zabbix [RAID10] Zabbix/Zabbix.vmx centos64Guest vmx-08
    du: /vmfs/volumes/529f7b21-ff132232-103b-6805ca1943f5/Zabbix: No such file or directory
    ./xsibackup: line 807: arithmetic syntax error
    ./xsibackup: line 807: arithmetic syntax error
    .......
    It i trying to find on datastore1, but in fact Zabbix is located on RAID10, so the path should be as following
    /vmfs/volumes/52ee6e2f-48ad1c53-8f1b-6805ca1943f5/Zabbix

    All storages are physical disks (except for RAID10 - this is the card megaraid 9240 4i)

     
  • 33HOPS

    33HOPS - 2014-03-27

    We have found some problems like this in manually edited .vmx files.
    Please provide XSIBACKUP command and output, we cannot help you if you don't provide this information.

     
  • efy-eugene

    efy-eugene - 2014-03-28

    Of course we can provide, here it goes
    http://screencast.com/t/tZuvEjiIfgC

     
  • 33HOPS

    33HOPS - 2014-03-29

    Could you cut & paste the output of this command:
    vim-cmd vmsvc/get.datastores 105
    It looks like there is more than one datastore declared for this VM but there isn't any folder named after the VM in one of those datastores. Maybe there were some files related to the VM in that datastore before but ESXi did not remove the reference.
    We've known some people simply recreate the folder manually for ESXi to work, but that is only a hack. You should find out why there is a datastore declared when there are currently no files related to the particular VM in that datastore.
    From our part we will take this on account for future releases and ignore non existing folders.

     

    Last edit: 33HOPS 2014-03-29
  • efy-eugene

    efy-eugene - 2014-03-29

    Yes, here is the output. http://screencast.com/t/Zm9wFYgKpya
    /vmfs/volumes/529f7b21-ff132232-103b-6805ca1943f5 # vim-cmd vmsvc/get.datastores 105
    name datastore1 RAID10
    url /vmfs/volumes/529f7b21-ff132232-103b-6805ca1943f5 /vmfs/volumes/52ee6e2f-48ad1c53-8f1b-6805ca1943f5
    capacity 492042190848 1999038840832
    freeSpace 258335571968 990534172672
    accessible 1 1
    type VMFS VMFS
    multipleHostAccess <unset> <unset> </unset></unset>

    But there are issues not with this one, I've tried others and the same problem. All virtual machines were created on other datastores and then copied to RAID10. I'm a little confused, what should I do to make it work?

     
  • 33HOPS

    33HOPS - 2014-03-29

    O.K. we got to the problem.
    If you want to move a VM from one location to another you should remove the VM from the inventory, move the folder and then reattach the VM to the inventory by browsing the new datastore in Configuration => Storage => right mouse button over datastore => browse datastore => find the .vmx file => add to datastore.
    If you do it the way you did it you are leaving remains behind in the configuration data that point nowhere and that's why XSIBackup fails to find the folder. That is why recreating the folder in its original place lets XSIBackup work, but that is only a hack to cover an error and that's not a good way to go.

     

    Last edit: 33HOPS 2014-03-29
  • efy-eugene

    efy-eugene - 2014-03-31

    Sure this is how I did, otherwise I would not be able to switch on VM. I've just removed Zabbix from inventory and re-added but it didn't help.

    107 Zabbix [RAID10] Zabbix/Zabbix.vmx centos64Guest vmx-08
    du: /vmfs/volumes/529f7b21-ff132232-103b-6805ca1943f5/Zabbix: No such file or directory
    ./xsibackup: line 807: arithmetic syntax error
    ./xsibackup: line 807: arithmetic syntax error

     
    • 33HOPS

      33HOPS - 2014-03-31

      I am afraid once you follow that procedure the old datastore is kept somewhere in the VM config and will not desapear even if you dettach the current VMs and reattach it.

      I sent you a link with a fix through your Sourceforge account, please try it and let me know if it worked. This update will simply ignore datastores in the VM configuration that contain no data. It's v 3.0.1 that will be released at the end of this week.

       

      Last edit: 33HOPS 2014-03-31
  • efy-eugene

    efy-eugene - 2014-04-01

    Great, it works! Thanks a lot.
    Here is what it says in the end
    VMs to backup:
    107 Zabbix [RAID10] Zabbix/Zabbix.vmx centos64Guest vmx-08
    Needed room: 14 Gb.
    Available room: 208 Gb.
    Hot backup selected for VM: Zabbix will not be switched off
    /vmfs/volumes/529f7b21-ff132232-103b-6805ca1943f5 #

    Is this ok that there were many files http://screencast.com/t/loRroBeobX
    but backup only has 2 http://screencast.com/t/ChwpObEN ?

    one more ques: is snapshot made when making a hot backup? and is this only the last snapshot that goes into backup?

     
    • 33HOPS

      33HOPS - 2014-04-01

      I'm glad to hear that. Yes, its normal, XSIBackup does not backup logs, memory, locks and so on, it only backs up the .vmx file and the virtual disks. In any case you should attach the resulting .vmx file to your ESXi box and turn it on, this way you will feel more comfortable with it.

      XSIBackup makes a snapshot named after itself and deletes it after completing the backup process. The resulting VM is what existed right before making this snapshot. Existing snapshots are preserved but are not included in the backup, you should back'em up manually if you need them. Maybe it is something to add to the to do list...

       

      Last edit: 33HOPS 2014-04-01

Log in to post a comment.

Auth0 Logo