VMware Cloud Community
TWBrowning
Contributor
Contributor

Pre-freeze-script error handling

Hi all,


We have some servers running InterSystems Caché databases that are not VSS-compatible. We're using a VM backup solution (Veeam) to create quiesced backups of the VMs.

I have made pre-freeze and post-thaw scripts to quiesce the databases which work fine.

I'm currently testing the error handling behaviour. If for whatever reason we can't quiesce the database we want the backup to fail. I have read many reports of people whose attempts to create quiesced snapshots failed because their pre-freeze or post-thaw scripts returned a non-zero error code, so I thought this would be straight forward to set up.

However no matter what I do I can't make the snapshot operation fail. It looks as though VMware Tools can't detect the value returned by the batch scripts, or at least that it doesn't act on them if they're over 0. I've tried batch files with the following:

1. exit /b 1

2. notepad nonexistentfile.txt

3. notarealcommand

I've also tried a batch script with just 'pause' in an effort to meet some built in time out.

Nothing I do makes the snapshot operation fail. hostd.log reports that the batch file ran successfully each time.

Does anyone know how I can let VMware Tools know that the operation has failed? The utility we use to suspend the Caché database returns errorlevels we can act on appropriately in the batch, but we can't get that information back to vSphere to fail the snapshot operation.

We are running ESXi 4.1 build 582267

The VMware Tools version is 8.3.12 build 559003

The guest OS for the systems I'm testing is Windows Server 2008 R2 with SP1

Curiously, contrary to the VMware documentation, VMware Tools attempts to run C:\Windows\pre-freeze-script.bat and C:\Windows\post-thaw-script.bat instead of C:\Program Files\VMware\VMware Tools\backupScripts.d\*.* when we take a quiesced snapshot. I don't know if this is related.

I've not logged a service request yet as there's some mix up with our service contract and who is allowed to log cases on it.

Any help would be great.

Thanks,

Tom Browning

0 Kudos
0 Replies