ContainerProvider icon indicating copy to clipboard operation
ContainerProvider copied to clipboard

Windows 10 Install-ContainerOSImage missing

Open ilanc opened this issue 8 years ago • 7 comments

I have Windows 10 anniversary edition (winver = version 1607 OS Build 14393.51) on my home laptop and an Azure VM running Windows Server 2016 CTP 5 - installed via the shiny blue "Deploy to Azure" button here:

  • https://msdn.microsoft.com/virtualization/windowscontainers/quick_start/quick_start_windows_server)

I cannot get docker images to work on either box - but for different reasons. This issue is about the windows 10 laptop. I can't install the OS base images and I'm losing my will to keep fighting with this (I guess some people are simply not destined to run their apps in a docker container).

I've followed the "quick" start instructions for windows 10 here:

  • https://msdn.microsoft.com/virtualization/windowscontainers/quick_start/quick_start_windows_10

I have container & hyper-v optional WindowsOptionalFeatures enabled and docker setup. I'm struggling to install base images on the laptop. I'm based in South Africa - network connectivity is kak. These all timeout and fail:

  • docker pull microsoft/windowsservercore
  • Install-ContainerImage -Name WindowsServerCore

I managed to download the .wim files directly by finding the urls in Find-ContainerImage i.e.

  • https://az887518.vo.msecnd.net/pshctcontainer/WindowsServerCore-10-0-14300-1000.wim

I was hoping that I could do the offline installation as mentioned here: https://msdn.microsoft.com/en-us/virtualization/windowscontainers/management/manage_images#offline-installation

Alas I don't have Install-ContainerOSImage as a powershell commandlet on the Win 10 laptop:

Install-ContainerOSImage : The term 'Install-ContainerOSImage' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

It appears that the Install-ContainerOSImage is available on the Windows Server 2016 box though:

PS C:\Users\ilan>  get-command Install-ContainerOSImage

CommandType     Name                                               Version    Source
-----------     ----                                               -------    ------
Function        Install-ContainerOSImage                           1.0.0.0    Containers

Looks like it's installed by the WindowsOptionalFeatures stuff (nb which is enabled on server and laptop but seems to have different functionality) i.e.:

Enable-WindowsOptionalFeature -Online -FeatureName containers -All

I did a file comparison on the powershell files on the server vs my laptop and indeed the server has more powershell functionality than the laptop version:

C:\Windows\System32\WindowsPowerShell\v1.0\Modules\Containers\1.0.0.0
Containers.psm1 = only on the server - and contains `Install-ContainerOSImage`

Summary

  • How can I install the .wim on the laptop?
  • Or is there an alternative method for offline installation? (I was considering docker save on the server and docker load on the laptop)

ilanc avatar Aug 14 '16 14:08 ilanc

Ok so docker save doesn't work either:

PS C:\Users\ilan> docker save -o nano.tar microsoft/nanoserver
Error response from daemon: file integrity checksum failed for "UtilityVM/Files/EFI/Microsoft/Boot/BCD"

PS C:\Users\ilan> docker images
REPOSITORY                    TAG                            IMAGE ID            CREATED             SIZE
microsoft/dotnet              1.0.0-windowsservercore-core   63496b5f64f4        3 days ago          7.901 GB
microsoft/iis                 latest                         accd044753c1        9 days ago          7.907 GB
microsoft/windowsservercore   10.0.14300.1030                02cb7f65d61b        8 weeks ago         7.764 GB
microsoft/windowsservercore   latest                         02cb7f65d61b        8 weeks ago         7.764 GB
microsoft/nanoserver          latest                         3a703c6e97a2        8 weeks ago         969.8 MB

ilanc avatar Aug 14 '16 15:08 ilanc

Over the last few weeks we finished the work needed to support docker pull. Windows 10 Anniversary Edition doesn't support WIM-based installation, and Windows Server 2016 builds after TP5 won't support it either.

If docker pull is failing when you're using Docker v1.12 or later, can you open a issue at the Docker repo ?

PatrickLang avatar Aug 15 '16 18:08 PatrickLang

Ok so docker pull in future not Install-ContainerImage- got it.

NB I did eventually manage to get Install-ContainerImage -Name nanoserver to work after a couple attempts btw on my laptop. AFAIK this is downloading a WIM. It winds up in C:\ProgramData\Microsoft\Windows\Images. So it does seem to be working on Win10 Anniv Ed?

Could this image installation method have anything to do with the docker run hang I was chatting to you about on the other thread?

ilanc avatar Aug 15 '16 18:08 ilanc

if Install-ContainerImage works, it's still going to get an older version of Nano Server. When you try docker pull on an image built on top of it later, it will fail.

The docker run hang on Windows 10 Anniversary Edition is a separate issue, I have a dev working on it now.

PatrickLang avatar Aug 15 '16 18:08 PatrickLang

Can we get a more permant solution to this? I'm trying to build a 4 node swam and would like to not download 12GB of data I already have.

deedubb avatar Sep 04 '16 20:09 deedubb

I have the same issue with 1.13 on latest build.

C:\share\DockerFiles\redis>docker push 192.168.51.11:5000/nano --disable-content-trust The push refers to a repository [192.168.51.11:5000/nano] f0a41dcdd53f: Pushing [==================================================>] 640.7 MB/640.7 MB file integrity checksum failed for "UtilityVM/Files/EFI/Microsoft/Boot/BCD"

uday31in avatar Sep 08 '16 13:09 uday31in

I have faced the same issue for windows server core.. This is really a problem for people like us who have our setup in secured environments with no access to internet, So I had to upgrade my local machine to Windows 10, Hyper-V Manger, install 2K16 Server VM, Install container on the VM and pull the server core image and after doing all this get stuck with checksum error when saving the image for a offline tar file to be uploaded to the 2K16 server in the secured env. Please can someone have this rectified, it would help us save a lot of time.

arunbangalore avatar Sep 22 '16 04:09 arunbangalore