Aidan Finn: Beware Anti-Virus and Hyper-V – Follow Up

This is quite a frustrating problem.  The origin was that some of the XML files that define my VM’s were locked by AV on a test Hyper-V server.  This caused Hyper-V to fail to load the VM’s.  OK.  That’s not a biggie  – fix the problem and then start up the VM’s is what you’d think.  Uh-uh!  Hyper-V had managed to unload all knowledge of those VM’s.  OK – maybe I could just reopen the VMs?  Hyper-V does not have an "open" function.  Finally, I tried setting up a new VM with the existing config and disks.  That’s a monotonous manual task.  The problem here is that I lost my saved snapshots.

I opened a call with MS.  I also tried using the TechNet forums.  Let’s see what I got there before I get back to the call.  The MS staff on there gave me comments such as "why were you scanning?" and "don’t use snapshots in production".  Hmm.  Most people put AV on their servers.  The reason is to PROTECT them.  I’m sure if the Hyper-V team talked to the ForeFront team they’d be told the same thing.  I had put an exception in for the VHD files but didn’t know to do the same for the XML’s until it was too late.  However, even if I had, there’s always a chance a junior member of staff could accidentally override that exception.  What am I to do then, lose half of the VM’s on all of my hosts?  Is that acceptable to MS? 

I nearly choked when I saw a video of Steve Riley at TechEd talking about the potential of scanning VM’s using AV.  DONT TRY IT!

And as for using snapshots: A big use of virtualisation is setting up test environments.  Whether it’s for software development or infrastructure deployments, virtualisation earned it’s acceptance this way and continues to be a strong player there.  MS should understand this seeing as they think everyone in IT is a programmer.  Snapshots are a convenient way to get a VM back to a known state.  No tester will want to use backups for this because it’s too cumbersome, expensive and slow.

Back to the call.  After the usual chain of mails to get the engineer to understand the problem I finally got him on board.  In case anyone from MS is reading, here’s the case number: SRX080721602387.  I learned something from this call.  Hyper-V knows what VM’s and snapshots exist via shortcuts:

  • %SYSTEMDRIVE%ProgramDataMicrosoftWindowsHyper-VVirtual Machines: This contains shortcuts to the XML files of each VM.
  • "%SYSTEMDRIVE%ProgramDataMicrosoftWindowsHyper-VSnapshots: This contains shortcuts to the XML files of each snapshot.

Here’s where it gets nutty.  The missing VM’s were defined in these locations.  Now we had no idea why Hyper-V wasn’t loading my VM’s (reboots and all).  We tried recreating this shortcuts via Explorer and via command prompt.  No joy.

I eventually gave up because the ticket was now running around in circles.  I needed a working test lab back, despite losing my snapshots which will eventually lead me having to recreate my lab environment from scratch.

What to learn from this?  Hyper-V badly needs a simple way to open an existing VM.  Virtual Server has it.  Virtual PC has it.  VMware has it.  Why doesn’t Hyper-V?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.