Comprehensive data protection for all workloads
Post Reply
fgw
Enthusiast
Posts: 84
Liked: 2 times
Joined: Jun 11, 2009 8:39 pm
Full Name: Franz Glatzer
Contact:

Pre-freeze and post-thaw scripts on Solaris?

Post by fgw »

hi all,

has anybody successfully used vmware-tools pre-freeze-script and post-thaw-script scripts with v5.0.2?

have set it up as documented and various posts here suggest. i'm trying to use this on a solaris vm, running on an esxi v3.5 host with latest patch and vmware tools versions.

scripts are located in /usr/sbin and secutrity is set to 777 for testing:

-rwxrwxrwx 1 root root 36 May 30 12:24 /usr/sbin/post-thaw-script
-rwxrwxrwx 1 root root 36 May 30 12:23 /usr/sbin/pre-freeze-script


backup job setting "Enable VMware tools quiescence" under "Advanced Settings" -> "Advanced" is checked
is there something else i need to check?

the scripts contain the following code

pre-freeze-script
echo PRE: $1 $2 $3 >> /tmp/bck.log

post-thaw-script
echo POST: $1 $2 $3 >> /tmp/bck.log


expected to find /tmp/bck.log but nothing here. looks like my scrips are completely ignored ...
Vitaliy S.
VP, Product Management
Posts: 27055
Liked: 2710 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

Re: changes to prefreeze and postthaw scripts with v5.0.2?

Post by Vitaliy S. »

Hi Franz,

Looks like you have the same issue as it is mentioned on VMware Community Forums, please have a look:
VCB and pre-freeze/post-thaw scripts in Linux VMs (even though it is a pretty old thread, it might do the trick)

Thanks.
fgw
Enthusiast
Posts: 84
Liked: 2 times
Joined: Jun 11, 2009 8:39 pm
Full Name: Franz Glatzer
Contact:

Re: changes to prefreeze and postthaw scripts with v5.0.2?

Post by fgw »

Vitaliy S. wrote:Hi Franz,

Looks like you have the same issue as it is mentioned on VMware Community Forums, please have a look:
VCB and pre-freeze/post-thaw scripts in Linux VMs (even though it is a pretty old thread, it might do the trick)

Thanks.
hi Vitaliy,

have seen this post already and tried to copy the script over into /etc/vmware-tools. but this does not change anything ...

thanks anyway
Vitaliy S.
VP, Product Management
Posts: 27055
Liked: 2710 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

Re: changes to prefreeze and postthaw scripts with v5.0.2?

Post by Vitaliy S. »

Hm...have you tried it with other VMs? Are you able to trigger these scripts? How about just creating quiesced snapshot via vSphere Client to trigger those scripts?
fgw
Enthusiast
Posts: 84
Liked: 2 times
Joined: Jun 11, 2009 8:39 pm
Full Name: Franz Glatzer
Contact:

Re: changes to prefreeze and postthaw scripts with v5.0.2?

Post by fgw »

Vitaliy S. wrote:Hm...have you tried it with other VMs? Are you able to trigger these scripts? How about just creating quiesced snapshot via vSphere Client to trigger those scripts?
running vi 3.5 here, no vsphere!

anyway, when creating a snapshot through virtual center, the only checkbox available is "Snapshot the virtual machine's memory". as i have read somewhere this needs to be unchecked to invokle the scripts i left it unchecked.

creating a snapshot in virtual center via "Snapshot" -> "Take Snapshot" also DOES NOT trigger the scripts. should they be triggered by creating a snapshot this way?

created a support request with vmware. lets see what this guys will tell us ...
Vitaliy S.
VP, Product Management
Posts: 27055
Liked: 2710 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

Re: changes to prefreeze and postthaw scripts with v5.0.2?

Post by Vitaliy S. »

fgw wrote:running vi 3.5 here, no vsphere!
Oh, I should have read your post more carefully, sorry for that.
fgw wrote:should they be triggered by creating a snapshot this way?
No, quiescence option should be checked to trigger the script manually. Taking into consideration that there is no such option in VI3, then using VIC will not help much.
fgw
Enthusiast
Posts: 84
Liked: 2 times
Joined: Jun 11, 2009 8:39 pm
Full Name: Franz Glatzer
Contact:

Re: changes to prefreeze and postthaw scripts with v5.0.2?

Post by fgw »

to answer my own question:

got response from vmware support. prefreeze and postfreeze scripts are NOT SUPPORTED on SOALRIS!

