无法在Windows Server 2016 TP4上设置Windows Server容器

时间:2016-04-12 12:26:45

标签: windows powershell containers windows-server-2016

我正在尝试在Windows Server 2016 TP4上设置Windows Server Containers。 我正在关注MS的guideline,但它不起作用。它始终失败并出现以下错误:

Getting Container OS image (WindowsServerCore) version 10.0.10586.0 from OneGet (this may take a few minutes)...
C:\Install-ContainerHost.ps1 : Unable to download.
In Zeile:1 Zeichen:1
+ C:\Install-ContainerHost.ps1
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Install-ContainerHost.ps1

我可以发现Install-ContainerHost.ps1脚本尝试从here下载WindowsServerCore映像。手动调用此URL将返回“BlobNotFound”。

我不确定这是不是我的错,或者他们只是服务器有问题。我今天已经尝试过几次运行脚本了。昨天它在另一个虚拟机上运行..

编辑:Micrsoft使用下载服务器似乎是一个问题,现在已经修复了。

1 个答案:

答案 0 :(得分:1)

好的,这就是我们为TP4转到你的ISO,并打开ISO。 里面有一个“NanoServer”文件夹,你可以在其中找到wim文件(图像)。

在本地或您喜欢的互联网上复制此图像。获取URL,您将使用它来破解Powershell脚本。 在Powershell中运行这些命令

Install-Package ContainerProvider

通过运行验证已安装包:

Find-ContainerImage

记事本打开:C:\ Program Files \ WindowsPowerShell \ Modules \ ContainerProvider \ 0.5.2 \ ContainerProvider \ ContainerProvider.psm1

转到第508行并修改Variable $ downloadURL :(注意我如何使用自己的网址)

$downloadURL = "http://10.0.2.2:8000/NanoServer.wim"

之后:运行

Install-ContainerImage -Name NanoServer

将安装图像