Saturday 28 September 2013

Windows server 2012 switching from Core to GUI (rant) and bloody Error: 0x800f0906

I have wasted quite some time figuring out why the hack would the change procedure for switching from Core to GUI not work when I know I have run the exactly same procedure before and it did work. But no, this time all I got was a nice error...
So, you do this (install GUI from the install.wim file with the index of 2 - Server 2012 Standard Full):

Install-WindowsFeature -Name "Server-Gui-Mgmt-Infra" -Restart:$false -source wim:D:\sources\install.wim:2

And receive a generous error of  0x800f0906 with the text saying that you should supply the source...
The same thing happens when you try to switch by using the DISM command (well not exact error but you get an error saying you should try adding the source).

Every possible web site I could find was telling me that all I needed to do was what I have already done - just add the -source to PowerShell commands or /Source to the DISM command and point it to the correct source (Either the SxS directory or a WIM image) for instance like on an excelent page like this one.
Well the issue seems to be that if you have installed Server Core at the beginning and then installed Windows updates (I had about 36 updates that needed to be added), your sources (SxS directory or WIM image file) are not the correct version any more and the commands will not recognize them as sources...

So what to do?

Well you can modify your WIM file by adding the updates to it - depending on how many updates you need it will take you some time to list them (link on how to do it here) and then download them all (link on to how/where to get updates here).
There is one thing you should do which the above page about downloading them does not tell you - you need to copy each individual .msu file to a common directory - normally when you would use the above procedure you will get files saved in their own directories named by the updates themselves, but the DISM /Add-Package command expects for them all to be in the same directory (or you would have to run the DISM command for each and every .msu file individually).

Another way to solve this issue might be to just use the SxS directory from a machine with the same OS Version, already updated to the same level (like another 2012 server with GUI), share that directory over the network and use it as the source for your Core to GUI upgrade (did not try that one but supposedly it should work).

Well probably the easiest way to not fall down this specific hole is to actually install the GUI when installing the system for the first time, and then switch to the Core version without removing the payload. It will use some disk space (compared to the pure Core version), but other than that you should be fine.


No comments: