Retry backup of failed VM backup.

nit0tp

Active Newcomer
Joined
May 9, 2006
Messages
5
Reaction score
0
Points
0
Location
Norway
Website
Visit site
We are running TSM 6.2.3 with TSM VE 6.2.0
When running scheduled backups of VMware images we sometimes get error situations as follows:

09/22/2011 16:25:11 ANS9365E VMware vStorage API error.
TSM function name : visdkWaitForTask
TSM file : vmvisdk.cpp (2933)
API return code : 78
API error message : Cannot create a quiesced snapshot because the create snapshot operation exceeded the time limit for holding off I/O in the frozen virtual machine.
09/22/2011 16:25:11 ANS4151E Failure mounting Virtual Machine 'AD03SQL'. RC=115

09/22/2011 16:25:27 ANS9365E VMware vStorage API error.
TSM function name : visdkWaitForTask
TSM file : vmvisdk.cpp (2933)
API return code : 78
API error message : Operation timed out.
09/22/2011 16:25:27 ANS4151E Failure mounting Virtual Machine 'AD01DRECKER'. RC=115

When backup is rerun later is usually finishes with no error situation.

Is is possible to tell TSM using some kind of parameter that if the backup fails it should try to rerun the backup later. I have tried using maxcmdretries and retryperiod in the opt file with no luck.

Please Help !!
 
I'm in the same boat. I have some very large VM that sometimes don't start succesfully until their 4th attempt. I schedule them, but too often the fail and then I have to wait until the next day's schedule.
 
Hi,

It's more API problem than TSM.
You should check link:

kb.vmware.com/kb/1018194

Perhaps you should try without quiesce, disabling VMware Tools VSS writer, if your VM is big.
Noticed in VMware KB article.
 
Before I configured TSM for VMware backup we used VMware Data Recovery. I cannot recommend the product but one of the things that worked very well was its ability to retry backups that had failed. We had the product running for about a year and it always got the failing VMs backed up during the defined backup window.

It’s very irritating to see that almost every time when I rerun the backup manually is succeeds the first time. So if this is a feature that is not available in the TSM product it surely should be there in the next release.
 
Here is a basic powershell script that will retry a vm backup a number of times.
Set $Retries to the number of times you want to retry
Add the VM's to the list $VMList in quotes seperated by commas
Something to keep in mind: The TSM client returns the highest return code during the backup.During the backup of a VM there is a warning somewhere, which returns a non zero exit code. It actually returns an 8 even if the backup was successful. An error returns a 12
Feel free to comment and improve on this script


Code:
####################################
# Script to rerun a failed VM backup x number of times #
####################################

cd "C:\Program Files\Tivoli\TSM\baclient"

$Retries = 3
$VMList = @("jupiter","mercury","mars")

foreach ($VM in $VMlist)
{

$Tries=0

do
{
	$Tries++
	"###### Try number $Tries ######"	
	cmd /c "dsmc backup vm $VM -vmbackuptype=fullvm -mode=full"
	"####### Success: $LastExitCode ######"
	
} until (($Tries -eq $Retries) -or ($LastExitCode -le 8))

"####### Total Tries $Tries ######"

}

cd "C:\vmware\TSM"
 
Last edited:
Back
Top