Error: 0x800f0906 Adding GUI features on Windows Server 2012 Core

Posted by in PowerShell, Windows Server

I have always preferred to have least amount of overhead possible when running Server workloads. For the same reason my Hyper-V lab infrastructure is configured to run Windows Server 2012 Core.

There are times however, when you may want to have GUI. So I set out to configure one of my servers from Core to minimal GUI. Knowing the cmdlets and options I assumed it would be as simple as running:

Add-WindowsFeature Server-Gui-Mgmt-Infra –Restart

Murphy never fails to surprise. I got this error instead:

Add-WindowsFeature : The request to add or remove features on the specified server failed.
Installation of one or more roles, role services, or features failed.
The source files could not be downloaded.
Use the “source” option to specify the location of the files that are required to restore the feature. For more
information on specifying a source location, see http://go.microsoft.com/fwlink/?LinkId=243077. Error: 0x800f0906
At line:1 char:1
+ Add-WindowsFeature Server-Gui-Mgmt-Infra
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (@{Vhd=; Credent…Name=localhost}:PSObject) [Install-WindowsFeature],
    Exception
    + FullyQualifiedErrorId : DISMAPI_Error__Cbs_Download_Failure,Microsoft.Windows.ServerManager.Commands.AddWindowsF
   eatureCommand

The error I think is clear enough. If you are used to Windows Server 2008 R2 installations, now is the time for a lesson.

Windows Server 2012 introduces “Feature on Demand”. The way it works is, only required files from installation source are copied to the Install location (usually c:\Windows). This results in around 4GB of space savings when you install Server Core compared to Server with a GUI Installation. When you try to add a feature that wasn’t installed initially, installation process tries to download required files from Windows Update, or use source if one is specified.

As per TechNet documentation installation should have succeeded by using Windows Update as a source. Since we don’t live in perfect world, it didn’t. Oh and my server does have internet connectivity.

I then tried to use install source as per the TechNet article (referred below):

Add-WindowsFeature Server-Gui-Mgmt-Infra –Source wim:E:\Sources\install.wim:4 –Restart

That failed as well. Now it was getting frustrating. This is the pain inflicted by feature that wasn’t in Core. It took hours of reading and searching on internet which brought me to this page: How to update local source media to add roles and features.

So I ended up downloading all the patches I had installed from the time I installed the server, 26 patches in total. Then following steps mentioned in the article above to update install source, and let me tell you, it’s not easy of a process as it may seem in the article when you apply not just one for 26 patches. It took a while and finally got my source updated to the level where server patch level was matching. Then I issued the Add-WindowsFeature cmdlet again and it finished successfully.

Moral of the story: Install Windows Server with GUI and then remove GUI instead of installing Server Core and then add GUI feature. Downside is 4GB of additional space. In today’s world you shouldn’t be complaining about that! Smile

If you are craving for more, here’s some good reading:

TechNet Article – Windows Server Installation Options

TechNet Blogs – Using Features on Demand with Updated Systems and Patched Images

 

Cheers!

Print Friendly, PDF & Email