How To Manually Add A VM Configuration To Hyper-V

Hyper-V uses a whole series of files for a VM.  Here’s some of them:

  • The VHD or virtual hard disk where your VM’s operating system, applications and data are stored.
  • An XML file for the VM configuration.
  • Snapshot files, including an XML file
  • A symbolic link (shortcut with permissions) to the virtual machine configuration file.
  • A symbolic link (shortcut with permissions) to the snapshots.

There is a disaster scenario where you lose your VM configuration and need to add in a new one.  For example, I had an issue several months ago where antivirus locked my VM configuration files.  No matter what I did (remove AV and reboot) Hyper-V no longer tried to load nor could even see the affected VM’s after that.  PSS tried to recreate the symbolic links but this failed to sort out my issue.

The Virtual PC Guy recently blogged about a post by Robert Vierthaler where he described how to do this.  I must mention that this is NOT SUPPORTED BY PSS.  They see it as the first part of recovering the VM.  After that, they say you need to do a full backup of the VM and rebuild/recover the backup.  Yes I know; that’s not very satisfactory but it’s better than nothing.

Credit: Virtual PC Guy.

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.