Q. How can I add virtual machines (VMs) to the Hyper-V console?

John Savill

January 12, 2009

2 Min Read
ITPro Today logo in a gray background | ITPro Today

A. If you have a VM that's not showing in the Hyper-V management console, you can manipulate the content of the Virtual Machines folder and add a shortcut to the configuration XML file of the VM you want to add. The folder is located at C:ProgramDataMicrosoftWindowsHyper-VVirtual Machines, but is hidden by default. Here's what the folder looks like from a command line:

C:ProgramDataMicrosoftWindowsHyper-VVirtual Machines>dirVolume in drive C has no label.Volume Serial Number is 94B9-23FEDirectory of C:ProgramDataMicrosoftWindowsHyper-VVirtual Machines01/07/2009 07:00 AM  .01/07/2009 07:00 AM  ..01/07/2009 06:56 AM  1022FAC1-A301-4F2B-923E-40ECA4B03306.xml[C:ClusterStorageVolume1savdalts01Virtual Machines1022FAC1-A301-4F2B-923E-40ECA4B03306.xml]01/07/2009 06:51 AM  4A6A2395-4BD4-4154-B21D-5CAC390E5209.xml[C:ClusterStorageVolume1savdalvstvrtVirtual Machines4A6A2395-4BD4-4154-B21D-5CAC390E5209.xml]03/21/2008 08:57 AM  6577728C-4F1D-4D4A-91E5-008C8A5C0E6E.xml[D:Virtualssavdalcore01Virtual Machines6577728C-4F1D-4D4A-91E5-008C8A5C0E6E.xml]07/17/2008 10:43 AM  7089B760-E9FD-41AA-8119-95C7A68B06A7.xml[D:VirtualssavdalxpvrtVirtual Machines7089B760-E9FD-41AA-8119-95C7A68B06A7.xml]01/04/2009 05:00 PM  80ACEAD6-4314-4E2E-9C75-F0BCEE1F0848.xml[D:Virtualssavdaldc01Virtual Machines80ACEAD6-4314-4E2E-9C75-F0BCEE1F0848.xml]5 File(s) 0 bytes2 Dir(s) 103,899,435,008 bytes free 

To create a link, use the Mklink command line utility. For example, the following command creates a link to the VM with the globally unique identifier 80ACEAD6-4314-4E2E-9C75-F0BCEE1F0848.

mklink 80ACEAD6-4314-4E2E-9C75-F0BCEE1F0848.xml "C:ClusterStorageVolume1savdalts01Virtual Machines1022FAC1-A301-4F2B-923E-40ECA4B03306.xml"

UPDATED: You'll also need to ensure the service account for the VM has the necessary permissions. To do so, run the following command.

icacls 80ACEAD6-4314-4E2E-9C75-F0BCEE1F0848.xml /grant "NT VIRTUAL MACHINE80ACEAD6-4314-4E2E-9C75-F0BCEE1F0848":(F) /L

Note that you use /L because you're updating a symbolic link. If you had snapshots for the VM, you need to add a link in the Snapshots folder using the GUID for the snapshots, found in guid.xml. Repeat the process above for mklink and icacls but using the snapshot GUID instead of the VM GUID, and create them in Hyper-VSnapshots instead of Hyper-VVirtual Machines.

You can now stop and start the Virtual Machine Management Service for the VM with commands "net stop vmms" and "net start vmms" respectively.

Related Reading


Videos:


Audio:



Check out hundreds more useful Q&As like this in John Savill's FAQ for Windows. Also, watch instructional videos made by John at ITTV.net.

About the Author

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like