Showing posts with label HyperV. Show all posts
Showing posts with label HyperV. Show all posts

Monday, October 27, 2014

HyperV VHD Permissions

Due to a lack of resources on one of our HyperV hosts, I had to move the VHD to another drive to perform some work. When I moved the VHD back to the original location, I could not start it!
Apparently my earlier actions has stripped the Virtual Machine SID permissions and therefore Hyper-V couldn't take control of the file as necessary.  In order to restore the file permissions I ran the following:

icacls “<path to VHD>.vhd” /grant “NT VIRTUAL MACHINE\<virtual machine SID>”:F

If you don’t know the virtual machine SID, navigate to the folder storing your virtual machine files and click on the Virtual Machines subfolder.  Inside this folder is an XML document named the same as the SID

Friday, October 3, 2014

Free Powershell Hyper-V Cookbook by Altaro

A new ebook has been published by the good people at Altaro for the community.
The ebook which come FREE is packed with scripts to manage Hyper-V using PowerShell.

Go it your copy of The Altaro PowerShell Hyper-V Cookbook by Jeffery Hicks now!

Thursday, July 24, 2014

Permission to perform this operation was denied (VMWare Convertor)

Encountered an issue while attempting to convert a HyperV server to a vSphere server.
Using the VMWare vCenter converter as per normal, I was faced with a roadblock when I attempted to select the hyperV server for conversion.

Error that was flagged is
"Permission to perform this operation was denied "

In the back of my mind, I was thinking out loud "How could I be denied when I was the domain admin!"
After futile attempts which included running the VMWare convertor as "Administrator", I resorted to the last means which is to turn of the UAC for my account.
After the restart following the change, all works!
Weird but true....

Monday, July 16, 2012

Windows Server 2008 stops responding and hangs at the "Applying User Settings" stage of the logon process

An issue was flagged to me last week that a HyperV Guest running on Windows 2008 Sp2 is starting up extremely slowly (Applying Computer settings, Applying Security Policies etc) and it can take up to hours for the Server to reach the Logon Screen.

Even though I could logon to the server , it has been found that multiple services inclusive of the below are not started. Weird!!

Print Spooler
Terminal Services
Server service
Remote Registry
Windows Management Instrumentation (WMI)
Distributed Transaction Coordinator
Any services that are related to applications

After several rounds of troubleshooting which includes

- Booting to Safe mode (Booting to safe mode flies)
- Re-installing the HyperV integration Disk
- Tweaking Physical NIC settings

I finally came across a Microsoft Article ( that more or less describes what I am facing.

This issue occurs because of a deadlock in the Service Control Manager database.

The Service Control Manager tries to start the HTTP.sys service and then puts a lock in place in the Service Control Manager database. Then, HTTP.sys makes a call that requires Cryptographic Services during startup. Then, a request is sent to start Cryptographic Services. However, a lock is already in place in the Service Control Manager database. Therefore, a deadlock occurs.

To verify that this is true, run "sc querylock" from command prompt.
The output below will indicate that the Service Control manager (SCM) databse is locked

QueryServiceLockstatus - Success
IsLocked : True
LockOwner : .\NT Service Control Manager
LockDuration : 1090 (seconds since acquired)

To Resolve the issue

You can modify the behavior of HTTP.SYS to depend on another service being started first. To do this, perform the following steps:

1) Open Registry Editor
2) Navigate to HKLM\SYSTEM\CurrentControlSet\Services\HTTP and create the following Multi-string value:DependOnService
3) Double click the new DependOnService entry 
4)Type CRYPTSVC in the Value Data field and click OK.
5) Reboot the server