Windows IT Pro is the leading independent community for IT professionals deploying Microsoft Windows server and client applications and technologies.
  
  
  Advanced Search 


January 13, 2009

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

RSS
Subscribe to Windows IT Pro | See More Windows OSs Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!

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:\ProgramData\Microsoft\Windows\Hyper-V\Virtual Machines, but is hidden by default. Here's what the folder looks like from a command line:

C:\ProgramData\Microsoft\Windows\Hyper-V\Virtual Machines>dir
Volume in drive C has no label.
Volume Serial Number is 94B9-23FE

Directory of C:\ProgramData\Microsoft\Windows\Hyper-V\Virtual Machines

01/07/2009 07:00 AM <DIR> .
01/07/2009 07:00 AM <DIR> ..
01/07/2009 06:56 AM <SYMLINK> 1022FAC1-A301-4F2B-923E-40ECA4B03306.xml
[C:\ClusterStorage\Volume1\savdalts01\Virtual Machines\1022FAC1-A301-4F2B-923E-4
0ECA4B03306.xml]
01/07/2009 06:51 AM <SYMLINK> 4A6A2395-4BD4-4154-B21D-5CAC390E5209.xml
[C:\ClusterStorage\Volume1\savdalvstvrt\Virtual Machines\4A6A2395-4BD4-4154-B21D
-5CAC390E5209.xml]
03/21/2008 08:57 AM <SYMLINK> 6577728C-4F1D-4D4A-91E5-008C8A5C0E6E.xml
[D:\Virtuals\savdalcore01\Virtual Machines\6577728C-4F1D-4D4A-91E5-008C8A5C0E6E.
xml]
07/17/2008 10:43 AM <SYMLINK> 7089B760-E9FD-41AA-8119-95C7A68B06A7.xml
[D:\Virtuals\savdalxpvrt\Virtual Machines\7089B760-E9FD-41AA-8119-95C7A68B06A7.x
ml]
01/04/2009 05:00 PM <SYMLINK> 80ACEAD6-4314-4E2E-9C75-F0BCEE1F0848.xml
[D:\Virtuals\savdaldc01\Virtual Machines\80ACEAD6-4314-4E2E-9C75-F0BCEE1F0848.xm
l]
5 File(s) 0 bytes
2 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:\ClusterStorage\Volume1\savdalts01
\Virtual Machines\1022FAC1-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 MACHINE\80ACEAD6-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-V\Snapshots instead of Hyper-V\Virtual 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.

End of Article



Reader Comments

You must be a registered user or online subscriber to comment on this article. Please log on before posting a comment. Are you a new visitor? Register now




Top Viewed ArticlesView all articles
Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...

WinInfo Short Takes: Week of November 23, 2009

An often irreverent look at some of the week's other news, including some post-PDC some soul searching, a Google Chrome OS announcement and a Microsoft response, Windows 7 off to a supposedly strong start, the Jonas Brothers and Xbox 360, and so much more ...

2009 Windows IT Pro Editors' Best and Community Choice Awards

Picking a favorite product from an impressive crowd of competitive offerings is never an easy task, and such was the case with our Editors' Best and Community Choice awards this year. ...


Virtualization Whitepapers A Business Case for Backup & Recovery for The Virtualized Environment

Related Events VirtualizationPro 2010 Summit & Expo

Deep Dive into VMware vSphere

RUUP4IT? R2 Takes You Vertical and Virtual

Check out our list of Free Email Newsletters!

Windows OSs eBooks Understanding and Leveraging Code Signing Technologies

A Guide to Windows Certification and Public Keys

SQL Server Administration for Oracle DBAs

Related Windows OSs Resources Introducing Left-Brain.com, the online IT bookstore
Looking for books, CDs, toolkits, eBooks? Prime your mind at Left-Brain.com

Discover Windows IT Pro eLearning Series!
Clear & detailed technical information and helpful how-to's, all in our trademark no-nonsense format


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro DevProConnections IT Job Hound
Left-Brain.com Technology Resource Directory asp.netPRO ITTV Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 © 2009 Penton Media, Inc. Terms of Use | Privacy Statement