zoukankan      html  css  js  c++  java
  • kata-runtime来运行容器

    # 准备一个busybox镜像
    # 构造rootfs
    mkdir rootfs
    docker export $(docker create busybox) | tar -xf - -C rootfs
    # 构造config.json
    runc spec
    # 使用kata-runtime来运行荣齐全
    kata-runtime run busybox

    root@ubuntu:/home/ubuntu# ps -elf | grep kata
    4 S root      4717  1212  0  80   0 - 439389 wait  11:12 pts/0    00:00:00 kata-runtime run mycontainer
    7 S root      4741     1  4  80   0 - 763408 sys_po 11:12 ?       00:00:01 /usr/share/kata-containers/binary/qemu-system-aarch64 -name sandbox-mycontainer -uuid 5e486212-9bf8-499b-bd49-9965ca6b3108 -machine virt,usb=off,accel=kvm,gic-version=host,nvdimm -cpu host,pmu=off -qmp unix:/run/vc/vm/mycontainer/qmp.sock,server,nowait -m 2048M,slots=10,maxmem=257176M -device pcie-pci-bridge,bus=pcie.0,id=pcie-bridge-0,addr=2,romfile= -device virtio-serial-pci,disable-modern=false,id=serial0,romfile= -device virtconsole,chardev=charconsole0,id=console0 -chardev socket,id=charconsole0,path=/run/vc/vm/mycontainer/console.sock,server,nowait -device nvdimm,id=nv0,memdev=mem0 -object memory-backend-file,id=mem0,mem-path=/usr/share/kata-containers/binary/kata-containers.img,size=184549376 -device virtio-scsi-pci,id=scsi0,disable-modern=false,romfile= -object rng-random,id=rng0,filename=/dev/urandom -device virtio-rng-pci,rng=rng0,romfile= -device virtserialport,chardev=charch0,id=channel0,name=agent.channel.0 -chardev socket,id=charch0,path=/run/vc/vm/mycontainer/kata.sock,server,nowait -device virtio-9p-pci,disable-modern=false,fsdev=extra-9p-kataShared,mount_tag=kataShared,romfile= -fsdev local,id=extra-9p-kataShared,path=/run/kata-containers/shared/sandboxes/mycontainer/shared,security_model=none -rtc base=utc,driftfix=slew,clock=host -global kvm-pit.lost_tick_policy=discard -vga none -no-user-config -nodefaults -nographic --no-reboot -daemonize -kernel /usr/share/kata-containers/binary/vmlinuz-5.4.34-88 -append console=hvc0 console=hvc1 iommu.passthrough=0 root=/dev/pmem0p1 rootflags=dax,data=ordered,errors=remount-ro ro rootfstype=ext4 debug systemd.show_status=true systemd.log_level=debug panic=1 nr_cpus=64 agent.use_vsock=false systemd.unit=kata-containers.target systemd.mask=systemd-networkd.service systemd.mask=systemd-networkd.socket scsi_mod.scan=none agent.log=debug agent.log=debug -pidfile /run/vc/vm/mycontainer/pid -D /run/vc/vm/mycontainer/qemu.log -smp 1,cores=1,threads=1,sockets=64,maxcpus=64
    0 S root      4748  4717  0  80   0 - 324652 futex_ 11:12 ?       00:00:00 /usr/libexec/kata-containers/kata-proxy -listen-socket unix:///run/vc/sbs/mycontainer/proxy.sock -mux-socket /run/vc/vm/mycontainer/kata.sock -sandbox mycontainer -log debug -agent-logs-socket /run/vc/vm/mycontainer/console.sock
    0 S root      4763  4717  0  80   0 - 345796 futex_ 11:13 pts/0   00:00:00 /usr/libexec/kata-containers/kata-shim -agent unix:///run/vc/sbs/mycontainer/proxy.sock -container mycontainer -exec-id mycontainer -terminal -log debug
    0 S root      4782  1876  0  80   0 -  1097 pipe_w 11:13 pts/2    00:00:00 grep --color=auto kata
    root@ubuntu:/home/ubuntu# 

  • 相关阅读:
    [DB] 数据库的连接
    JS leetcode 翻转字符串里的单词 题解分析
    JS leetcode 拥有最多糖果的孩子 题解分析,六一快乐。
    JS leetcode 搜索插入位置 题解分析
    JS leetcode 杨辉三角Ⅱ 题解分析
    JS leetcode 寻找数组的中心索引 题解分析
    JS leetcode 移除元素 题解分析
    JS leetcode 最大连续1的个数 题解分析
    JS leetcode 两数之和 II
    JS leetcode 反转字符串 题解分析
  • 原文地址:https://www.cnblogs.com/dream397/p/13791456.html
Copyright © 2011-2022 走看看