I have a Windows 2008 R2 server that I installed Hyper-V on and built a couple of Virtual Machines. The first one is the core SBS 2011 server for the building, the second is an FTP server also running 2008 R2. While trying to fix another issue I installed a copy of the Microsoft Security Center Virtual Machine Manager, and now the VMs won't start. You can berate me later for doing this on the production server, but I was backed into a corner on the project. I at least had the forethought to build another domain controller onto seperate server so I haven't lost AD services complely, just DHCP and email for now.
When Hyper-V was orginally installed I set the default location for the Virtual Machine files to be stored as D:\Hyper-V\Virtual Machines
and the Virtual Hard Drives as D:\Hyper-V\Virtual Hard Disks
. I stopped the VMs that were running before starting the VMM install, did a clean reboot as the analyzer suggested. When the VMM installed it only asked where the Virtual machines were stored. When I went to restart the VMs, both gave errors similar to the following (different Machine IDs for each):
"Unnamed VM" could not initialize
an attempt to read or update the virtual machine
configuration failed because access was denied.
"Unnamed VM" could not initilize. (Virtual machine ID
"Unnamed VM" could not read or update the virtual machine
configuration because access was denied: General Access
denied error (0x80070005). Check the security settings on
the folder in which the virtual machine is stored (Virtual
machine ID 1A4E96D-8657-4ADF-800E-11F0204FB54D)
After some fishing about on MS Support and on the net, I was able to determine that the issue was that the extended permissions on the files and directories got mucked up when VMM installed, so for both of the top Level Directories, and each of the vhd files, the "machine" folder and Macgine XML file, I ran the following command:
C:\Users\administrator.RTANGLE>icacls "D:\Hyper-V\Virtual Hard Disks\SBS2011-FixedSize.vhd" /grant "NT VIRTUAL MACHINE\334880EE-6A4E-4B81-98FB-BF3FAF6B577D":F
This got me to the point where now get the following error:
'SBS2011' could nit initialize.
An attempt to initialize VM saved state failed.
'SBS2011' could not initialize. (Virtual machine ID
'SBS2011' could not create or access saved state file
D:\Hyper-V\Virtual Machines\Virtual Machines...\334880EE-6A4E-4B81-98FB-BF3AF6B577D.vsv.
(Virtual machine ID
I went through the log files and found that the file it was complaining about was D:\Hyper-V\Virtual Machines\Virtual Machines\334880EE-6A4E-4B8
577D.vsv. I can see that this file was created and has content (not zero sized).
I tried running the same icacls command above on that file and also tried adding /inheritance:e
to the options and doing the directory again, but still no joy.
Can somebody help me get these VMs working again please!