X: Drive in use?
Brought to you by:
nils-erik
Log file attached. Today I started the script manually, it saves the state of the 1st VM, short time goes by, saves the state of the 2nd, but no shadow copy backup has been stored to the location I specified. Same for all other VM's.
I tried to create a batch script so that the Virtual Server Backup script could run unattended. In the script I simply wrote:
"cscript virtualserverbackup.vbs"
and I placed it in the same folder as the script and set the task scheduler to run it last night. When I came in this morning, the 1st VM on each machine I set it to run on was still in a saved state, but no shadow copy had been stored.
Log File
Logged In: YES
user_id=1633634
Originator: NO
After an examine of the logfile, I must ask you this.
Have you assigned something to "X:" in you're OS. For instance mounted a network drive, assigned to a local disk, CD-Rom etc? If this is the case, you must change the value of sMountDrive. The default value is : sMountDrive = "X:". Change this to a driveletter which is not in use.
If this is not the case, try to execute the vshadow command manually to verify that you're able to manually perform the command.
Open a command shell (cmd) and goto the folder where vshadow is located and execute the following command :
vshadow.exe -wx="Microsoft Virtual Server 2005 Writer" -p C:
Now, expose (mount) the shadow copy manually to x:. To mount a spesific volume, you need the snapshot ID. From the command you executed, look for this line : * SNAPSHOT ID = {SNAPSHOTID}.
Execute the following command : vshadow.exe -el={SNAPSHOTID},X: (Replace "SNAPSHOTID" with the actual ID). Does this command execute successfully?
To clean up/delete the snapshot : vshadow.exe -ds={SNAPSHOTID}. After cleanup, you can do a vshadow -q to list if there is any obsolete/unnessesary copies left in the system from previous failures of the script. You can delete all of them with the command : vshadow -da,
Logged In: YES
user_id=1888268
Originator: NO
When I took a look at one server yesterday, there was an "X:" drive that looked identical to the "C:" drive. I thought my mirrored OS had broken and that was the cause of "X:" being in use, but my RAID was fine. As soon as I ran "vshadow -da" the X: drive disappeared, but before then I could see it as if it were physical.
Today on both servers that I tested the script on, the error was that the path to store the shadow copies was not found. The path is a mapped drive "Z:", it points to a NAS device on the network. Is this ok to do? I don't have enough space to copy them locally. I am using "Z:" configured as a local disk, should I instead be using a UNC path? (\\server\share\folder).
Logged In: YES
user_id=1633634
Originator: NO
Since you've got a new error, it would have been nice if you attatched a new log. It's easier to analyze.
First of all, were you able to successfully run vshadow and mount it to a drive? In other words is that specific issue solved?
Second, you can use both unc or local path. This should not matter, however. There's an issue with path containing spaces. This should be corrected in next version. However, if you follow the "How to Use" section in script, it's listed as the first item. Could this be the cause? Again, appreciate if you would attatch a new log.
Logged In: YES
user_id=1888268
Originator: NO
Log file attached.
Logged In: YES
user_id=1888268
Originator: NO
9/12/2007 9:00:00 PM SUCCESS [Main Code] VirtualServerBackup 1.0.4 Started Successfully.
9/12/2007 9:00:00 PM INFORMATION [Main Code] Working directory is : C:\Documents and Settings\All Users\Documents\Backup Script\Backup
9/12/2007 9:00:00 PM INFORMATION [Main Code] Call f_CreateFolder, C:\Documents and Settings\All Users\Documents\Backup Script\Backup\Log
9/12/2007 9:00:00 PM INFORMATION [Function f_CreateFolder] Start creating directory structure : C:\Documents and Settings\All Users\Documents\Backup Script\Backup\Log\ 9/12/2007 9:00:00 PM INFORMATION [Function f_CreateFolder] Checking if folder exists : C:\ 9/12/2007 9:00:00 PM INFORMATION [Function f_CreateFolder] Checking if folder exists : C:\Documents and Settings\ 9/12/2007 9:00:00 PM INFORMATION [Function f_CreateFolder] Checking if folder exists : C:\Documents and Settings\All Users\ 9/12/2007 9:00:00 PM INFORMATION [Function f_CreateFolder] Checking if folder exists : C:\Documents and Settings\All Users\Documents\ 9/12/2007 9:00:00 PM INFORMATION [Function f_CreateFolder] Checking if folder exists : C:\Documents and Settings\All Users\Documents\Backup Script\ 9/12/2007 9:00:00 PM INFORMATION [Function f_CreateFolder] Checking if folder exists : C:\Documents and Settings\All Users\Documents\Backup Script\Backup\ 9/12/2007 9:00:00 PM INFORMATION [Function f_CreateFolder] Checking if folder exists : C:\Documents and Settings\All Users\Documents\Backup Script\Backup\Log\ 9/12/2007 9:00:00 PM SUCCESS [Main Code] Path to logfile is determined to be : C:\Documents and Settings\All Users\Documents\Backup Script\Backup\Log\Wednesday 9.12.2007 2100 VirtualServerBackup.log
9/12/2007 9:00:00 PM INFORMATION [Main Code] Write Log from array
9/12/2007 9:00:00 PM INFORMATION [Main Code] vshadow.exe found in path specified by sVshadow.
9/12/2007 9:00:00 PM INFORMATION [Main Code] Finding all registered virtual machines.
9/12/2007 9:00:00 PM SUCCESS [Main Code] Found virtual machine with name : Ad Domain Controller, verify against exclusion array (aExclude).
9/12/2007 9:00:00 PM INFORMATION [Main Code] Virtual Machine : Ad Domain Controller is NOT listed in exclusion array. Starting to process backup.
9/12/2007 9:00:00 PM INFORMATION [Main Code] Checking State of : Ad Domain Controller
9/12/2007 9:00:00 PM SUCCESS [PerformBackup] State of : Ad Domain Controller is RUNNING. Backup will be performed.
9/12/2007 9:00:00 PM INFORMATION [PerformBackup] State of : Ad Domain Controller will be maintained, the virtual machine will be started after backup
9/12/2007 9:00:00 PM INFORMATION [Main Code] Saving state of Ad Domain Controller.
9/12/2007 9:00:00 PM INFORMATION [s_WaitForTask] Waiting to complete task : Save State on Ad Domain Controller
9/12/2007 9:00:15 PM INFORMATION [s_WaitForTask] Task : Save State on Ad Domain Controller is now completed
9/12/2007 9:00:15 PM INFORMATION [Main Code] Call f_CreateFolder, Z:\Virtual Servers\In Use\Ad Domain Controller
9/12/2007 9:00:15 PM INFORMATION [Function f_CreateFolder] Start creating directory structure : Z:\Virtual Servers\In Use\Ad Domain Controller\ 9/12/2007 9:00:15 PM INFORMATION [Function f_CreateFolder] Checking if folder exists : Z:\ 9/12/2007 9:00:15 PM INFORMATION [Function f_CreateFolder] Creating folder : Z:\ 9/12/2007 9:00:15 PM ERROR [Function f_CreateFolder] Error creating : Z:\. The error was : Path not found
9/12/2007 9:00:15 PM ERROR VirtualServerBackup.vbs aborted with error(s). To determine cause, see logged information
Logged In: YES
user_id=1633634
Originator: NO
Can you list out what all your configured values are?
Logged In: YES
user_id=1888268
Originator: NO
This is the only thing I changed:
sArchive = "Z:\Virtual Servers\In Use"
Z: is a mapped drive, it goes to a Nas device. If the issue is using Z:, I can change to a UNC path if you could show me how it should be written.
Logged In: YES
user_id=1888268
Originator: NO
OK, we may be getting somewhere. I changed 'sArchive = "Z:\Virtual Servers\In Use"' to 'sArchive = "\\asifiles2\Virtual Servers\In Use" and this successfully backed up the first virtual machine. I can see that the script successfully saved the state of and restored all the virtual machines I had running. The problem this time however, was that only the first virtual machine was actually copied to the destination. The others never made it. The funny part is though, there was a previous copy of the virtual machine already at the destination for all the virtual machines, the script apparently deleted the old copy but never copied the new. The log showed again, that "X: is already in use". I am wondering here, if perhaps the log is correct. Maybe X: is still in use because the copy has not yet finished for the first VM and therefore cannot be used until the copy is complete. From what I can tell, the script doesn't wait for the copy to complete, just for the shadow to occur before it moves on to the next VM, correct? Am I making sense?