Coder Social home page Coder Social logo

Comments (4)

alancapc avatar alancapc commented on June 12, 2024

$env:CONTAINER_BASE_LAYER needs to be set

from dotnet-computevirtualization.

himsh avatar himsh commented on June 12, 2024

from dotnet-computevirtualization.

mk6150 avatar mk6150 commented on June 12, 2024

Have you tried entering the path/GUID to the container’s base layer? If you’re using Docker’s windowsfilter dir struct, itll be the directory directly under the windowsfilter folder that has a layer.json with a ”null” entry. It’s easiest to find the base layer in a freshly installed docker environment.

from dotnet-computevirtualization.

erenes avatar erenes commented on June 12, 2024

I just tried the above, using:
ls -depth 5 -filter layerchain.json | ? Length -eq 4 | select -Property length,Directory
I found that there are only two base layers that have null as content in layerchain.json (note not layer.json, because that does not appear to exist in the current version of Docker).

Using either directory as environment variable in the unit tests gives me the following output:
System.AggregateException : One or more errors occurred. (HCS function call returned error.) ---- Microsoft.Windows.ComputeVirtualization.HcsException : HCS function call returned error. -------- System.Runtime.InteropServices.COMException : The container operating system does not match the host operating system. (Exception from HRESULT: 0xC0370101)

Note that I'm running on Windows 10, so perhaps this library only works with native Windows Server containers? I can run nanoserver/iis using docker though, so I'll see if I can dive in their source code to see what happens on hcsshim level.

Edit: Also I had to run Visual Studio as administrator, else I would get an AccessDenied error.

from dotnet-computevirtualization.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.