{"id":2195,"date":"2017-05-31T21:14:52","date_gmt":"2017-05-31T21:14:52","guid":{"rendered":"http:\/\/microsoftgeek.com\/?p=2195"},"modified":"2018-09-06T23:18:17","modified_gmt":"2018-09-06T23:18:17","slug":"fixing-windows-2012r2-hyper-v-role-failing-at-99-percent","status":"publish","type":"post","link":"https:\/\/microsoftgeek.com\/?p=2195","title":{"rendered":"Fixing Windows 2012R2 Hyper-V Role Failing At 99 Percent"},"content":{"rendered":"<p>installing the Hyper-V Role is straightforward on a new system, I have seen couple of scenarios where the Hyper-V role will fail on installation. Scenario conditions are outlined below:<\/p>\n<ul>\n<li>Fresh install of Windows 2012R2 Server.<\/li>\n<li>All Windows Updates applied then rebooted.<\/li>\n<li>Post reboot, Hyper-V Role was installed.<\/li>\n<li>Rebooted machine to finalize installation of role<\/li>\n<li>Machine begins applying, gets to 99%, then fails to install the Hyper-V role. Windows performs rollback.<\/li>\n<\/ul>\n<h2>Resetting Windows Registry Files To Fix Hyper-V Role<\/h2>\n<p>The fix that worked for us was to open up a <strong>Command Prompt<\/strong> and select <strong>Run As Administrator<\/strong>\u00a0(or create a batch file and run as an administrator) with the following text.<\/p>\n<div><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.interworks.com\/sites\/default\/files\/blog\/u34\/Blog-HyperV2012R2-SS01.png\" alt=\"Resetting Windows Registry Files to Fix Hyper-V Role\" width=\"341\" height=\"406\" \/><\/div>\n<div>\n<pre>sc config winmgmt start= disabled\r\nnet stop winmgmt \/y\r\n%systemdrive%\r\ncd %windir%\\system32\\wbem\r\nfor \/f %s in ('dir \/b *.dll') do regsvr32 \/s %s\r\nregsvr32 %windir%\\system32\\tscfgwmi.dll wmiprvse \/regserver net start winmgmt for \/f %s in ('dir \/b *.mof *.mfl') do mofcomp %s cd C:\\Windows\\System32\\wbem\\AutoRecover\r\nfor \/f %s in ('dir \/b *.mof *.mfl') do mofcomp %s<\/pre>\n<p>After the commands above have been executed, the following should now run successfully:<\/p>\n<ul>\n<li>Install the Hyper-V Role<\/li>\n<li>Reboot the machine<\/li>\n<li>Hyper-V will now successfully apply<\/li>\n<\/ul>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>installing the Hyper-V Role is straightforward on a new system, I have seen couple of scenarios where the Hyper-V role will fail on installation. Scenario conditions are outlined below: Fresh install of Windows 2012R2 Server. All Windows Updates applied then rebooted. Post reboot, Hyper-V Role was installed. Rebooted machine to finalize installation of role Machine [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[51,53,48],"tags":[],"class_list":["post-2195","post","type-post","status-publish","format-standard","hentry","category-server-virtualization-hyper-v-2","category-virtualization-virtual","category-microsoft-windows-server-2012"],"_links":{"self":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts\/2195","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2195"}],"version-history":[{"count":1,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts\/2195\/revisions"}],"predecessor-version":[{"id":2196,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts\/2195\/revisions\/2196"}],"wp:attachment":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2195"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2195"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2195"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}