Pre-freeze and post-thaw scripts on Solaris?

Availability for the Modern Data Center

Pre-freeze and post-thaw scripts on Solaris?

Veeam Logoby fgw » Mon May 30, 2011 10:43 am

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 ...
fgw
Enthusiast
 
Posts: 62
Liked: 2 times
Joined: Thu Jun 11, 2009 8:39 pm
Full Name: Franz Glatzer

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

Veeam Logoby Vitaliy S. » Mon May 30, 2011 11:01 am

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.
Vitaliy S.
Product Manager
 
Posts: 12028
Liked: 440 times
Joined: Mon Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov

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

Veeam Logoby fgw » Mon May 30, 2011 11:26 am

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
fgw
Enthusiast
 
Posts: 62
Liked: 2 times
Joined: Thu Jun 11, 2009 8:39 pm
Full Name: Franz Glatzer

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

Veeam Logoby Vitaliy S. » Mon May 30, 2011 11:53 am

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?
Vitaliy S.
Product Manager
 
Posts: 12028
Liked: 440 times
Joined: Mon Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov

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

Veeam Logoby fgw » Mon May 30, 2011 12:14 pm

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 ...
fgw
Enthusiast
 
Posts: 62
Liked: 2 times
Joined: Thu Jun 11, 2009 8:39 pm
Full Name: Franz Glatzer

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

Veeam Logoby Vitaliy S. » Mon May 30, 2011 12:23 pm

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.
Vitaliy S.
Product Manager
 
Posts: 12028
Liked: 440 times
Joined: Mon Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov

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

Veeam Logoby fgw » Wed Jun 01, 2011 10:02 am

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/microsites/search.do?language=en_US&cmd=displayKC&externalId=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"
fgw
Enthusiast
 
Posts: 62
Liked: 2 times
Joined: Thu Jun 11, 2009 8:39 pm
Full Name: Franz Glatzer

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

Veeam Logoby Alexey D. » Wed Jun 01, 2011 10:15 am

Franz, thanks for sharing the response!

P.S. Changed the title to "Pre-freeze and post-thaw scripts on Solaris?"
Alexey D.
 

Custom quiescing scripts don't run

Veeam Logoby newguise » Fri Jul 27, 2012 5:28 am

[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!
newguise
Novice
 
Posts: 3
Liked: 1 time
Joined: Fri Jul 27, 2012 4:59 am

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

Veeam Logoby Vitaliy S. » Fri Jul 27, 2012 9:57 am

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!
Vitaliy S.
Product Manager
 
Posts: 12028
Liked: 440 times
Joined: Mon Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov

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

Veeam Logoby newguise » Sun Jul 29, 2012 11:32 pm

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.
newguise
Novice
 
Posts: 3
Liked: 1 time
Joined: Fri Jul 27, 2012 4:59 am

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

Veeam Logoby Gostev » Mon Jul 30, 2012 8:43 am

If manual snapshot does not trigger the scripts, you should open a support case with VMware.
Gostev
Veeam Software
 
Posts: 15897
Liked: 880 times
Joined: Sun Jan 01, 2006 1:01 am
Full Name: Anton Gostev

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

Veeam Logoby newguise » Fri Aug 03, 2012 6:03 am 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.
newguise
Novice
 
Posts: 3
Liked: 1 time
Joined: Fri Jul 27, 2012 4:59 am


Return to Veeam Backup & Replication



Who is online

Users browsing this forum: Bing [Bot], namiko78 and 30 guests