Docker Community Forums

Share and learn in the Docker community.

Docker containers not starting: 0xc0370105

Goodmorning everyone,

I’ve been working on a Docker project that was created by a collegue 2 years ago and has been lying around since. I’ve recently picked this up and continued where he left off. But for some reason I run into a lot of errors trying to run the containers. Most of them I have fixed and could get on to the next error, but now I have one that I can not fix and can’t find a lot about on google.

I’m running into this issue:
container a91b44768359f6780c00c6e32b7e44b0f43222848628a5652546ddcb88a6c56f encountered an error during hcsshim::System::CreateProcess: failure in a Windows system call: The requested virtual machine or container operation is not valid in the current state. (0xc0370105)

The function that is starting the containers:
function Docker-Run {
<#
.SYNOPSIS
Build a part from the amt docker file
.PARAMETER PartName
[String] The part’s name.
.OUTPUTS

#>

param (
  [Parameter(Mandatory=$true)][String]$PartName
)

$Part = $null
foreach ($PartTest in $Global:Settings.Docker.Parts.ChildNodes) {
    if ($PartTest.ImageName -eq $PartName) {
        $Part = $PartTest
        break
    }
}
if ($null -eq $Part) {
    Throw "Docker-Run: Part [$PartName] could not be found in the Docker.xml"
}
$Volume = ""
if ($Part.Volume -ne "") {
  $Volume = "-v " + $Part.Volume
}
$PortMapping = ""
if ($Part.PortMapping -ne "") {
  $PortMapping = "-p " + $Part.PortMapping
}
$DockerImageName = "$($global:ImageAccount)/$($Part.ImageName)".ToLowerInvariant() # 

Write-Host "docker run $DockerImageName"
Invoke-Expression "docker run $PortMapping -i -d --rm --name $($Part.RunName) $DockerImageName"

}

Yes I’m not using the $Volume, this was in the Invoke-Expression but also caused issues. It made the container exit.

Hope anyone can help me further.

Maikel

Hey Maikel, I was wondering if you had managed to solve this issue? I am running into the same error when I try to run a Windows container with host devices as is shown in the Microsoft documentation:

I try to run:
docker run --isolation=process --device="class/86E0D1E0-8089-11D0-9CE4-08003E301F73" mcr.microsoft.com/windows:20H2

as the example shows in the documentation (just mirroring the host’s OS as its required.) The container manages to start, but then it exits with the above error.

I’m having a similar issue, were you able to find a solution for your situations?