Show HN: krunvm – Create and run lightweight VMs from OCI images
1–9 of 9 posts
Re: Show HN: krunvm – Create and run lightweight VMs from OCI images
#2Re: Show HN: krunvm – Create and run lightweight VMs from OCI images
#3Why only TCP is available? Network stack needs to be implemented?
Re: Show HN: krunvm – Create and run lightweight VMs from OCI images
#4This is awesome. How does this compare with Firecracker - https://github.com/firecracker-microvm/firecracker Why only TCP is available? Network stack needs to be implemented?
https://github.com/containers/libkrunfw
Firecracker is using rust-vmm:
Re: Show HN: krunvm – Create and run lightweight VMs from OCI images
#5This is awesome. How does this compare with Firecracker - https://github.com/firecracker-microvm/firecracker Why only TCP is available? Network stack needs to be implemented?
In fact, the networking limitations are caused by this use of virtio-vsock+TSI. TSI (WIP implementation here: https://github.com/containers/libkrunfw/blob/main/patches/00...) is an experimental mechanism that provides inbound and outbound networking capabilities to the guest, with zero-configuration and minimal footprint, by transparently replacing user-space AF_INET sockets with AF_TSI, that have both an AF_INET and AF_VSOCK personality.
TSI has the additional advantage that, for the host side, all connections appear to come and go to the process acting as a VMM (in this case, krunvm, as it links directly with libkrun), which makes it very container-friendly in a way that even side-cars (such as Istio) work out-of-the-box.
Re: Show HN: krunvm – Create and run lightweight VMs from OCI images
#6I’m honestly just curious how they managed to get a KVM based solution working on MacOS ARM64. Buildah and few other dependencies appeared to be Linux only... but the brew install worked..
As for buildah, the Homebrew repo contains a build that includes this PR (https://github.com/containers/storage/pull/811).
Re: Show HN: krunvm – Create and run lightweight VMs from OCI images
#7How does the resource usage compare?
I have to tell Docker for Mac how much RAM to allocate, and that's then shared between the containers. Can krunvm use as much RAM as the container needs, or does it also need some pre-allocation?
Re: Show HN: krunvm – Create and run lightweight VMs from OCI images
#8How would this compare for current users of Docker for Mac? If I use Docker for Mac to run two containers, I get one VM that runs two containers, right? And if I use this, then I get two VMs, one per container? How does the resource usage compare? I have to tell Docker for Mac how much RAM to allocate, and that's then shared between the containers. Can krunvm use as much RAM as the container needs, or does it also ne…
With krunvm, each session initiated with "krunvm start" is an independent lightweight VM. The maximum amount of RAM the VM can use is configured with the "mem" flag (or it uses what's configured by default), but the VMM will always try to use the minimum possible amount of RAM by returning the pages the guest is no longer using to the host (virtio-balloon's free page reporting feature).
That said, you can also start a single VM (using "krunvm start"), run podman's service ("podman system service...") inside it, switch to another terminal in macOS and execute multiple containers inside the VM using "podman remote" [1]. Now I'm thinking I should probably write a tutorial about this option ;-)
[1] https://www.redhat.com/sysadmin/podman-clients-macos-windows
Re: Show HN: krunvm – Create and run lightweight VMs from OCI images
#9This is awesome. How does this compare with Firecracker - https://github.com/firecracker-microvm/firecracker Why only TCP is available? Network stack needs to be implemented?
> To not trade off our core use case simplifying assumptions, we'll need something like a way to build different Firecracker "specialized variants" or alternatively a plugin system. This is something worth discussing for 2021. Again this is not a guarantee, but virtio-fs could fit in such a scheme, especially if it's a rust-vmm crate we can easily import over.
[1]: https://github.com/firecracker-microvm/firecracker/pull/1351...