Running custom quiescing scripts inside Windows & Linux virtual machines
search cancel

Running custom quiescing scripts inside Windows & Linux virtual machines

book

Article ID: 313544

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

This article provides answers to frequently asked questions on running custom quiescing scripts (pre-freeze and post-thaw) inside Windows and Linux virtual machines.

 
Custom quiescing scripts are often used by third-party backup modules that integrate with VMware APIs for Data Protection (VADP).

Note: VMware Tools must be installed in the guest operating system for this feature to work correctly.

Environment

VMware vSphere 6.7.x
VMware vSphere ESXi 6.0
VMware vSphere ESXi 6.5

Resolution

Q. What is the default directory location for the custom scripts to be used during quiescing of a virtual machine?

A.

Windows:
The directory location for custom quiescing scripts on Windows is by default C:\Program Files\VMware\VMware Tools\backupScripts.d.

It will be different if VMware Tools was installed somewhere other than the default location of C:\Program Files\VMware\VMware Tools.

In general, the quiescing scripts are located in the “backupScripts.d” subdirectory of the directory where VMware Tools is installed.

To know the name of VMware Tools installation directory, please check it from the below Windows Registry:
“HKLM\Software\VMware, Inc.\VMware Tools\InstallPath”.

Linux:
The directory location for custom quiescing scripts on Linux is by default /etc/vmware-tools/backupScripts.d/.

Q. Does VMware Tools automatically create backupScripts.d directory in the virtual machine?

A. The backupScripts.d directory is not created or deleted automatically when VMware Tools is installed or uninstalled in Windows or Linux virtual machine. The directory has to be created manually when you want to setup custom quiescing scripts in the virtual machine. Similarly, the directory and its files have to be removed manually after uninstalling VMware Tools.

Q. In what order does VMware Tools invoke the custom quiescing scripts in the virtual machine?

A.
VMware Tools invokes the custom quiescing scripts in the following order before quiescing/freezing the guest file systems:

  1. The legacy pre-freeze script (C:\Windows\pre-freeze-script.bat on Windows and /usr/sbin/pre-freeze-script on Linux) is executed.
  2. All the scripts in backupScripts.d (C:\Program Files\VMware\VMware Tools\backupScripts.d on Windows and /etc/vmware-tools/backupScripts.d on Linux) are executed in alphabetical order with "freeze" as the first argument.

VMware Tools invokes the custom quiescing scripts in the following order after thawing/unfreezing the guest file systems:

  1. All the scripts in backupScripts.d (C:\Program Files\VMware\VMware Tools\backupScripts.d on Windows and /etc/vmware-tools/backupScripts.d on Linux) are executed in descending alphabetical order with "thaw" or "freezeFail" as the first argument.
  2. The legacy post-thaw script (C:\Windows\post-thaw-script.bat on Windows and /usr/sbin/post-thaw-script on Linux) is executed.

Caution: The "backupScripts.d" directory should only contain executable scripts. Storing any other type of file or non-executable scripts in this directory may cause a failure during quiescing of the virtual machine.