我试图通过containerd命令行使用Kata-Containers运行一个容器,但报错了。
$ sudo ctr run --runtime io.containerd.run.kata.v2 -t --rm docker.io/library/busybox:latest hello sh ctr: dial unix /run/containerd/s/f89a747f6a50d5c2ffc699d28a658410899f12d03fa638893cc55d2da1cf53f6: connect: connection refused: unknown
Ubuntu 版本: 22.04
我是这么做的:
首先,我按照开发人员指南来安装组件。动作如下:
-构建并安装Kata Containers运行时 -配置为使用rootfs映像 $sudo sed-i的/^\(initrd=.*\)/#\1/g'/etc/kata-containers/configuration.toml -启用seccomp -启用完整容器调试 [debug] level = "debug" -日志限制 -创建本地根 -安装rootfs映像 -使用kernel 版本v5.19.2安装 guest kernel 映像 -构建自定义QEMU -为aarch64/arm64构建自定义QEMU -构建virtiofsd -检查硬件需求 $sudo-kata运行时检查
INFO[0000] IOMMUPlatform is disabled by default. WARN[0000] Not running network checks as super user arch=amd64 name=kata-runtime pid=356121 source=runtime System is capable of running Kata Containers System can currently create Kata Containers
然后,我尝试使用containerd运行Kata Containers
-检查conainer是否可用 $command-v containerd /usr/local/bin/containerd -安装CNI插件 -安装cri工具 -配置containerd以使用Kata Containers
[plugins."io.containerd.grpc.v1.cri".containerd] snapshotter = "overlayfs" default_runtime_name = "runc" no_pivot = false [plugins."io.containerd.grpc.v1.cri".containerd.default_runtime] runtime_type = "" runtime_engine = "" runtime_root = "" privileged_without_host_devices = false [plugins."io.containerd.grpc.v1.cri".containerd.untrusted_workload_runtime] runtime_type = "" runtime_engine = "" runtime_root = "" privileged_without_host_devices = false [plugins."io.containerd.grpc.v1.cri".containerd.runtimes] [plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc] runtime_type = "io.containerd.runc.v2" runtime_engine = "" runtime_root = "" privileged_without_host_devices = false [plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc.options] BinaryName = "" CriuImagePath = "" CriuPath = "" CriuWorkPath = "" IoGid = 0 [plugins."io.containerd.grpc.v1.cri".containerd.runtimes.kata] runtime_type = "io.containerd.kata.v2" pod_annotations = ["io.kata-containers.*"] privileged_without_host_devices = true container_annotations = ["io.katacontainers.*"] [plugins."io.containerd.grpc.v1.cri".containerd.runtimes.kata.options] ConfigPath = "/etc/kata-containers/configuration.toml" [plugins."io.containerd.grpc.v1.cri".cni] bin_dir = "/opt/cni/bin" conf_dir = "/etc/cni/net.d" max_conf_num = 1 conf_template = ""
-cri工具配置 将CNI配置设置为/etc/CNI/net.d/10-mynet.conf:
{ "cniVersion": "0.2.0", "name": "mynet", "type": "bridge", "bridge": "cni0", "isGateway": true, "ipMasq": true, "ipam": { "type": "host-local", "subnet": "172.19.0.0/24", "routes": [ { "dst": "0.0.0.0/0" } ] } }
最后,我试图用ctr命令行启动容器,但在第二个命令中出错: $sudo-ctr-image pull-docker.io/library/bussybox:最新
$ sudo ctr run --cni --runtime io.containerd.run.kata.v2 -t --rm docker.io/library/busybox:latest hello sh ctr: dial unix /run/containerd/s/f89a747f6a50d5c2ffc699d28a658410899f12d03fa638893cc55d2da1cf53f6: connect: connection refused: unknown
我的qemu版本:
$ /usr/bin/qemu-system-x86_64 --version QEMU emulator version 6.2.0 (kata-static) Copyright (c) 2003-2021 Fabrice Bellard and the QEMU Project developers
容器状态:
$ systemctl status containerd ● containerd.service - containerd container runtime Loaded: loaded (/etc/systemd/system/containerd.service; enabled; vendor preset: enabled) Active: active (running) since Sat 2022-11-26 15:18:59 CET; 20h ago Docs: https://containerd.io Main PID: 3958910 (containerd) Tasks: 27 (limit: 153351) Memory: 32.5M CPU: 1min 21.403s CGroup: /system.slice/containerd.service └─3958910 /usr/local/bin/containerd
jouranlctl:
Nov 27 11:42:40 Epyc-condor sudo[389269]: ziyi : TTY=pts/4 ; PWD=/home/ziyi ; USER=root ; COMMAND=/usr/local/bin/ctr run --runtime io.containerd.run.kata.v2 -t --rm docker.io/library/busybox:latest hello sh Nov 27 11:42:40 Epyc-condor sudo[389269]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=1005) Nov 27 11:42:41 Epyc-condor sudo[389269]: pam_unix(sudo:session): session closed for user root Nov 27 11:42:48 Epyc-condor systemd[324736]: run.mount: Failed to load configuration: No such file or directory Nov 27 11:42:48 Epyc-condor systemd[324736]: run-containers.mount: Failed to load configuration: No such file or directory Nov 27 11:42:48 Epyc-condor systemd[324736]: run-containers-storage.mount: Failed to load configuration: No such file or directory Nov 27 11:42:48 Epyc-condor systemd[324736]: run-containers-storage-overlay\x2dcontainers.mount: Failed to load configuration: No such file or directory Nov 27 11:42:48 Epyc-condor systemd[324736]: run-containers-storage-overlay\x2dcontainers-153207f7528cdca6c69ce3a16274fae1fffc515eccb44bcb0591f8f0fe8f2345.mount: Failed to load configuration: No such file or directory Nov 27 11:42:48 Epyc-condor systemd[324736]: run-containers-storage-overlay\x2dcontainers-153207f7528cdca6c69ce3a16274fae1fffc515eccb44bcb0591f8f0fe8f2345-userdata.mount: Failed to load configuration: No such file or directory Nov 27 11:42:48 Epyc-condor systemd[324736]: run-containers-storage-overlay\x2dcontainers-153207f7528cdca6c69ce3a16274fae1fffc515eccb44bcb0591f8f0fe8f2345-userdata-shm.mount: Changed dead -> mounted Nov 27 11:42:48 Epyc-condor systemd[324736]: run.mount: Collecting. Nov 27 11:42:48 Epyc-condor systemd[324736]: run-containers.mount: Collecting. Nov 27 11:42:48 Epyc-condor systemd[324736]: run-containers-storage.mount: Collecting. Nov 27 11:42:48 Epyc-condor systemd[324736]: run-containers-storage-overlay\x2dcontainers.mount: Collecting. Nov 27 11:42:48 Epyc-condor systemd[324736]: run-containers-storage-overlay\x2dcontainers-153207f7528cdca6c69ce3a16274fae1fffc515eccb44bcb0591f8f0fe8f2345.mount: Collecting. Nov 27 11:42:48 Epyc-condor systemd[324736]: run-containers-storage-overlay\x2dcontainers-153207f7528cdca6c69ce3a16274fae1fffc515eccb44bcb0591f8f0fe8f2345-userdata.mount: Collecting. Nov 27 11:42:48 Epyc-condor systemd[324736]: run.mount: Failed to load configuration: No such file or directory Nov 27 11:42:48 Epyc-condor systemd[324736]: run-netns.mount: Failed to load configuration: No such file or directory Nov 27 11:42:48 Epyc-condor systemd[324736]: run-ipcns.mount: Failed to load configuration: No such file or directory Nov 27 11:42:48 Epyc-condor systemd[324736]: run-utsns.mount: Failed to load configuration: No such file or directory Nov 27 11:42:48 Epyc-condor systemd[324736]: run-netns-b59a509d\x2d22aa\x2d4106\x2db242\x2dfc2f4b14c9b2.mount: Changed dead -> mounted Nov 27 11:42:48 Epyc-condor systemd[324736]: run-ipcns-b59a509d\x2d22aa\x2d4106\x2db242\x2dfc2f4b14c9b2.mount: Changed dead -> mounted Nov 27 11:42:48 Epyc-condor systemd[324736]: run-utsns-b59a509d\x2d22aa\x2d4106\x2db242\x2dfc2f4b14c9b2.mount: Changed dead -> mounted Nov 27 11:42:48 Epyc-condor systemd[324736]: run-utsns.mount: Collecting. Nov 27 11:42:48 Epyc-condor systemd[324736]: run-ipcns.mount: Collecting. Nov 27 11:42:48 Epyc-condor systemd[324736]: run.mount: Collecting. Nov 27 11:42:48 Epyc-condor systemd[324736]: run-netns.mount: Collecting. Nov 27 11:42:48 Epyc-condor systemd[324736]: run-netns-b59a509d\x2d22aa\x2d4106\x2db242\x2dfc2f4b14c9b2.mount: Deactivated successfully. Nov 27 11:42:48 Epyc-condor systemd[324736]: run-netns-b59a509d\x2d22aa\x2d4106\x2db242\x2dfc2f4b14c9b2.mount: Changed mounted -> dead Nov 27 11:42:48 Epyc-condor systemd[324736]: run-ipcns-b59a509d\x2d22aa\x2d4106\x2db242\x2dfc2f4b14c9b2.mount: Deactivated successfully. Nov 27 11:42:48 Epyc-condor systemd[324736]: run-ipcns-b59a509d\x2d22aa\x2d4106\x2db242\x2dfc2f4b14c9b2.mount: Changed mounted -> dead Nov 27 11:42:48 Epyc-condor systemd[324736]: run-utsns-b59a509d\x2d22aa\x2d4106\x2db242\x2dfc2f4b14c9b2.mount: Deactivated successfully. Nov 27 11:42:48 Epyc-condor systemd[324736]: run-utsns-b59a509d\x2d22aa\x2d4106\x2db242\x2dfc2f4b14c9b2.mount: Changed mounted -> dead Nov 27 11:42:48 Epyc-condor systemd[324736]: run-utsns-b59a509d\x2d22aa\x2d4106\x2db242\x2dfc2f4b14c9b2.mount: Collecting. Nov 27 11:42:48 Epyc-condor systemd[324736]: run-ipcns-b59a509d\x2d22aa\x2d4106\x2db242\x2dfc2f4b14c9b2.mount: Collecting. Nov 27 11:42:48 Epyc-condor systemd[324736]: run-netns-b59a509d\x2d22aa\x2d4106\x2db242\x2dfc2f4b14c9b2.mount: Collecting. Nov 27 11:42:48 Epyc-condor systemd[324736]: run-containers-storage-overlay\x2dcontainers-153207f7528cdca6c69ce3a16274fae1fffc515eccb44bcb0591f8f0fe8f2345-userdata-shm.mount: Deactivated successfully. Nov 27 11:42:48 Epyc-condor systemd[324736]: run-containers-storage-overlay\x2dcontainers-153207f7528cdca6c69ce3a16274fae1fffc515eccb44bcb0591f8f0fe8f2345-userdata-shm.mount: Changed mounted -> dead Nov 27 11:42:48 Epyc-condor systemd[324736]: run-containers-storage-overlay\x2dcontainers-153207f7528cdca6c69ce3a16274fae1fffc515eccb44bcb0591f8f0fe8f2345-userdata-shm.mount: Collecting. Nov 27 11:42:49 Epyc-condor systemd[324736]: sys-subsystem-net-devices-vethe4fc543a.device: Changed dead -> plugged Nov 27 11:42:49 Epyc-condor systemd[324736]: sys-devices-virtual-net-vethe4fc543a.device: Changed dead -> plugged Nov 27 11:42:49 Epyc-condor systemd[324736]: sys-subsystem-net-devices-vethe4fc543a.device: Changed plugged -> dead Nov 27 11:42:49 Epyc-condor systemd[324736]: sys-devices-virtual-net-vethe4fc543a.device: Changed plugged -> dead Nov 27 11:42:49 Epyc-condor systemd[324736]: sys-devices-virtual-net-vethe4fc543a.device: Collecting. Nov 27 11:42:49 Epyc-condor systemd[324736]: sys-subsystem-net-devices-vethe4fc543a.device: Collecting.
/etc/kata-containers/configuration.toml:
[hypervisor.qemu] path = "/usr/bin/qemu-system-x86_64" kernel = "/usr/share/kata-containers/vmlinux.container" image = "/usr/share/kata-containers/kata-containers.img"
machine_type = "q35"
# - CPU Hotplug # - Memory Hotplug # - NVDIMM devices
enable_annotations = ["enable_iommu"]
valid_hypervisor_paths = ["/usr/bin/qemu-system-x86_64"]
kernel_params = "vsyscall=emulate"
if you are havingkernel_params = " agent.log=debug initcall_debug"
firmware = ""
firmware_volume = ""
machine_accelerators = "nosmm,nosmbus,nosata,nopit,static-prt,nofw"
machine_accelerators=""
seccompsandbox= "on,obsolete=deny,spawn=deny,resourcecontrol=deny"
#seccompsandbox="on,obsolete=deny,spawn=deny,resourcecontrol=deny"
cpu_features="pmu=off"
default_vcpus = 1
# of vCPUs supported by KVM if that number is exceeded
# of vCPUs supported by KVM if that number is exceeded
default_maxvcpus = 240
specifies that until 240 vCPUsdefault_maxvcpus = 8
the memory footprint will be small, but 8 will be the maximum number ofdefault_maxvcpus = 0
# This limitation could be a bug in qemu or in the kernel
default_bridges = 1
default_memory = 2048
#memory_slots = 10
default_maxmemory = 0
#memory_offset = 0
#enable_virtio_mem = true
disable_block_device_use = false
# - virtio-fs (default) # - virtio-9p # - virtio-fs-nydus shared_fs = "virtio-fs"
virtio_fs_daemon = "/usr/bin/virtiofsd"
valid_virtio_fs_daemon_paths = ["/usr/libexec/virtiofsd"]
virtio_fs_cache_size = 0
# ["-o", "arg1=xxx,arg2", "-o", "hello world", "--arg3=yyy"]
# Set virtiofsd log level to debug : ["-o", "log_level=debug"] or ["-d"]
virtiofsd -h
for possible options.virtio_fs_extra_args = ["--thread-pool-size=1", "-o", "announce_submounts"]
# - none # Metadata, data, and pathname lookup are not cached in guest. They are # always fetched from host and any changes are immediately pushed to host.
# - auto # Metadata and pathname lookup cache expires after a configured amount of # time (default is 1 second). Data is cached while the file is open (close # to open consistency).
# - always # Metadata, data, and pathname lookup are cached in guest and never expire. virtio_fs_cache = "auto"
block_device_driver = "virtio-scsi"
# - threads # Pthread based disk I/O.
# - native # Native Linux I/O.
# - io_uring # Linux io_uring API. This provides the fastest I/O operations on Linux, requires kernel>5.1 and # qemu >=5.0. block_device_aio = "io_uring"
#block_device_cache_set = true
#block_device_cache_direct = true
#block_device_cache_noflush = true
enable_iothreads = false
#enable_mem_prealloc = true
#enable_hugepages = true
enable_vhost_user_store = false
vhost_user_store_path = "/var/run/kata-containers/vhost-user"
#enable_iommu = true
#enable_iommu_platform = true
valid_vhost_user_store_paths = ["/var/run/kata-containers/vhost-user"]
#file_mem_backend = ""
valid_file_mem_backends = [""]
pflashes = []
enable_debug = true
#disable_nesting_checks = true
#msize_9p = 8192
confidential_guest = true
.#disable_image_nvdimm = true
#hotplug_vfio_on_root_bus = true
#pcie_root_port = 2
#disable_vhost_net = true
#entropy_source= "/dev/urandom"
valid_entropy_sources = ["/dev/urandom","/dev/random",""]
#guest_hook_path = "/usr/share/oci/hooks"
#rx_rate_limiter_max_rate = 0
#tx_rate_limiter_max_rate = 0
# Dump guest’s memory can take very long depending on the amount of guest memory # and use much disk space. #guest_memory_dump_path="/var/crash/kata"
#guest_memory_dump_paging=false
#enable_guest_swap = true
#use_legacy_serial = true
disable_selinux=false
[factory]
#enable_template = true
#template_path = "/run/vc/vm/template"
#vm_cache_number = 0
#vm_cache_endpoint = "/var/run/kata-containers/cache.sock"
[agent.kata]
enable_debug = true
# associated with the appropriate runtime parent span.
# increasing the container shutdown time slightly.
#enable_tracing = true
# - kernel_modules=["e1000e InterruptThrottleRate=3000,3000,3000 EEE=1", "i915 enable_ppgtt=0"]
# * A kernel module is specified and the modprobe command is not installed in the guest # or it fails loading the module. # * The module is not available in the guest or it doesn't met the guest kernel # requirements, like architecture and version.
kernel_modules=[]
#debug_console_enabled = true
#dial_timeout = 30
[runtime]
enable_debug = true
# - macvtap # Used when the Container network interface can be bridged using # macvtap.
# - none # Used when customize network. Only creates a tap device. No veth pair.
# - tcfilter # Uses tc filter rules to redirect traffic from the network interface # provided by plugin to a tap interface connected to the VM.
internetworking_model="tcfilter"
disable_guest_seccomp=false
#enable_tracing = true
#jaeger_endpoint = ""
#jaeger_user = ""
#jaeger_password = ""
disable_new_netns
conflicts with internetworking_model=tcfilter
and internetworking_model=macvtap
. It works onlyinternetworking_model=none
. The tap device will be in the host network namespace and can connect to a bridge#disable_new_netns = true
sandbox_cgroup_only=false
# does not yet support sandbox sizing annotations.
static_sandbox_resource_mgmt=false
/run/kata-containers/shared/containers/sandbox-mounts
sandbox_bind_mounts=[]
# - vfio # Matches behaviour of OCI runtimes (e.g. runc) as much as # possible. VFIO devices will appear in the container as VFIO # character devices under /dev/vfio. The exact names may differ # from the host (they need to match the VM's IOMMU group numbers # rather than the host's)
# - guest-kernel # This is a Kata-specific behaviour that's useful in certain cases. # The VFIO device is managed by whatever driver in the VM kernel # claims it. This means it will appear as one or more device nodes # or network interfaces depending on the nature of the device. # Using this mode requires specially built workloads that know how # to locate the relevant device interfaces within the VM.
vfio_mode="guest-kernel"
disable_guest_empty_dir=false
experimental=[]
[image]
#service_offload = true
#provision=data:///local/key/file
#provision=file:///path/to/bin/fetcher/in/guest
#provision=https://my-key-broker.foo/tenant/
这是容器日志: $ sudo journalctl -xe -t containerd 然后得到了下面这些:
Nov 27 11:37:19 Epyc-condor containerd[3958910]: time="2022-11-27T11:37:19.386022105+01:00" level=debug msg="removed snapshot" key=default/38/hello snapshotter=overlayfs Nov 27 11:37:19 Epyc-condor containerd[3958910]: time="2022-11-27T11:37:19.386252281+01:00" level=debug msg="snapshot garbage collected" d=2.159584ms snapshotter=overlayfs Nov 27 11:37:19 Epyc-condor containerd[3958910]: time="2022-11-27T11:37:19.386271561+01:00" level=debug msg="garbage collected" d=2.049551ms Nov 27 11:41:33 Epyc-condor containerd[3958910]: time="2022-11-27T11:41:33.752608985+01:00" level=debug msg="stat snapshot" key="sha256:40cf597a9181e86497f4121c604f9f0ab208950a98ca21db883f26b0a548a2eb" Nov 27 11:41:33 Epyc-condor containerd[3958910]: time="2022-11-27T11:41:33.772114713+01:00" level=debug msg="prepare snapshot" key=hello parent="sha256:40cf597a9181e86497f4121c604f9f0ab208950a98ca21db883f26b0a548a2eb" Nov 27 11:41:33 Epyc-condor containerd[3958910]: time="2022-11-27T11:41:33.777016286+01:00" level=debug msg="event published" ns=default topic=/snapshot/prepare type=containerd.events.SnapshotPrepare Nov 27 11:41:33 Epyc-condor containerd[3958910]: time="2022-11-27T11:41:33.780666537+01:00" level=debug msg="get snapshot mounts" key=hello Nov 27 11:41:33 Epyc-condor containerd[3958910]: time="2022-11-27T11:41:33.800455671+01:00" level=debug msg="event published" ns=default topic=/containers/create type=containerd.events.ContainerCreate Nov 27 11:41:33 Epyc-condor containerd[3958910]: time="2022-11-27T11:41:33.803254761+01:00" level=debug msg="get snapshot mounts" key=hello Nov 27 11:41:33 Epyc-condor containerd[3958910]: time="2022-11-27T11:41:33.823704423+01:00" level=error msg="copy shim log" error="reading from a closed fifo" Nov 27 11:41:33 Epyc-condor containerd[3958910]: time="2022-11-27T11:41:33.824785970+01:00" level=debug msg="remove snapshot" key=hello Nov 27 11:41:33 Epyc-condor containerd[3958910]: time="2022-11-27T11:41:33.826851982+01:00" level=debug msg="event published" ns=default topic=/snapshot/remove type=containerd.events.SnapshotRemove Nov 27 11:41:33 Epyc-condor containerd[3958910]: time="2022-11-27T11:41:33.829030276+01:00" level=debug msg="event published" ns=default topic=/containers/delete type=containerd.events.ContainerDelete Nov 27 11:41:33 Epyc-condor containerd[3958910]: time="2022-11-27T11:41:33.883283133+01:00" level=debug msg="schedule snapshotter cleanup" snapshotter=overlayfs Nov 27 11:41:33 Epyc-condor containerd[3958910]: time="2022-11-27T11:41:33.885191070+01:00" level=debug msg="removed snapshot" key=default/39/hello snapshotter=overlayfs Nov 27 11:41:33 Epyc-condor containerd[3958910]: time="2022-11-27T11:41:33.885446547+01:00" level=debug msg="snapshot garbage collected" d=2.125703ms snapshotter=overlayfs Nov 27 11:41:33 Epyc-condor containerd[3958910]: time="2022-11-27T11:41:33.885466677+01:00" level=debug msg="garbage collected" d=2.102232ms Nov 27 11:42:41 Epyc-condor containerd[3958910]: time="2022-11-27T11:42:41.012030209+01:00" level=debug msg="stat snapshot" key="sha256:40cf597a9181e86497f4121c604f9f0ab208950a98ca21db883f26b0a548a2eb" Nov 27 11:42:41 Epyc-condor containerd[3958910]: time="2022-11-27T11:42:41.029897337+01:00" level=debug msg="prepare snapshot" key=hello parent="sha256:40cf597a9181e86497f4121c604f9f0ab208950a98ca21db883f26b0a548a2eb" Nov 27 11:42:41 Epyc-condor containerd[3958910]: time="2022-11-27T11:42:41.034329977+01:00" level=debug msg="event published" ns=default topic=/snapshot/prepare type=containerd.events.SnapshotPrepare Nov 27 11:42:41 Epyc-condor containerd[3958910]: time="2022-11-27T11:42:41.039313962+01:00" level=debug msg="get snapshot mounts" key=hello Nov 27 11:42:41 Epyc-condor containerd[3958910]: time="2022-11-27T11:42:41.058789059+01:00" level=debug msg="event published" ns=default topic=/containers/create type=containerd.events.ContainerCreate Nov 27 11:42:41 Epyc-condor containerd[3958910]: time="2022-11-27T11:42:41.061611229+01:00" level=debug msg="get Nov 27 11:37:19 Epyc-condor containerd[3958910]: time="2022-11-27T11:37:19.386022105+01:00" level=debug msg="re> Nov 27 11:37:19 Epyc-condor containerd[3958910]: time="2022-11-27T11:37:19.386252281+01:00" level=debug msg="sn> Nov 27 11:37:19 Epyc-condor containerd[3958910]: time="2022-11-27T11:37:19.386271561+01:00" level=debug msg="ga> Nov 27 11:41:33 Epyc-condor containerd[3958910]: time="2022-11-27T11:41:33.752608985+01:00" level=debug msg="st> Nov 27 11:41:33 Epyc-condor containerd[3958910]: time="2022-11-27T11:41:33.772114713+01:00" level=debug msg="pr> Nov 27 11:41:33 Epyc-condor containerd[3958910]: time="2022-11-27T11:41:33.777016286+01:00" level=debug msg="ev> Nov 27 11:41:33 Epyc-condor containerd[3958910]: time="2022-11-27T11:41:33.780666537+01:00" level=debug msg="ge> Nov 27 11:41:33 Epyc-condor containerd[3958910]: time="2022-11-27T11:41:33.800455671+01:00" level=debug msg="ev> Nov 27 11:41:33 Epyc-condor containerd[3958910]: time="2022-11-27T11:41:33.803254761+01:00" level=debug msg="ge> Nov 27 11:41:33 Epyc-condor containerd[3958910]: time="2022-11-27T11:41:33.823704423+01:00" level=error msg="co> Nov 27 11:41:33 Epyc-condor containerd[3958910]: time="2022-11-27T11:41:33.824785970+01:00" level=debug msg="re> Nov 27 11:41:33 Epyc-condor containerd[3958910]: time="2022-11-27T11:41:33.826851982+01:00" level=debug msg="ev> Nov 27 11:41:33 Epyc-condor containerd[3958910]: time="2022-11-27T11:41:33.829030276+01:00" level=debug msg="ev> Nov 27 11:41:33 Epyc-condor containerd[3958910]: time="2022-11-27T11:41:33.883283133+01:00" level=debug msg="sc> Nov 27 11:41:33 Epyc-condor containerd[3958910]: time="2022-11-27T11:41:33.885191070+01:00" level=debug msg="re> Nov 27 11:41:33 Epyc-condor containerd[3958910]: time="2022-11-27T11:41:33.885446547+01:00" level=debug msg="sn> Nov 27 11:41:33 Epyc-condor containerd[3958910]: time="2022-11-27T11:41:33.885466677+01:00" level=debug msg="ga> Nov 27 11:42:41 Epyc-condor containerd[3958910]: time="2022-11-27T11:42:41.012030209+01:00" level=debug msg="st> Nov 27 11:42:41 Epyc-condor containerd[3958910]: time="2022-11-27T11:42:41.029897337+01:00" level=debug msg="pr> Nov 27 11:42:41 Epyc-condor containerd[3958910]: time="2022-11-27T11:42:41.034329977+01:00" level=debug msg="ev> Nov 27 11:42:41 Epyc-condor containerd[3958910]: time="2022-11-27T11:42:41.039313962+01:00" level=debug msg="ge> Nov 27 11:42:41 Epyc-condor containerd[3958910]: time="2022-11-27T11:42:41.058789059+01:00" level=debug msg="ev> Nov 27 11:42:41 Epyc-condor containerd[3958910]: time="2022-11-27T11:42:41.061611229+01:00" level=debug Nov 27 11:37:19 Epyc-condor containerd[3958910]: time="2022-11-27T11:37:19.386022105+01:00" level=debug msg="removed snapshot" key=default/38/hello snapshotter=overlayfs Nov 27 11:37:19 Epyc-condor containerd[3958910]: time="2022-11-27T11:37:19.386252281+01:00" level=debug msg="snapshot garbage collected" d=2.159584ms snapshotter=overlayfs Nov 27 11:37:19 Epyc-condor containerd[3958910]: time="2022-11-27T11:37:19.386271561+01:00" level=debug msg="garbage collected" d=2.049551ms Nov 27 11:41:33 Epyc-condor containerd[3958910]: time="2022-11-27T11:41:33.752608985+01:00" level=debug msg="stat snapshot" key="sha256:40cf597a9181e86497f4121c604f9f0ab208950a98ca21db883f26b0a548a2eb" Nov 27 11:41:33 Epyc-condor containerd[3958910]: time="2022-11-27T11:41:33.772114713+01:00" level=debug msg="prepare snapshot" key=hello parent="sha256:40cf597a9181e86497f4121c604f9f0ab208950a98ca21db883f26b0a548a2eb" Nov 27 11:41:33 Epyc-condor containerd[3958910]: time="2022-11-27T11:41:33.777016286+01:00" level=debug msg="event published" ns=default topic=/snapshot/prepare type=containerd.events.SnapshotPrepare Nov 27 11:41:33 Epyc-condor containerd[3958910]: time="2022-11-27T11:41:33.780666537+01:00" level=debug msg="get snapshot mounts" key=hello Nov 27 11:41:33 Epyc-condor containerd[3958910]: time="2022-11-27T11:41:33.800455671+01:00" level=debug msg="event published" ns=default topic=/containers/create type=containerd.events.ContainerCreate Nov 27 11:41:33 Epyc-condor containerd[3958910]: time="2022-11-27T11:41:33.803254761+01:00" level=debug msg="get snapshot mounts" key=hello Nov 27 11:41:33 Epyc-condor containerd[3958910]: time="2022-11-27T11:41:33.823704423+01:00" level=error msg="copy shim log" error="reading from a closed fifo" Nov 27 11:41:33 Epyc-condor containerd[3958910]: time="2022-11-27T11:41:33.824785970+01:00" level=debug msg="remove snapshot" key=hello Nov 27 11:41:33 Epyc-condor containerd[3958910]: time="2022-11-27T11:41:33.826851982+01:00" level=debug msg="event published" ns=default topic=/snapshot/remove type=containerd.events.SnapshotRemove Nov 27 11:41:33 Epyc-condor containerd[3958910]: time="2022-11-27T11:41:33.829030276+01:00" level=debug msg="event published" ns=default topic=/containers/delete type=containerd.events.ContainerDelete Nov 27 11:41:33 Epyc-condor containerd[3958910]: time="2022-11-27T11:41:33.883283133+01:00" level=debug msg="schedule snapshotter cleanup" snapshotter=overlayfs Nov 27 11:41:33 Epyc-condor containerd[3958910]: time="2022-11-27T11:41:33.885191070+01:00" level=debug msg="removed snapshot" key=default/39/hello snapshotter=overlayfs Nov 27 11:41:33 Epyc-condor containerd[3958910]: time="2022-11-27T11:41:33.885446547+01:00" level=debug msg="snapshot garbage collected" d=2.125703ms snapshotter=overlayfs Nov 27 11:41:33 Epyc-condor containerd[3958910]: time="2022-11-27T11:41:33.885466677+01:00" level=debug msg="garbage collected" d=2.102232ms Nov 27 11:42:41 Epyc-condor containerd[3958910]: time="2022-11-27T11:42:41.012030209+01:00" level=debug msg="stat snapshot" key="sha256:40cf597a9181e86497f4121c604f9f0ab208950a98ca21db883f26b0a548a2eb" Nov 27 11:42:41 Epyc-condor containerd[3958910]: time="2022-11-27T11:42:41.029897337+01:00" level=debug msg="prepare snapshot" key=hello parent="sha256:40cf597a9181e86497f4121c604f9f0ab208950a98ca21db883f26b0a548a2eb" Nov 27 11:42:41 Epyc-condor containerd[3958910]: time="2022-11-27T11:42:41.034329977+01:00" level=debug msg="event published" ns=default topic=/snapshot/prepare type=containerd.events.SnapshotPrepare Nov 27 11:42:41 Epyc-condor containerd[3958910]: time="2022-11-27T11:42:41.039313962+01:00" level=debug msg="get snapshot mounts" key=hello Nov 27 11:42:41 Epyc-condor containerd[3958910]: time="2022-11-27T11:42:41.058789059+01:00" level=debug msg="event published" ns=default topic=/containers/create type=containerd.events.ContainerCreate Nov 27 11:42:41 Epyc-condor containerd[3958910]: time="2022-11-27T11:42:41.061611229+01:00" level=debug msg="get Nov 27 11:37:19 Epyc-condor containerd[3958910]: time="2022-11-27T11:37:19.386022105+01:00" level=debug msg="removed snapshot" key=default/38/hello snapshotter=overlayfs Nov 27 11:37:19 Epyc-condor containerd[3958910]: time="2022-11-27T11:37:19.386252281+01:00" level=debug msg="snapshot garbage collected" d=2.159584ms snapshotter=overlayfs Nov 27 11:37:19 Epyc-condor containerd[3958910]: time="2022-11-27T11:37:19.386271561+01:00" level=debug msg="garbage collected" d=2.049551ms Nov 27 11:41:33 Epyc-condor containerd[3958910]: time="2022-11-27T11:41:33.752608985+01:00" level=debug msg="stat snapshot" key="sha256:40cf597a9181e86497f4121c604f9f0ab208950a98ca21db883f26b0a548a2eb" Nov 27 11:41:33 Epyc-condor containerd[3958910]: time="2022-11-27T11:41:33.772114713+01:00" level=debug msg="prepare snapshot" key=hello parent="sha256:40cf597a9181e86497f4121c604f9f0ab208950a98ca21db883f26b0a548a2eb" Nov 27 11:41:33 Epyc-condor containerd[3958910]: time="2022-11-27T11:41:33.777016286+01:00" level=debug msg="event published" ns=default topic=/snapshot/prepare type=containerd.events.SnapshotPrepare Nov 27 11:41:33 Epyc-condor containerd[3958910]: time="2022-11-27T11:41:33.780666537+01:00" level=debug msg="get snapshot mounts" key=hello Nov 27 11:41:33 Epyc-condor containerd[3958910]: time="2022-11-27T11:41:33.800455671+01:00" level=debug msg="event published" ns=default topic=/containers/create type=containerd.events.ContainerCreate Nov 27 11:41:33 Epyc-condor containerd[3958910]: time="2022-11-27T11:41:33.803254761+01:00" level=debug msg="get snapshot mounts" key=hello Nov 27 11:41:33 Epyc-condor containerd[3958910]: time="2022-11-27T11:41:33.823704423+01:00" level=error msg="copy shim log" error="reading from a closed fifo" Nov 27 11:41:33 Epyc-condor containerd[3958910]: time="2022-11-27T11:41:33.824785970+01:00" level=debug msg="remove snapshot" key=hello Nov 27 11:41:33 Epyc-condor containerd[3958910]: time="2022-11-27T11:41:33.826851982+01:00" level=debug msg="event published" ns=default topic=/snapshot/remove type=containerd.events.SnapshotRemove Nov 27 11:41:33 Epyc-condor containerd[3958910]: time="2022-11-27T11:41:33.829030276+01:00" level=debug msg="event published" ns=default topic=/containers/delete type=containerd.events.ContainerDelete Nov 27 11:41:33 Epyc-condor containerd[3958910]: time="2022-11-27T11:41:33.883283133+01:00" level=debug msg="schedule snapshotter cleanup" snapshotter=overlayfs Nov 27 11:41:33 Epyc-condor containerd[3958910]: time="2022-11-27T11:41:33.885191070+01:00" level=debug msg="removed snapshot" key=default/39/hello snapshotter=overlayfs Nov 27 11:41:33 Epyc-condor containerd[3958910]: time="2022-11-27T11:41:33.885446547+01:00" level=debug msg="snapshot garbage collected" d=2.125703ms snapshotter=overlayfs Nov 27 11:41:33 Epyc-condor containerd[3958910]: time="2022-11-27T11:41:33.885466677+01:00" level=debug msg="garbage collected" d=2.102232ms Nov 27 11:42:41 Epyc-condor containerd[3958910]: time="2022-11-27T11:42:41.012030209+01:00" level=debug msg="stat snapshot" key="sha256:40cf597a9181e86497f4121c604f9f0ab208950a98ca21db883f26b0a548a2eb" Nov 27 11:42:41 Epyc-condor containerd[3958910]: time="2022-11-27T11:42:41.029897337+01:00" level=debug msg="prepare snapshot" key=hello parent="sha256:40cf597a9181e86497f4121c604f9f0ab208950a98ca21db883f26b0a548a2eb" Nov 27 11:42:41 Epyc-condor containerd[3958910]: time="2022-11-27T11:42:41.034329977+01:00" level=debug msg="event published" ns=default topic=/snapshot/prepare type=containerd.events.SnapshotPrepare Nov 27 11:42:41 Epyc-condor containerd[3958910]: time="2022-11-27T11:42:41.039313962+01:00" level=debug msg="get snapshot mounts" key=hello Nov 27 11:42:41 Epyc-condor containerd[3958910]: time="2022-11-27T11:42:41.058789059+01:00" level=debug msg="event published" ns=default topic=/containers/create type=containerd.events.ContainerCreate Nov 27 11:42:41 Epyc-condor containerd[3958910]: time="2022-11-27T11:42:41.061611229+01:00" level=debug msg="get snapshot mounts" key=hello Nov 27 11:42:41 Epyc-condor containerd[3958910]: time="2022-11-27T11:42:41.078311366+01:00" level=error msg="copy shim log" error="reading from a closed fifo" Nov 27 11:42:41 Epyc-condor containerd[3958910]: time="2022-11-27T11:42:41.079392814+01:00" level=debug msg="remove snapshot" key=hello Nov 27 11:42:41 Epyc-condor containerd[3958910]: time="2022-11-27T11:42:41.081360543+01:00" level=debug msg="event published" ns=default topic=/snapshot/remove type=containerd.events.SnapshotRemove Nov 27 11:42:41 Epyc-condor containerd[3958910]: time="2022-11-27T11:42:41.086517372+01:00" level=debug msg="event published" ns=default topic=/containers/delete type=containerd.events.ContainerDelete Nov 27 11:42:41 Epyc-condor containerd[3958910]: time="2022-11-27T11:42:41.170713057+01:00" level=debug msg="schedule snapshotter cleanup" snapshotter=overlayfs Nov 27 11:42:41 Epyc-condor containerd[3958910]: time="2022-11-27T11:42:41.172722757+01:00" level=debug msg="removed snapshot" key=default/40/hello snapshotter=overlayfs Nov 27 11:42:41 Epyc-condor containerd[3958910]: time="2022-11-27T11:42:41.172953733+01:00" level=debug msg="snapshot garbage collected" d=2.212885ms snapshotter=overlayfs Nov 27 11:42:41 Epyc-condor containerd[3958910]: time="2022-11-27T11:42:41.172974453+01:00" level=debug msg="garbage collected" d=1.943199ms Nov 27 11:55:08 Epyc-condor containerd[3958910]: time="2022-11-27T11:55:08.607562751+01:00" level=debug msg="stat snapshot" key="sha256:40cf597a9181e86497f4121c604f9f0ab208950a98ca21db883f26b0a548a2eb" Nov 27 11:55:08 Epyc-condor containerd[3958910]: time="2022-11-27T11:55:08.626513345+01:00" level=debug msg="prepare snapshot" key=hello parent="sha256:40cf597a9181e86497f4121c604f9f0ab208950a98ca21db883f26b0a548a2eb" Nov 27 11:55:08 Epyc-condor containerd[3958910]: time="2022-11-27T11:55:08.630988227+01:00" level=debug msg="event published" ns=default topic=/snapshot/prepare type=containerd.events.SnapshotPrepare Nov 27 11:55:08 Epyc-condor containerd[3958910]: time="2022-11-27T11:55:08.635402797+01:00" level=debug msg="get snapshot mounts" key=hello Nov 27 11:55:08 Epyc-condor containerd[3958910]: time="2022-11-27T11:55:08.646910084+01:00" level=debug msg="event published" ns=default topic=/containers/create type=containerd.events.ContainerCreate Nov 27 11:55:08 Epyc-condor containerd[3958910]: time="2022-11-27T11:55:08.649614422+01:00" level=debug msg="get snapshot mounts" key=hello Nov 27 11:55:08 Epyc-condor containerd[3958910]: time="2022-11-27T11:55:08.667079478+01:00" level=error msg="copy shim log" error="reading from a closed fifo" Nov 27 11:55:08 Epyc-condor containerd[3958910]: time="2022-11-27T11:55:08.668022012+01:00" level=debug msg="remove snapshot" key=hello Nov 27 11:55:08 Epyc-condor containerd[3958910]: time="2022-11-27T11:55:08.670075893+01:00" level=debug msg="event published" ns=default topic=/snapshot/remove type=containerd.events.SnapshotRemove Nov 27 11:55:08 Epyc-condor containerd[3958910]: time="2022-11-27T11:55:08.672154775+01:00" level=debug msg="event published" ns=default topic=/containers/delete type=containerd.events.ContainerDelete Nov 27 11:55:08 Epyc-condor containerd[3958910]: time="2022-11-27T11:55:08.739818316+01:00" level=debug msg="schedule snapshotter cleanup" snapshotter=overlayfs Nov 27 11:55:08 Epyc-condor containerd[3958910]: time="2022-11-27T11:55:08.741725053+01:00" level=debug msg="removed snapshot" key=default/41/hello snapshotter=overlayfs Nov 27 11:55:08 Epyc-condor containerd[3958910]: time="2022-11-27T11:55:08.741987830+01:00" level=debug msg="snapshot garbage collected" d=2.129043ms snapshotter=overlayfs Nov 27 11:55:08 Epyc-condor containerd[3958910]: time="2022-11-27T11:55:08.742010781+01:00" level=debug msg="garbage collected" d=2.799329ms
不知道是什么导致的报错。
原提问者GitHub用户immersommer 如对项目有进一步反馈,请在 GitHub 提交 issue https://github.com/kata-containers/kata-containers/issues
从错误消息中可以看出,你试图使用 Kata-Containers 运行一个 Docker 容器,但是遇到了连接问题。这可能是由于以下原因导致的:
未正确安装 Kata-Containers 插件:你需要安装 containerd 的 Kata-Containers 插件,可以使用以下命令进行安装:
sudo ctr plugin install -t containerd.runtime.v2.kata-containers.io/v1 插件未正确配置:请确保你已经正确配置了 Kata-Containers 插件,并正确设置了相关环境变量。
容器d运行时未正确安装:请确保你已经正确安装了 Kata-Containers 运行时,可以使用以下命令进行安装:
sudo apt-get installkata-containers-runtime 容器镜像未正确安装:请确保你已经正确安装了 Docker,并能够下载所需的容器镜像。你可以使用以下命令下载 Busybox 镜像:
sudo docker pull docker.io/library/busybox:latest 如果以上步骤都正确执行了,但问题仍然存在,请检查 containerd 和 Kata-Containers 的日志文件以获取更多信息。你可以使用以下命令查看 containerd 日志:
sudo journalctl -u containerd.service 使用以下命令查看 Kata-Containers 日志:
sudo journalctl -u containerd-shim.service
你在用旧的Kata吗?错误应该只发生在2.2.0之前的kata中,此参数自3165095以来已更改。
原回答者GitHub用户liubin 如对项目有进一步反馈,请在 GitHub 提交 issue https://github.com/kata-containers/kata-containers/issues
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。