You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use runhcs to create a container. I have diligently followed @christian-korneck's blog post and the example in #435 but I am unable to get it to work. I have tried this on both Windows Server Core 2019 and 2022 using both Server Core and normal images.
To get started, I have installed the Go and the runhcs and wclayer tools.
Start-BitsTransfer https://go.dev/dl/go1.22.4.windows-amd64.msi
msiexec /qb /i go1.22.4.windows-amd64.msi
go install github.com/Microsoft/hcsshim/cmd/wclayer@latest
go install github.com/Microsoft/hcsshim/cmd/runhcs@latest
There is some discrepancyy around whether the scratch layer should just be an empty folder or whether it should created using wclayer but either way it doesn't work.
I am going to follow the example code in e2e_matrix_test.go.
Create some temporary working directories L175-L187
Add the empty scratch layer L214. I've tried using wclayer to create an empty scratch layer stacking the layers from above as the parents but it doesn't make a difference.
I have put all of the above PowerShell code in a Gist, including the steps to tidy up (such as using wclayer to unmount and remove the image).
I assume that I am just doing something wrong or that runhcs has been replaced with something else. However, I noticed that @katiewasnothere updated the code just a couple of weeks ago so I think it probably should be a working tool. Any thoughts would be greatly appreciated.
I am trying to use
runhcs
to create a container. I have diligently followed @christian-korneck's blog post and the example in #435 but I am unable to get it to work. I have tried this on both Windows Server Core 2019 and 2022 using both Server Core and normal images.To get started, I have installed the Go and the
runhcs
andwclayer
tools.There is some discrepancyy around whether the scratch layer should just be an empty folder or whether it should created using
wclayer
but either way it doesn't work.I am going to follow the example code in
e2e_matrix_test.go
.Create some temporary working directories L175-L187
Create an empty spec L190-L199
Build up a list of layers defined in the base image we are using L201-L213
Add the empty scratch layer L214. I've tried using
wclayer
to create an empty scratch layer stacking the layers from above as the parents but it doesn't make a difference.Create
config.json
L216-L227Then invoke
runhcs
aka L250. I've tried it with and without the PID file and logs.runhcs list
shows that this has worked and thepid
file is populated.Let's start the container L272
The process is now dead
The log file shows an invalid memory address error
I have put all of the above PowerShell code in a Gist, including the steps to tidy up (such as using
wclayer
to unmount and remove the image).I assume that I am just doing something wrong or that
runhcs
has been replaced with something else. However, I noticed that @katiewasnothere updated the code just a couple of weeks ago so I think it probably should be a working tool. Any thoughts would be greatly appreciated.This is what
config.json
looked likeThe text was updated successfully, but these errors were encountered: