Why I can’t convert my Windows Server 2012 R2 Core to GUI
2016-03-31 19:06
477 查看
Let’s assume that you installed some time ago one Windows Server 2012 R2 Server Core and you have installed also latest Windows Updates to that server and this server does not have an internet connection.
Here are the updates that are installed
In one day you discover that you need to add graphical user interface and you execute the following command
You will see that it reaches to 68% and fails with following error
Install-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
You re-read the Technet article and maybe also re-download the Windows Server installation media but the command still fails. You also see from the internet this approach but it still fails (下面三条命令是关键,红字标识)
So the BIG question is what´s wrong?
In this case the server is offline and can´t download the files from Windows Update and in some cases you can´t allow the server to contact directly with Windows Update.
Actually the problem is really easy. The problem is that your Windows Server installation source files are older than your server installation with latest Windows Updates. To fix the problem you need to update also your installation source files regularly otherwise you may run into issues, if you need the source files really quickly for recovery etc.
Currently Microsoft does not provide any automated way to do that but you can create it yourself really easily.
Here are the commands to update the source files with PowerShell
If you update the source files with these 12 updates and you run the command again it will succeed. You can use Get-WindowsImage cmdlet to get the correct Windows Image index. Default size for Windows Server 2012 R2 SERVERSTANDARD is 11 676 579 164 bytes and with 12 updates the size is 13 676 153 548 bytes.
So please remember to update you source files regularly!
Here are the updates that are installed
In one day you discover that you need to add graphical user interface and you execute the following command
Install-WindowsFeature Server-Gui-Shell -Source:wim:D:\Sources\install.wim:2
You will see that it reaches to 68% and fails with following error
Install-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
You re-read the Technet article and maybe also re-download the Windows Server installation media but the command still fails. You also see from the internet this approach but it still fails (下面三条命令是关键,红字标识)
New-Item -Path C:\WS2012R2 -ItemType Directory Mount-WindowsImage -Path C:\WS2012R2 -ImagePath C:\TEMP\install.wim -Index 2 -ReadOnly Install-WindowsFeature Server-Gui-Shell –Source C:\WS2012R2
So the BIG question is what´s wrong?
In this case the server is offline and can´t download the files from Windows Update and in some cases you can´t allow the server to contact directly with Windows Update.
Actually the problem is really easy. The problem is that your Windows Server installation source files are older than your server installation with latest Windows Updates. To fix the problem you need to update also your installation source files regularly otherwise you may run into issues, if you need the source files really quickly for recovery etc.
Currently Microsoft does not provide any automated way to do that but you can create it yourself really easily.
Here are the commands to update the source files with PowerShell
# Create folders New-Item -Path C:\WS2012R2 -ItemType Directory New-Item -Path C:\TEMP -ItemType Directory # Copy the install.wim to temporary folder Copy-Item H:\sources\install.wim C:\TEMP # Remove the read-only attribute from the copied file Set-ItemProperty -Path C:\TEMP\install.wim -Name IsReadOnly -Value $False # Get the Windows Image Index Get-WindowsImage -ImagePath C:\TEMP\install.wim # Mount the Image Mount-WindowsImage -Path C:\WS2012R2 -ImagePath C:\TEMP\install.wim -Index 2 # Add the Updates to Windows Image $Updates = Get-ChildItem C:\Users\kaj\Desktop\Updates foreach($item in $Updates){ Add-WindowsPackage -PackagePath $item.FullName -Path "C:\WS2012R2" } # Commit the changes Dismount-WindowsImage -Path C:\WS2012R2 -Save -Verbose
If you update the source files with these 12 updates and you run the command again it will succeed. You can use Get-WindowsImage cmdlet to get the correct Windows Image index. Default size for Windows Server 2012 R2 SERVERSTANDARD is 11 676 579 164 bytes and with 12 updates the size is 13 676 153 548 bytes.
So please remember to update you source files regularly!
相关文章推荐
- UIBezierPath - 贝塞尔曲线
- Ubuntu15.10安装Arduino IDE记录
- android自定义UI组件
- UITableViewController和XML解析还有地图的简单结合
- easyui tree 增加参数
- #调整随机森林的参数(调整n_estimators随机森林中树的数量默认10个树,精度递增显著,但并不是越多越好),加上verbose=True,显示进程使用信息
- miniGUI3.0.12移植到Hi3531
- miniGUI3.0.12移植到Hi3531
- miniUI tree 过滤(filter)的问题
- UI - Cocoa Touch框架
- SPOJ GSS1 Can you answer these queries I(区间合并)
- hdoj 3157 Crazy Circuits 【有下界最小流】
- 整体二分 hdu5412 CRB and Queries
- Mosquitto pub/sub服务实现代码浅析-主体框架
- 开源mqtt代理:mosquitto
- UI控件--Toast
- iOS给UILabel设置缩进、行距、字体颜色
- Android中的Bluetooth详解
- 更改UIsearchbar 的背景和cancel按钮(转)
- monkeyrunner进行多设备UI测试