Running a KVM virtual machine inside a runc contianer.
- A host which can run KVM virtual machines using Vagrant.
git clone https://github.com/helm/helm.git && cd helm | |
# alpine (success) | |
make clean; \ | |
docker run --rm -it --volume $PWD:$PWD -w $PWD library/golang:1.19-alpine sh -c " \ | |
cat /etc/os-release; apk add file gcc g++ make bash; \ | |
make GOEXPERIMENT=boringcrypto \ | |
GOFLAGS='-buildvcs=false' \ | |
CGO_ENABLED=1 \ | |
TAGS=netgo,osusergo \ |
🇩 binaries | |
🇩 test-cri | |
/go/bin/critest | |
'/go/src/github.com/containerd/cri/hack/../_output/containerd' -> '/usr/local/bin/containerd-test' | |
changing security context of '/usr/local/bin/containerd-test' | |
make[1]: Entering directory '/go/src/github.com/containerd/cri/test/selinux/policy' | |
rm -fR tmp | |
rm -f *.pp | |
/usr/share/selinux/devel/include/services/container.if:13: Error: duplicate definition of container_runtime_domtrans(). Original definition on 13. | |
/usr/share/selinux/devel/include/services/container.if:40: Error: duplicate definition of container_runtime_run(). Original definition on 40. |
critest version: 1.18.0-89-gbaca4a1 | |
Running Suite: CRI validation | |
============================= | |
Random Seed: [1m123456789[0m - Will randomize all specs | |
Will run [1m90[0m of [1m97[0m specs | |
[0m[k8s.io] Container[0m [90mruntime should support basic operations on container[0m | |
[1mruntime should support removing stopped container [Conformance][0m | |
[37m/usr/src/github.com/kubernetes-sigs/cri-tools/pkg/validate/container.go:134[0m | |
[BeforeEach] [k8s.io] Container |
🇩 binaries | |
🇩 test-cri | |
/go/bin/critest | |
'/go/src/github.com/containerd/cri/hack/../_output/containerd' -> '/usr/local/bin/containerd-test' | |
changing security context of '/usr/local/bin/containerd-test' | |
make[1]: Entering directory '/go/src/github.com/containerd/cri/test/selinux/policy' | |
rm -fR tmp | |
rm -f *.pp | |
/usr/share/selinux/devel/include/services/container.if:13: Error: duplicate definition of container_runtime_domtrans(). Original definition on 13. | |
/usr/share/selinux/devel/include/services/container.if:40: Error: duplicate definition of container_runtime_run(). Original definition on 40. |
Setup the VM:
cd $GOPATH/src/github.com/containerd/cri
./hack/install/install-cni.sh
./hack/install/install-cni-config.sh
[vagrant@localhost cri]$ make test-cri | |
🇩 binaries | |
🇩 test-cri | |
/go/bin/critest | |
'/go/src/github.com/containerd/cri/hack/../_output/containerd' -> '/usr/local/bin/containerd-test' | |
changing security context of '/usr/local/bin/containerd-test' | |
make[1]: Entering directory '/go/src/github.com/containerd/cri/test/selinux/policy' | |
make[1]: 'containerd-test.pp' is up to date. | |
make[1]: Leaving directory '/go/src/github.com/containerd/cri/test/selinux/policy' | |
mkdir: created directory '/var/lib/containerd-test' |
version: "3" | |
volumes: | |
local-data: | |
mirror-data: | |
services: | |
local: | |
container_name: registry-local | |
image: registry:2 |