VMware
1 2 3 4 Previous Next 55 Replies Last post: Dec 30, 2008 5:06 AM by solsie   Go to original post
Click to view ktlevy's profile Lurker 5 posts since
Nov 28, 2007

Gigaguy,

I am unable to download your latest update of the backup script - basically nothing gets saved to my local drive. Can you try to reupload the script again?

Thanks,

Kevin

Click to view Gigaguy's profile Novice 17 posts since
Dec 2, 2007
Reattaching ZIP.
Attachments:
Click to view Ben Rayner's profile Novice 7 posts since
Jan 29, 2008
The solution to my problem was to put vshadow.exe in the WINDOWS\SysWOW64 folder.

vshadow.exe does not need to be in the same directory as the script, but it needs to be in the directory you are in when you execute the script (if that makes sense).

In my batch file below I am 'in' the WINDOWS\SysWOW64 folder when I execute the script from c:\vmbackup

@echo off
echo "Backing up W2k3 sample"
c:
cd\
cd WINDOWS\SysWOW64
cmd /C wscript.exe c:\vmbackup\VM-Backup.vbs sample

Ben
Click to view ktlevy's profile Lurker 5 posts since
Nov 28, 2007
Has anyone figured out a good way to backup multiple VMs? Currently, I have separate scheduled tasks, one for each VM.
Click to view Gigaguy's profile Novice 17 posts since
Dec 2, 2007
Ktlevy,

I backup 6 VM's every other night. I just added them to the .bat file. Then I use scheduled task to run the bat file. They will backup in the order specified in the .bat and not all at once.

Ex:
VM_Backup.bat

@echo off
echo "Backing up VM1"
wscript VM-Backup.vbs VM1

echo "Backing up VM2"
wscript VM-Backup.vbs VM2

echo "Backing up VM3"
wscript VM-Backup.vbs VM3
Click to view Nummagumma's profile Lurker 4 posts since
Mar 31, 2008

For other newbs like me who scratch their heads around the VShadow pieces, you need to download from here:

http://www.microsoft.com/downloads/details.aspx?FamilyID=0b4f56e4-0ccc-4626-826a-ed2c4c95c871&displaylang=en&Hash=MOGBEU0c5e9GVX12ekypMBoMEtcvWUdnVmQhtY2zYvhUvwFasNB5TDqJpfuuiW2P6mtO7p9DAWlkkw%2b%2b34z9bw%3d%3d

And then once installed make sure you get the right .exe for your version of windows out of C:\program files\Microsoft\VSSSDK72\TestApps\vshadow\bin since C:\program files\Microsoft\VSSSDK72\Tools\VSSReports contains a version that doesn't work in XP.

(Below is the error I saw when using that version, in case it helps anyone else reach this answer)

C:\Program Files\Microsoft\VSSSDK72\Tools\VSSReports>vshadow -q

VSHADOW.EXE 2.2 - Volume Shadow Copy sample client
Copyright (C) 2005 Microsoft Corporation. All rights reserved.


(Option: Query all shadow copies)

  • Setting the VSS context to: 0xffffffff

ERROR: COM call "m_pVssObject->SetContext(dwContext)" failed.

  • Returned HRESULT = 0xc0000005
  • Error text:
  • Please re-run VSHADOW.EXE with the /tracing option to get more details


Click to view Nummagumma's profile Lurker 4 posts since
Mar 31, 2008

I've tried a few different paths for vShadowCopyPath and I get the same error no matter what I use:

2008-03-31_17:24:46 Files will be copied to O:\BLV99TEST-VM
2008-03-31_17:24:46 The VM is approximately 10.39 GB.
2008-03-31_17:24:46 **ERROR**: There is not enough free space to copy files
2008-03-31_17:24:46 Successfully deleted VShadow Drive

VShadowCopyPath = "c:\backups\virtual machines"

What am I missing about this syntax here?

Click to view Nummagumma's profile Lurker 4 posts since
Mar 31, 2008

I finally figured out all my syntax issues, and why Gigaguy's version wasn't working on XP even after I found it.

(The statement 'This should be identical to "DefaultCopyPath" but with a different drive letter. This is the drive letter where VShadow will be mounted (O: in this case) is actually incorrect and should be identical to DefaultVMPath.)

So I honestly have a need to have this set of code work both ways (XP/2003) as I use XP as a staging/testing area for some VMs rather than blowing $$ on a server license to host it.

I'm gonna take a shot at melding the code but I am totally NOT a vb programmer so it will be ugly I'm sure.

Click to view bobstothard's profile Lurker 1 posts since
Jun 3, 2008

is there anyway to backup more than 1 vm at a time? basically i have around 7 or 8 vm's to backup and they are pretty big in size, about 750gb in the virtual machines directory. i've tried running scripts at the same time and have tried waiting for one script to start zipping the folder in the backup directory and then kicking off the backup of another vm but keep getting the message "The Backup Script for VMware Server couldn't create a volume shadow or couldn't copy the files from the volume shadow."

is there anyway i can edit the script so that it will allow simultaneous backups of vm's?

Click to view TJWood's profile Lurker 1 posts since
Oct 23, 2008

I just want to post a thank you for this script! Fantastic work.

I have set this up on 2x 2003 hosts and have it scripted to backup 3-4 VM's on each. It seems to be working quite well but I have occassionally found that after shutting down the relevant VM that the O:\ drive isn't created (although the log file indicates it was, it never appears (watching in explorer)) and the VM fires backup but of course the zip file fails to be created (lack of source data of course). Running exactly the same kick off script again it goes through the process again but this time the O:\ drive is made available before the zip file is attempted to be created and it runs perfectly.

Any suggestions? I wondered if I wasn't using the correct version of the vshadow.exe (located in the same directory as the scripts) but it hasn't made any difference. I would love to set this script up automatically but with it being a bit sporadic I'm not sure if I can do it as yet.

Regards,

T.

Click to view solsie's profile Lurker 4 posts since
Nov 22, 2008

First off I want to say this is a great looking script.

I downloaded this script but am having some issues. The script runs through and all seems ok however the shadow drive is not made even though it says it is made. I am attaching my log file.

thanks in advance for any assistance

Attachments:

VMware Developer

SDKs, APIs, Videos, Learn and much more in the Developer community.

Learn More

Developer Sample Code

Increase your developer productivity with VMware API sample code.

Learn More

VMworld Sessions & Labs

Online access to the latest VMworld Sessions & Labs and online services.

Learn more

Purchase PSO Credits Online

Purchase credits to redeem training and consulting services online.

Buy Now

Community Hardware Software

View reported configurations or report your own.

Learn More

VMware vSphere

Come witness the next giant leap in virtualization.

Register Today

Communities