When I read recently that Virtual Server 2005 R2 SP1 will support Volume Shadow Copy Service (VSS) I was quite excited. This means that you can backup a running virtual machine without shutdowns. Some weeks ago I decided against Virtual Server 2005 and for VMware Server. However, VSS support is a killer feature in my view. Today, I tried to backup a running virtual Windows Server Virtual Server 2005 R2 SP1 Beta2 using Symantec Backup Exec 10d.

Of course you can backup a virtual server like any other server by installing the backup agent on the guest system. The charm of backing up a virtual server on the host system is that disaster recovery is very fast. If your host system has hardware problems, you restore all virtual servers within minutes on another host with completely different hardware.

So I was quite curious to learn more about the VSS support of Virtual Server. I used the Backup Exec Advanced Open File Option which also supports VSS. I backed up a running virtual Windows Server 2003 system without any error messages.

I then deleted the virtual server and restored it using Backup Exec. The restored Windows Server booted without any problems. However, when I logged on, I got a message informing me that the system was shut down unexpectedly. The Windows Server worked perfectly, though.

But it is obvious that this is not the way it is supposed to work. The main problem with this method is that you can save the virtual machine files (.vmc .vhd . .vsv) of a running virtual server, but you can't save the system memory this way. So you might end up with a backup where the virtual machine files are not in a consistent state.

It is not enough if the backup software just supports VSS. It also has to support the new Virtual Server VSS Writer service (VS Writer). This VS Writer can be used by VSS requestors to back up and restore virtual machines. That way, backup software can inform Virtual Server that is going to backup a virtual machine and Virtual Server can create a snapshot before the copy process starts.

This is how the documentation of Virtual Server 2005 R2 SP1 describes the procedure:

In the console tree of the backup program, browse to Microsoft Virtual Server.
Expand Virtual Server.
Select the virtual machines that you want to archive.
Select the Virtual Server configuration for archive.
Select the backup type.
Select the media to which you want to back up the data.
Start the backup.

So you don't select the virtual machine files, but the virtual machine as a whole.

Symantec doesn't yet offer such an agent for Backup Exec supporting Virtual Server. I googled a little to see if there is any other backup software vendor offering an Virtual Server add-on already, but I didn't find any. I guess it won't take too long until the major vendors will have such products as soon as the final of Virtual Server 2005 R2 SP1 is available. Considering the description in the Virtual Server manual, it seems as if there is at least one working together with Microsoft since NTBackup won't support it.

Subscribe to 4sysops newsletter!

