V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
wniming
V2EX  ›  程序员

如何使用 kata containers + firecracker 作为运行时来运行 docker?

  •  
  •   wniming · 19 天前 · 377 次点击

    我根据 docker 官方文档 https://docs.docker.com/engine/alternative-runtimes/ 中的命令在 fedora 39 系统上运行 hello world 结果报错,而且用这个命令就算跑起来也不一定是用 firecracker 。

    root@fedora-server:~# docker run --runtime io.containerd.kata.v2 hello-world
    docker: Error response from daemon: failed to create task for container: failed to create shim task: exit status 1: stdout: , stderr: failed to add interface veth08b1d98 to sandbox: error setting interface "veth08b1d98" IP to 172.17.0.2/16: cannot program address 172.17.0.2/16 in sandbox interface because it conflicts with existing route {Ifindex: 3 Dst: 172.17.0.0/16 Src: 172.17.0.1 Gw: <nil> Flags: [] Table: 254 Realm: 0}
    : unknown.
    ERRO[0000] error waiting for container:                 
    root@fedora-server:~# 
    
    

    我做这件事的目的就是想把 firecracker 跑起来,想研究一下 firecracker ,但 firecracker 的官方文档没有讲如何单独把这个跑起来,我猜测是要用 kata containers 来运行 firecracker ,但是 kata containers 的官方文档也没有讲如何单独把 kata containers 跑起来,我猜测应该是要用 docker 才能把 kata containers 跑起来。。。

    希望有熟悉 firecracker 和 kata containers 的老哥指点一下,在此先行感谢!

    另外,点进来这个帖子的 v 友们能否给我的这个主题发送一下感谢,我铜币发完这个帖子就没了。。。

    2 条回复
    wniming
        1
    wniming  
    OP
       19 天前
    刚刚发现 firecracker 是有文档讲如何单独运行 firecracker 的:

    https://github.com/firecracker-microvm/firecracker/blob/main/docs/getting-started.md

    不过 fedora39 上运行 docker run --runtime io.containerd.kata.v2 hello-world 这个报错还是不知道啥原因,如果有懂的老哥可以帮忙看一下。
    wniming
        2
    wniming  
    OP
       19 天前
    跑起来了,firecracker 让我第一次见识到 x86 平台的 linux 的网络设备和块设备可以是 platform 设备而不是 pci 设备的,跟我预想的一样。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2512 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 22ms · UTC 11:32 · PVG 19:32 · LAX 04:32 · JFK 07:32
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.