prefreeze and postfreeze scripts are supported on windows and linux guests only!

all other guest OS don't support the use of this scripts.

this is true for esx 3.5 and also for esx 4.x!


to have all the information in one place:

for windows guests have a look at this vmware kb article:

http://kb.vmware.com/selfservice/micros ... Id=1006671


for linux guests the scripts are located in /usr/sbin:

/usr/sbin/post-thaw-script
/usr/sbin/pre-freeze-script

don't forget to make the scripts executable


veeam backup job setting:

the veeam backup job setting "Enable VMware tools quiescence" under "Advanced Settings" -> "Advanced" needs to be checked


ps. may be a moderator might change the post title to something like
"Custom scripts during VMware tools quiescence are supported on Windows and Linux guests only"
Alexey D.

Re: changes to prefreeze and postthaw scripts with v5.0.2?

Post by Alexey D. »

Franz, thanks for sharing the response!

P.S. Changed the title to "Pre-freeze and post-thaw scripts on Solaris?"
newguise
Novice
Posts: 3
Liked: 1 time
Joined: Jul 27, 2012 4:59 am
Contact:

Custom quiescing scripts don't run

Post by newguise »

[merged]

I am trying to run custom quiescing scripts in Windows 2008 R2 VMs. It seems that they are simply not called when the VM is snapshot.

I have tried placing a .bat file in C:\Windows\backupScripts.d\ and in C:\Program Files\VMware\VMware Tools\backupScripts.d\. At this stage, all I want to do is echo a string to a text file to verify that the script is even running. I've tried naming the file FREEZE.bat, freeze.bat, THAW.bat and thaw.bat, etc. I've tried using IF statements to read arguments passed to the script, and I've tried just having a simple one-line echo command in there. Nothing works.

Is there something specific I need to enable in ESXi or Veeam for this to work? In my Veeam job, I have "Enable VMware tools quiescence" enabled.

When this works correctly, does VMware tools only run the scripts when the quiesced snapshot is initiated by Veeam (or other backup software), or whenever a snapshot is taken (e.g. initiated by user in vSphere client)? How would it differentiate?

I am running vCenter Server 5, ESXi 5 and Veeam 5.0.2.

Thanks in advance!
Vitaliy S.
VP, Product Management
Posts: 27055
Liked: 2710 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

Re: Pre-freeze and post-thaw scripts on Solaris?

Post by Vitaliy S. »

Hi Matt,

VMware Tools Quiescence is the only setting you need to enable to make it work, in this case pre-freeze and post-thaw scripts will be triggered automatically. If you want to verify this workflow without running Veeam backup job, just use vSphere Client to create snapshot with quiescence enabled.

For additional details please review VMware KB article that has been posted above.

Hope this helps!
newguise
Novice
Posts: 3
Liked: 1 time
Joined: Jul 27, 2012 4:59 am
Contact:

Re: Pre-freeze and post-thaw scripts on Solaris?

Post by newguise »

Thanks Vitality, but I have already read that KB article and tried multiple permutations of the configuration (different file names/locations, etc) as per my original post.

Thanks for confirming that a manual snapshot can be used to verify that the scripts will be triggered.

However, neither this nor quiesced snapshots with Veeam actually cause the scripts to run in any of my VMs.
Gostev
Chief Product Officer
Posts: 31456
Liked: 6647 times
Joined: Jan 01, 2006 1:01 am
Location: Baar, Switzerland
Contact:

Re: Pre-freeze and post-thaw scripts on Solaris?

Post by Gostev »

If manual snapshot does not trigger the scripts, you should open a support case with VMware.
newguise
Novice
Posts: 3
Liked: 1 time
Joined: Jul 27, 2012 4:59 am
Contact:

Re: Pre-freeze and post-thaw scripts on Solaris?

Post by newguise » 1 person likes this post

I opened a case with VMware, and they recommended that I reinstall VMware tools without the VSS driver. This worked - my quiescing scripts now run under both Windows 7 and Server 2008 R2 when initiating a manual snapshot or using Veeam. A fresh install of VMware tools with the VSS driver caused the scripts to stop working. Apparently this is not by design and they are collecting details from me to recreate the issue.

Maybe it's just a quirk of my environment, but I will post again if it turns out there is anything that could catch out other users and cause these scripts not to work.
Post Reply

Who is online

Users browsing this forum: Bing [Bot], FelixW, Regnor and 157 guests