I am curious if VMware will offer something comparable in the new future. I still prefer VMware Server for many reasons. However, the possibility of being able to backup running virtual servers is a killer feature. Because of its high price, VMware ESX Server is not yet an option for us.

  1. becker 16 years ago

    Great entry here, I have been searching all over for how to do a painless live backup of a virtual server. ESX is great, but way to expensive for SMBs, so I’m loving virtual server, except the host backup part which has been confusing me since i keep reading about the beta 2 VSS support and such. This helped clarify it for me.

  2. RBowden 16 years ago

    VSS for Virtual Server is cool, i have been looking for documentation for it, i want to creat a script that will thell VS that a backup will be starting the get the script to copy the files to a NAS or somthing to do the backup that way…cannot find anything on that at the moment, has any one else got the api for the new feature in VS 2005 R2 SP1

  3. M Freitas 16 years ago

    The documentation you mention says “In the console tree of the backup program”… But since such a program doesn’t exist yet, this seems to be a placeholder only?

    We actually don’t have at this time any program that does this, right?

  4. You’re right this is a placeholder. Microsoft’s Data Protection Manager (DPM) 2007 will most likely support online backups of Virtual Server VMs. I’m not sure if this feature is already included in the beta. It is also possible that third party backup software vendors offer VSS support for Virtual Server meanwhile.

  5. becker 16 years ago

    Yep, the data protection manager beta 2 will solve this problem.

  6. Aziz 16 years ago

    I have made available a scriptlet for live virtual machine backup. It is especially designed for production environment. Available as free download from http://forum.hostbreak.com/showthread.php?t=302.


  7. RBowden 16 years ago

    Nice one, cheers for the script,

    do not know if you all know, but DPM Beta 2 has been released on MS Connect and supports live backup of VM’s

  8. Aziz 16 years ago

    Thanks – I was not aware of DPM. Thanks for the tip. I will look into it..


  9. M Freitas 16 years ago

    The script looks nice… But “save state” means that VM still stop, even if it’s for a short time – probably at least five minutes…

  10. Serge 15 years ago
  11. Serge, thanks! That is indeed interesting. I might blog about this topic soon again.

  12. BulletproofSean 15 years ago


    This doesn’t work. It invokes a shadow copy, but I’ve been testing the script the last few days and all of the backups are identical file size and even dates.

    If I restore to one of my backups, it acts as if its crashed and I don’t believe its transactionally consistent. In other words, back to the drawing board.

  13. Trucking Nerd 15 years ago

    Bullet, I found otherwise in my testing. I started a virtual server (guest was win2k3 standard server) and wrote a text file down, then immediately fired the script. i then took the shadow copied files to another VS and loaded them up and it booted just fine and my test file was there an intact.

    I didn’t compare file sizes, but the fact my changes I had just made were intact was good news. Curious what others find.

  14. BulletproofSean 15 years ago

    Don’t worry about file sizes, what about time and date stamps on the VHD and VSV files?

    Are you certain that the virtual machine isn’t first being suspended and then restored? I’ve seen some cases where, even if not being specifically put to sleep, that this was happening. Usually with virtual machines that were originally created in earlier (pre SP1) versions of Virtual Server.

    Try this: Start up some programs and leave them running. Perform the backup. When you restore to the backed up images are the programs still running?

    If not, that (to me) is not a transactionally consistent backup, and unless someone proves otherwise I wouldn’t think that Exchange and SQL databases are being handled correctly.

  15. Trucking Nerd 15 years ago

    I had done this when I did my test because I wasn’t sure of the state the copied files would be in when I started that VM up on another machine. Interesting enough, it was not in a saved state, so it was like the machine was just starting up, however as mentioned previousl my changed file was changed and the state of the VM during the shadow copy was not altered or suspended, so it was a live backup, somewhat consistent.

    My conclusion was anything in memory and not written to disk will be discarded. This could have an impact on SQL and on Exchange. I guess it would be interesting to learn more about this script, I hope to use it in our production environment for backing up some of our virtual servers, would love to hear others thoughts.

  16. BulletproofSean 15 years ago

    I’ve been using scripts like this in production for about a year. The difference being that they suspend the virtual machine, take the snapshot, and then resume it. There’s anywhere from 30 seconds to 5 minutes of downtime depending on the size of the VM.

    If I ended up with a customer that ran 24/7, I guess that would be a reason to use Data Protection Manager. Or just do the backup during shift change. 😀

  17. Trucking Nerd 15 years ago

    The script at redmondmag does not suspend the virutal server, it relies on the VSS writers which is why I am excited to use it. Are you saying that you used it and saw the virtual machine change states while it was running?

  18. BulletproofSean 15 years ago

    I’m not using the script at Redmond Mag. I tried it, and my own testing revealed that it simply does not work as advertised in the article.

    The vshadow.exe utility doesn’t actually interface with Virtual Server. It just snapshots the disk volume on the host. In Microsoft’s own documentation, they say that the backup solution must be Virtual Server aware in order to work (as indicated in the article above), and vshadow isn’t.

    The script _I_ use is a slight modification of this one:


    There’s a less complex version of the above script linked in the Redmond Mag article (here if you are interested: http://cwashington.netreach.net/depo/view.asp?Index=1049&ScriptType=vbscript). If you look at the script Chris Wolf wrote, its basically the same script with the Virtual Server suspend/restore logic stripped out.

  19. Trucking Nerd 15 years ago

    Thanks for the additional links, will scope these out!

  20. CraigF 15 years ago

    One of the shortcomings of the various published scripts is that they only support snapping a single volume at a time. If your VM’s have VHD’s stored on multiple volumes (as ours do) then I think you’ll find you need to snap all the relevant volumes simultaneously eg:

    vshadow.exe -p -script=setvar1.cmd %Vol1% %Vol2% %Vol3%

    I haven’t had time to fully test this theory yet, but I wonder whether this may explain why some people have had problems running the scripts.

  21. Trucking Nerd 15 years ago

    Bullet, I’ve done more testing with this redmon script and I’m very pleased. Here is what I did:

    1) With my already running virtual server, I went to SQL Server, created a new table, inserted a couple rows into it.
    2) immediately after this I went to start the redmonmag script on this virtual machine. The virtual machine was up 100% while this was running in the background.
    3) when the script was done, I copied the virtual machine files over to another machine.
    4) I did an add on the second virtual server to add these backed up files.
    5) started it up, it was not in a saved state, it booted up and asked me for a reason for the unexpected previous shutdown.
    6) I logged into SQL and my table was there and so were my records.

    So All looks good in this scenario. I guess the DML and DDL I issued get written down to the SQL Log file immediately..I wasn’t sure if it took a while for the disk changes to make it down to the VHD, but at any rate, all of my transactions that were committed at the time of the script execution made it to copied server. So far I can’t find any negatives for this script. I wonder if what the guest OS is makes a difference? I’m running W2k3 Server.

  22. BulletproofSean 15 years ago

    5) was exactly the behaviour that was scaring me out of using the RedmondMag script. Your testing indicates to me that this might be worth while, so I won’t completely abandon my efforts.


  23. BulletproofSean 15 years ago

    I ran the Redmond Mag script on a production server for a week, and the other thing that scared me was that EVERY VHD backup had the same date and time stamp as the original VHD. A virtual machine file’s data and time stamps only change when it is shutdown or saved. How can it be that data INSIDE the file is changing but the VHD isn’t? It boggles me!

  24. Trucking Nerd 15 years ago

    I’m not sure how the file isn’t being triggered, but somehow the changes I made in all of my testing I have done so far have been ported over, i also observed the same date / time stamp as you have. Maybe the date / time stamps are only tickled when the file physical grows (or shrinks). I’d be interested to see if you yield any different results from any additional tests.

Leave a reply

Please enclose code in pre tags

Your email address will not be published.


© 4sysops 2006 - 2023


Please ask IT administration questions in the forums. Any other messages are welcome.


Log in with your credentials


Forgot your details?

Create Account