We currently still run all of our SQL and Exchange servers on physical machines with LUNs on our NetApp SAN. We use SnapManager from NetApp, which works with VSS, to ensure we get consistent snapshots of the DBs.
We would like to move a couple of our lightly used SQLServers to VMs. However, since the data will no longer be on a LUN (as far as Windows can tell), we will no longer be using SnapManager. What options are there for ensuring we have a consistent DB on the VM before we snapshot? I assume we could script the SQL service to shutdown prior to snapshot. Is there anything that would prevent downtime?
While "vmware-cmd <vm> createsnapshot backup quiesce" puts the VM in a consistent state, I do not think it will be enough for SQLServer (or Exchange).
There have been reported issues using snapshot function to backup Exchange. The problem is caused by the quiesce suspending the writes to disk as it attempts to flush the buffers in memory. If it cant do this fast enough, applications with high I/O such as Exchange and SQL Server can get upset. Of course even if the process does complete there is no guarentee the the database is consistant from a transactional viewpoint anyway as VMTools has no visibility of this.
The recommedation is to run pre-freeze scripts to move the application into a consistant state prior to the snap by taking the information store offine.
For Windows these files are C:\Windows\pre-freeze-script.bat and C:\Windows\post-thaw-script.bat
If the pre-freeze script returns a nonzero exit code, the snapshot create operation fails.