1. 18
  1.  

  2. 1

    This tool looks really cool, I just really wish the code had comments.

    1. 1

      There’s definitely some tech debt I should really pay off. TBH, I wanted to get feedback on the concept as soon as possible, because I wasn’t sure if people would find this useful.

      1. 1

        Definitely make sense, I’m currently trying to hack it into running on my Intel-based Macbook, sorry if I off-gassed any of that on you. Looking forward to using this tool :)

        1. 2

          Having support for Hypervisor.framework on x86_64 would be great! It’s no easy feat, thought. While KVM provides (mostly) the same API for all arches, Hypervisor.framework (being a thin layer on top of the processor’s virtualization capabilities) does not. It doesn’t provide support for arch devices (such as LAPIC or Timer), so that needs to be implemented in userspace too. Also, while on ARM64 we can get away without emulating any instruction, on x86_64 we would probably need a minimal translator for processing some of the exists.

          But I don’t want to discourage you, I honestly think this could be a fun and rewarding project with lots of learning opportunities.

    2. 1

      VMs created from OCI images

      In my head OCI images are synonimus with Linux containers. Is krunvm working with some other type of OCI image suited to VMs? Or is the point that krunvm can run regular containers in VMs?

      1. 2

        While we’re all used to work with disk images when using a VM, there’s actually nothing stopping you from using a conventional OCI image, the same one you would use for running a container, as rootfs in a VM.

        This gives you a huge catalog of images to choose from, with zero storage management overhead (no need for format conversion, space allocation, nor dealing with partitions or filesystems).

        1. 1

          there’s actually nothing stopping you from using a conventional OCI image, the same one you would use for running a container, as rootfs in a VM.

          Is this also true for distroless, scratch, … images?

          1. 1

            Yes. The kernel is bundled in libkrunfw, so as long the directory to be used as rootfs contains one or more Linux binaries (and a couple of support directories, such as /proc, /sys, /dev…), it’ll work.

      2. 1

        Does this support live memory ballooning?

        1. 1

          No, on purpose. It does implement a virtio-balloon device, but using only the “free page reporting” feature, which allows the guest to nofify the host which pages are no longer in use, so the latter can free them. This allows the VM to keep the actual memory usage close to what the guest actually needs.