OpenBSD-current now runs as guest under Apple Hypervisor

(undeadly.org)

170 points | by gpi 4 hours ago

7 comments

  • Fiveplus 1 hour ago
    A good update. The VIRTIO_NET_F_MTU negotiation has been a roadblock for many guest OS implementations on apple's virtualization stack. The spec is vague enough that linux just does it while openbsd had to explicitly patch in support to handle the hypervisor's hardmtu limit.

    This is a big deal for local development imho. With the raw single-thread performance of the M4/M5 chips, an openbsd guest is arguably the best environment for testing pf configurations or running isolated mail servers (for example). Being able to rely on viogpu without the black-screen-of-death means we can slowly move away from serial console-only installs for quick VMs.

    Big kudos to Helg and Stefan!

  • MillionOClock 6 minutes ago
    Maybe I am missing something but the last few times I tested VMs it seemed to end up never shrinking in RAM size once it had grown, is this a real issue and if so is there any improvement coming on that front?
  • patjensen 2 hours ago
    The bigger news is that this also fixes the QEMU compatibility bug that makes OpenBSD hang out of the box on arm64 when starting X.

    It started in 7.3 with the frame buffer changes and the only workaround was to disable the kernel driver.

    Maybe more people will get to try out OpenBSD successfully now.

  • my123 3 hours ago
    Note that this is about Virtualization.framework (Apple's first party VMM). OpenBSD worked on Hypervisor.framework + qemu since a very long time.
    • cpach 45 minutes ago
      Good point. The naming of those frameworks is sooo confusing. IMHO, nearly impossible to not mix them up.
  • SomaticPirate 3 hours ago
    Is there a guide on how to do this? I haven’t ever used the raw hypervisor.
    • signa11 2 hours ago
      a quick kagi search revealed this: https://briancallahan.net/blog/20250222.html, perhaps it might work for you too ?
    • eschaton 3 hours ago
      It should just be a matter of producing a kernel and, if necessary, RAM disk that can be booted the same way as Linux.
      • jonhohle 37 minutes ago
        “just” is doing a lot of work in that sentence.
        • eschaton 13 minutes ago
          Yes and no; kernels aren’t magic, and “change how this kernel is loaded to match how Linux does it” is actually a reasonable first assignment for an Operating Systems class at a top-tier school. (You’re basically just creating an alternative `main()` if you don’t need a RAM disk image from which to load drivers.)
      • cpach 44 minutes ago
        Then one needs to launch it. Not sure if there are any lancher UIs out there, or if one has to write custom code for that.
        • eschaton 19 minutes ago
          My point is that as long as OpenBSD can boot like Linux, you just have to tell whatever VM front-end you’re using that you’re booting a Linux but give it an OpenBSD kernel and RAM disk.

          Traditionally BSD has booted very differently than Linux, because Linus adopted the same boot process as MINIX when he first developed it (since he was actually using the MINIX boot blocks at first).

          BSD has historically used a bootstrap that understands V7FS/FFS and can load a kernel from a path on it. MINIX takes the actual kernel and RAM disk images as parameters so it doesn’t need to know about filesystems, and that tradition continued with Linux bootstraps once it was standalone.

          • Rediscover 1 minute ago
            Who else was rdev'ing the Linux kernel to tell it where the root ext2(?) partition was long before they were using RAM disks? Like with SLS or MCC?
  • hindustanuday 1 hour ago
    [dead]
  • iberator 1 hour ago
    No X and networking. What's the point then? Useless imo