I am currently working on a VCB implementation for a very large customer (together with Geert Baeke). The customer uses TSM (Tivoli Storage Manager) to backup full .vmdk files.
TSM uses a pre-command to snapshot a list of VMs. However, this is a string in a small textbox. It works in the following format: pre-command <jobname> <VM1.FQDN> <VM2.FQDN> <...>. Needless to say this is very difficult to maintain and is error-prone. That's why I wrote a vbscript to replace the default pre-command.bat file and use a text file as VM list.
---------------------------------------------------------------Option Explicit
On Error Resume Next
Const ForReading = 1, ForWriting = 2, ForAppending = 3
Const TristateUseDefault = -2, TristateTrue = -1, TristateFalse = 0
Dim strVCBFile, strVCBList, strPreCmd, strJobName, objFSO, objShell, objFile, objStream, strStream
strVCBFile = "VCBList.txt"
strPreCmd = "pre-command.bat"
strJobName = "VMFullJob"
strVCBList = ""
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objShell = CreateObject("Wscript.Shell")
If objFSO.FileExists(strVCBFile) Then
Set objFile = objFSO.GetFile(strVCBFile)
Set objStream = objFile.OpenAsTextStream(ForReading, TristateUseDefault)
Do While Not objStream.AtEndOfStream
strStream = objStream.readline
strStream = Trim(strStream)
strVCBList = strVCBList & " " & strStream
Wscript.echo strVCBList
Loop
'run the backup command
objShell.Run strPreCmd & " " & strJobName & strVCBList
Else
'do nothing
End If
'cleanup
Set objFile = nothing
Set objStream = nothing
Set objFSO = nothing
---------------------------------------------------------------
Additional steps to perform: