VMware VSS Explained

PDFPrintE-mail

Wednesday, April 06 2011 13:28 Written by Mattias Sundling

When doing image based backups with your backup software you have the option to enable Windows Volume Shadow Copy Service (VSS) under backup options.

This means that the backup software request VMware tools to initiate a VSS snapshot in the Guest OS.

All registered VSS writers (run vssadmin list writers command to list all writers) in the Guest OS get the request and they prepare its application to be backed up (committing all transactions to disk).

Once all VSS writers are finished they communicate back to your backup software which then initiate a VMware snapshot. This will make the backup application consistent.

In order for this to work the VMware Tools VSS component must be enabled and Legato Sync Driver must be disabled (if present).

If your VM was created prior ESX 3.5 U2 you might have issues with incorrect drivers!

You can verify by initiating a VMware Tools Upgrade in interactive mode - Modify - Verify Volume Shadow Copy Service is enabled and if Sync Driver is present to disable it.

If you are familiar with Microsoft PowerShell and VMware PowerCLI you can run the following script to query all your Windows VMs (this will be done over WMI and requires you to have administrative rights to remote systems) for both Legato Sync Driver and VSS.

1
Get-VM  | Where {($_\3.PowerState -eq "PoweredOn") -and ($_\3.Guest.OSFullName -like "Microsoft Windows*")} | Sort Name | Select Name, @{N="LGTO Installed";E={((Get-WmiObject Win32_PnpEntity -ComputerName $_\3.Guest.HostName -Filter "Service='LGTO_Sync'" | Measure-Object).Count -gt 0)}}, @{N="VSS Installed";E={((Get-WmiObject Win32_Service -ComputerName $_\3.Guest.HostName -Filter "Name='vmvss'" | Measure-Object).Count -gt 0)}}

Thanks to: http://www.noplanningrequired.com

Sample output from script:

What level of consistency do I get?

That depends on what version of vSphere you are running and what Guest OS you have.

* Special requirements for application consistency on Windows 2008/R2, see below.

  • Dynamic Disks are not supported
  • SCSI disks only
  • disk.EnableUUID attribute must be enabled. 
    • Enabled default on VMs created on vSphere 4.1
    • VMs created on prior vSphere 4.1, following procedure must be followed:
      • Power off your Windows 2008 VM
      • Edit Settings - Options - General - Configurations Parameters - Add Row - Name=disk.EnableUUID Value=true

To make sure all your VMs have Legato Sync Driver Disabled, VSS Enabled and disk.EnableUUID configured correctly will take a serious amount of time if you have to connect to each VM manually and verify everything.

Introducing Quest PowerGUI

There is a much better and easier option available for you (free of charge). Quest PowerGUI is an application that is easy to use combined with the power of PowerShell scripting without the need to be a scripting wizard. Scripts are provided in different preloaded PowerPacks and you can easily extend the functionality by adding more PowerPacks from PowerGUI Library or write your own custom scripts as well.

You must have Microsoft PowerShell and VMware PowerCLI installed before you install PowerGUI, make sure you use PowerCLI 4.0 U1 as later versions has backward compatibility issues with many scripts.

You can use PowerGUI to manage your VMware environment more efficient such as finding snapshots, memory limits, connected CD-roms etc. It´s easy to find and reconfigure settings in bulk mode.

With help from Kirk Munro aka Poshoholic and Scott Herold aka VMguru I made a PowerPack that you can import (File - PowerPack Management - Import - Browse to VSS Status.powerpack) to PowerGUI and it will list status of Legato Sync Driver, VSS and disk.EnableUUID for selected VMs.

Select any VMs and Click VSS Status.

Results can be exported to XML, CSV and HTML. You can click on any of the columns to sort it.

Supported Applications:

Most Microsoft applications (AD, Exchange, SQL Server, Share Point), Oracle and others has a VSS writer and can be backed up in an application consistent state.

Attachments:
Download this file (VSS Status.zip)VSS Status.zip[PowerGUI Powerpack]1 Kb
Trackback(0)
Comments (18)Add Comment
skarrid
May 05, 2011
62.181.199.73
Votes: -1
...

The option to modify the vmware-tools installation in windows guests seem to be missing in vmware-tools 3.1.2.14664.
So is the vss-driver (missing that is).

I did use your vss-reporting tool in Powergui and vss is listed as not installed.

Is the implementation changed? Can it only be installed during a new install of vmware-tools?

Did I miss something obvious?

Brgds


Mattias Sundling
May 05, 2011
72.185.10.100
Votes: +0
...

Skarird,

VSS is only available if your ESX hosts are running version 3.5 Update 2 or later and VMware Tools at same version.
It looks like you are running ESX 3.1 Update 2 from above. If that is the case I strongly recommend you update to ESX(i) 4.x as there are many new features and bug fixes available. One new key feature when it comes to Data Protection is Change Block Tracking (CBT) which makes your incremental backups much faster as your backup tool doesn´t have to scan for changes, just query an API and backup changes.

/Mattias

skarrid
May 05, 2011
62.181.199.73
Votes: +0
...

Hi, and thanks for the response.

All servers are ESX 3.5 Update 5 or ESX 4.1.
Tools are reported as up to date, from virtualcenter and vcenter.

But, some servers are upgraded from earlier versions, like 3.1.

Seems like the vmware-tools version when run on Win Srv2008 R2 reports VSS as installed, but on Win Srv2003 it is not. The problem with modify/install driver is there on both OS versions.

A well, your'e not running a support forum here so I'll keep looking. If you come up with something, please let me know though.

//Fredrik

Mattias Sundling
May 05, 2011
72.185.10.100
Votes: +0
...

Fredrik,

If your VM was created before ESX 3.5 U2 and updated you will not have the VSS component, you will have to manually add it by going into Add/Remove programs - VMware Tools - Modify.
If you created the VM after ESX 3.5 U2 you will have VSS component.
That´s probably why you have it Win 2008 VMs and not Windows 2003 VMs.

/Mattias

Fredrik
May 09, 2011
62.181.199.73
Votes: +0
...

Thats the point! There is NO modify option in Add/Remove Programs for vmware-tools on the above mentioned version.

I'll try a complete remove and re-install of vmware-tools.

Thanks

/F

Mattias Sundling
May 10, 2011
75.206.204.25
Votes: +0
...

Fredrik,

Initiate a VMware Tools upgrade from vCenter on the VM. Choose interactive and you will get the option to Modify.
If VMware Tools installer don´t start you have to manually start it from (CD-ROM)/setup.exe.

If you follow above you will be able to modify your current VMware Tools (add VSS sync driver, disable Legato sync driver if present), instead of uninstall/reinstall VMware Tools.

Let me know how it works out for you!

/Mattias

Mattias Sundling
May 11, 2011
72.185.10.100
Votes: +0
...

Good VMware KB Article on Troubleshooting Volume Shadow Copy (VSS) quiesce related issues: http://kb.vmware.com/selfservi...Id=1007696

/Mattias

Åse
May 11, 2011
153.110.137.30
Votes: +1
...

Hi,

I'm kinda new to all of this... Recently we upgraded from ESX3.5 to vsphere 4.0, after this backup of our fileserver (2003 std edt server) started to fail. In vshpere client I see the error " A snapshot operation can not be performed" .
If I enter cmd, types vssadmin list writers before trying to back up, they all list out State 1, Stable. Last error: No error. But after trying to back up the Writers; WMI, TermServLicensing, IIS Metabase and System Writer list out State 9, Failed, Last Error Timed out.
If I manually try to create snapshot by typing : vssadmin create shadow /for ="driveletter" they all tur out ok.
We are using symantec backup exec 12.5

Does anyone have a clue to what I'm missing here?
I've tried so many things now, and I'm running out of ideassmilies/sad.gif

Greatful for answerssmilies/smiley.gif

Mattias Sundling
May 11, 2011
72.185.10.100
Votes: +0
...

Åse,
What happens if you try to create a quiesced snapshot with vCenter client?
Take a look at the VMware KB above to see if that is matching your problem. If vCenter can take a quiesced snapshot but your backup application can´t then you need to open a support case with them.

/Mattias

Åse
May 11, 2011
153.110.137.30
Votes: +0
...

Mattias,

Thanks for quick reply!
After reinstalling VMWare tools, the List Writers command now again shows all the writers with state; stable and last error; no error.
To create a quisced snapshot with vCenter client runs up tl 95%, then retuns error message ; File is larger than the maximum size supported by database.
- How do I find out how big "file" = snapshot?? is - and what can I do about it?

All the steps in the KB above are ok.

Mattias Sundling
May 11, 2011
72.185.10.100
Votes: +0
...

Åse,

Are you sure error message say "File is larger than the maximum size supported by database" and not "File is larger than the maximum size supported by datastore"?

/Mattias

Åse
May 11, 2011
153.110.137.30
Votes: +0
...

I meant to write datastore

Mattias Sundling
May 11, 2011
72.185.10.100
Votes: +0
...

Åse,
This is because your Datastore Blocksize is to small. You are probably using default 1MB and that can only handle files up to 256 GB. You mentioned you are having a problem on a fileserver so probably one of your VMDK files are bigger than 256 GB. See this VMware KB how to workaround: http://kb.vmware.com/selfservi...Id=1012384
You can also read my white paper on "Maximizing VM Performance" where I discuss lots of best practices including VMFS block size: http://bit.ly/max-vm-perf

/Mattias

Åse
May 12, 2011
153.110.137.30
Votes: +0
...

Mattias,

THANKS!! smilies/smiley.gif
You are correct I've actually got two vmdk files that are bigger than 256 GB.. I will read up on the VMWare KB and your White Paper. Just hope that I'm able to fix this!

/ Åse

Brian Driftmyer
May 17, 2011
128.221.197.57
Votes: +0
...

Great Stuff!!!! One question -- you mention this is supported on most MS Applications - do we need to be aware of certain versions? i.e. SQL 2005? Sharepoint 2007? etc? Thanks a ton!

Mattias Sundling
May 17, 2011
72.185.10.100
Votes: +0
...

Brian,

Thanks for your feedback. You can verify if your application have a VSS writer by using "vssadmin list writers" command.
You can always Google it as well smilies/wink.gif Most applications after 2003 have VSS support (SQL 2005 and above), you can actually get SQL 2000 SP4 to use VSS but that´s another story.
VSS is available out of the box for Windows 2003+ but can be added to Windows 2000.

Bottom line: If you are using a current version of Microsoft OS / APP you should be ok.

/Mattias

Rowan Page
October 03, 2011
150.101.218.43
Votes: +0
...

Great article, however, I was tired when updating my 2008R2 VM's with the disk.EnableUUID Value=true flag, and inadvertently changed this on one of the Windows 2003 VM's, does that matter? I can seem to remove the attribute now, do I just change it to false? I can't seem to find anything regarding how this setting effects pre 2008 VMs

Mattias Sundling
October 05, 2011
72.185.10.100
Votes: +0
...

Rowan,

If you set it to false it will not affect your Windows 2003 VM. To verify you can use vCenter client and take a snapshot and enable guest quiescing. Look in Windows Event Log on your Windows 2003 VM for VSS related messages.

/Mattias

Write comment
You must be logged in to post a comment. Please register if you do not have an account yet.

busy