Hyper-V back up VHD live with PowerShell

conners picture conners · Aug 4, 2012 · Viewed 11.3k times · Source

I've heard people say that you can back up VHD files on Windows 2008 R2 Hyper-V (non clustered) and back them up while the guest is live and running with powershell scripts. Does anyone have any experience of this they can share?

What kind of back up is it an export? A Snapshot that is made, then copied then reverted? I know there are copious pay-to-use models but this is a test environment and I simply want to know if there is a "weak but functional" way of doing it.

Answer

Chris N picture Chris N · Aug 4, 2012

Definitely! Just make a VSS snapshot of the volume, mount it as a drive letter, grab the VHD files, and put them somewhere else. Here's one I wrote a few years back:

http://www.send4help.net/full-backups-of-running-hyper-v-guests-309

If I had to do it again though, I'd follow this method:

http://blogs.msdn.com/b/virtual_pc_guy/archive/2009/03/11/backing-up-hyper-v-with-windows-server-backup.aspx

It enables native-like support for Hyper-V in the default Windows Backup tool.

Enjoy!