Monday, October 12, 2009

Manually add a VM Configuration to Hyper-V

1. Create the link to the xml file
mklink "%systemdrive%\ProgramData\Microsoft\Windows\Hyper-V\Virtual Machines\5A0EAC7A-2079-467B-A95D-7D1368DD6A35.xml" "E:\Virtual Machines\SXXXXXX\5A0EAC7A-2079-467B-A95D-7D1368DD6A35.xml"
2. Grant the Service SID to the xml file
icacls "%systemdrive%\ProgramData\Microsoft\Windows\Hyper-V\Virtual Machines\5A0EAC7A-2079-467B-A95D-7D1368DD6A35.xml" /grant "NT VIRTUAL MACHINE\5A0EAC7A-2079-467B-A95D-7D1368DD6A35":(F) /L
3. Grant the Service SID the all the file
icacls E:\Virtual Machines\SXXXXXX\ /T /grant "NT VIRTUAL MACHINE5A0EAC7A-2079-467B-A95D-7D1368DD6A35":(F)

Quite complicated... maybe create new one with existing disk is a better idea but..be careful about new GUID and mac address also...

No comments:

Post a Comment