VMware vSphere

 View Only

 Freeze and Thaw Scripts (cont.)

Christopher Thompson's profile image
Christopher Thompson posted Jan 08, 2025 11:26 AM

In reference to this thread:
Freeze and thaw scripts | vCenter

Does anyone have a resource for sample scripts to assist with quiescing filesystems on Windows Hosts prior to a backup? We're facing challenges when our Dell Avamar Appliance attempts to backup certain Windows VM's. It initiates a snapshot prior to the backup and then apparently uses CBT to track and backup changes to the VM's filesystem during the backup process. Routinely, I run into logged errors regarding quiescing the virtual machine. This seems to primarily be an issue with our Virtualized Domain Controllers and SQL Server.  The backup will complete, yet the following is seen in the logs:
---
2025-01-08 04:14:37 avvcbimage Warning <16277>: vSphere Task failed (application quiesce): 'An error occurred while quiescing the virtual machine. See the virtual machine's event log for details.'.
2025-01-08 04:14:37 avvcbimage Warning <43652>: Snapshot 'Avamar-1736309668fd87a003111cfc40eeef85d49f492d305e986d49' creation for VM '[Admin Datastore] HSADC02/HSADC02.vmx' task creation encountered a quiesce problem
2025-01-08 04:14:37 avvcbimage Warning <43656>: Application consistent snapshot quiesce failure.
2025-01-08 04:14:37 avvcbimage Warning <43657>: The VM could not be quiesced prior to snapshot creation and this backup may not be used as a base for subsequent CBT backups if successful.
2025-01-08 04:14:37 avvcbimage Warning <40711>:     Consider using the pre-freeze and post-thaw scripts to facilitate VM quiescing
2025-01-08 04:14:37 avvcbimage Warning <41146>:     This error might caused by the pre-freeze script returning a non-zero error code.
---
I am going to try and resolve this with Dell as the Avamar System is their product. However, there is obviously some tight immigration with VMware here as it's leveraging the snapshotting and CBT functionality in VCenter as part of the solution. Therefore, I thought I'd reach out here for some help.

Thanks in advance...

Andrea Consalvi's profile image
Andrea Consalvi

Hey,

Yeah, this is a common issue when backing up Windows VMs, especially Domain Controllers and SQL Servers. The fact that Avamar suggests using pre-freeze and post-thaw scripts means that the backup is failing to create a fully application-consistent snapshot.

If you haven’t already, I’d check if the VMware Tools VSS driver is installed and working properly inside the guest OS. You can verify that with:

vssadmin list writers 

If any writers are in a failed state, that’s likely the issue. Restarting the VMware Tools service inside the VM sometimes helps:

net stop vmtools && net start vmtools 

For Domain Controllers and SQL Servers, it’s usually best to use custom quiescing scripts to properly prepare the system for snapshotting. You’ll need two scripts:

Pre-freeze script (before snapshot) – This should:

Temporarily pause or flush pending transactions (for SQL)

Ensure Active Directory isn’t in an inconsistent state

Post-thaw script (after snapshot) This should:

Resume any paused processes

Confirm application integrity

On a Windows VM, the scripts should be placed in:

C:\Program Files\VMware\VMware Tools\backupScripts.d\ 

And must be named pre-freeze-script.bat and post-thaw-script.bat.