14 comments

  • Fiveplus22 days ago
    A good update. The <i>VIRTIO_NET_F_MTU</i> negotiation has been a roadblock for many guest OS implementations on apple&#x27;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&#x27;s hardmtu limit.<p>This is a big deal for local development imho. With the raw single-thread performance of the M4&#x2F;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.<p>Big kudos to Helg and Stefan!
    • eru21 days ago
      &gt; With the raw single-thread performance of the M4&#x2F;M5 chips, an openbsd guest is arguably the best environment for testing pf configurations or running isolated mail servers (for example).<p>A unikernel would probably be even better? (But then you need a mail server that&#x27;s set up for running as a unikernel, without an underlying OS.)
    • wang_li21 days ago
      &gt;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.<p>No, thanks. My IaC doesn&#x27;t want or need any interaction when spinning up a quick or slow VM.
  • patjensen22 days 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.<p>It started in 7.3 with the frame buffer changes and the only workaround was to disable the kernel driver.<p>Maybe more people will get to try out OpenBSD successfully now.
    • someguyiguess21 days ago
      I am one of them! Been wanting to try it out for a while but my only available machine is an MBP
      • patjensen21 days ago
        I can confirm it is fixed in the latest OpenBSD snapshot build. Works great.
    • archy_21 days ago
      Why does QEMU need to start X? Shouldn&#x27;t that be OpenBSD&#x27;s responsibility?
      • codys21 days ago
        OpenBSD does start X. And subsequently OpenBSD apparently hangs (or did so previously) when OpenBSD was running under Qemu.<p>The subject in the parent comment changed to OpenBSD when they mentioned it, and it appears you may have overlooked the subject change.
    • danwills21 days ago
      [flagged]
      • fleshmonad21 days ago
        Maybe not posting such comments would increase the value of this site.
  • my12322 days ago
    Note that this is about Virtualization.framework (Apple&#x27;s first party VMM). OpenBSD worked on Hypervisor.framework + qemu since a very long time.
    • cpach22 days ago
      Good point. The naming of those frameworks is sooo confusing. IMHO, nearly impossible to not mix them up.
      • carlm4221 days ago
        My mental model is that each of these covers a different layer of the stack, from lowest to highest:<p>* hypervisor-framework handles the hypervisor bits, like creating virtual machines, virtualising hardware resources, basically a C API on top of Apple&#x27;s hypervisor<p>* virtualization-framework is a higher-level API, meant to make it easy to run a full-blown VM with an OS and hardware integration, without having to reinvent the integration with lower-level primitives that hypervisor-framework provides<p>* containerization-framework uses virtualization-framework to run Linux containers on macOS in microVMs.<p>By analogy to not mix them up, it&#x27;s a bit like KVM &gt; QEMU &gt; containerd.<p>Hope this helps!
        • Angostura21 days ago
          Well, it help me. So thanks!
    • tannhaeuser21 days ago
      Out of my depth here. Is that the one Tahoe was introducing? What did it solve that was impossible before?
      • m13221 days ago
        Virtualization.framework was introduced in Big Sur. It builds on top of Hypervisor.framework and is essentially Apple&#x27;s QEMU (in some ways quite literally, it implements QEMU&#x27;s pvpanic protocol for example). Before QEMU and other VMMs gained ARM64 Hypervisor.framework support, it was the only way to run virtual machines on ARM Macs and still is the only official way to virtualize ARM macOS.<p>The new Tahoe framework you&#x27;re probably thinking of is Containerization, which is a WSL2-esque wrapper around Virtualization.framework allowing for easy installation of Linux containers.
        • archy_21 days ago
          &gt;a WSL2-esque wrapper around Virtualization.framework allowing for easy installation of Linux containers.<p>So Linux is now a first class citizen on both Windows and Mac? I guess it really is true that &#x27;if you can&#x27;t beat em, join em.&#x27; Jobs must be rolling in his grave.
          • thebiss21 days ago
            It&#x27;s well supported by the architecture. You may be interested in:<p>- Lima - wsl2-like access to a virtual machine <a href="https:&#x2F;&#x2F;github.com&#x2F;lima-vm&#x2F;lima&#x2F;blob&#x2F;master&#x2F;README.md" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;lima-vm&#x2F;lima&#x2F;blob&#x2F;master&#x2F;README.md</a><p>- vfkit - CLI creation and management of applehv VMs <a href="https:&#x2F;&#x2F;github.com&#x2F;crc-org&#x2F;vfkit" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;crc-org&#x2F;vfkit</a><p>- podman machine - easily run x86 containers in CoreOs, via the podman CLI <a href="https:&#x2F;&#x2F;docs.podman.io&#x2F;en&#x2F;latest&#x2F;markdown&#x2F;podman-machine.1.html" rel="nofollow">https:&#x2F;&#x2F;docs.podman.io&#x2F;en&#x2F;latest&#x2F;markdown&#x2F;podman-machine.1.h...</a>
          • trentnelson21 days ago
            I mean to be fair, WSL1 and WSL2 are extremely successful engineering efforts by Microsoft. I can’t imagine having to go back to the Cygwin days.
            • freedomben21 days ago
              I&#x27;m one of the few I think who really liked Cygwin. Far from perfect of course, but I even still prefer it to WSL depending on what I&#x27;m doing.
    • atmosx21 days ago
      Oh good point. I mixed it up, UTM is using qemu under hood, but as someone mentioned now OpenBSD snapshot boots with qemu seemlesly. It&#x27;s still virtualised though.
      • irusensei21 days ago
        It can also use the apple native hypervisor.
        • atmosx21 days ago
          Tried it earlier using UTM and the Apple hypervisor but didn’t boot.
  • MillionOClock22 days ago
    Maybe I am missing something but the last few times I tested VMs it seemed to end up never <i>shrinking</i> in RAM size once it had grown, is this a real issue and if so is there any improvement coming on that front?
    • daneel_w21 days ago
      You&#x27;re missing the complexity of making the guest inform the host that it has fully freed this and that slab of memory and that the host may reclaim it until further notice. It&#x27;s a bit more complicated than the other way around, where the guest believes it has e.g. 4 GiB of RAM available but the host doesn&#x27;t allocate all of it for the guest until it tries to read&#x2F;write there. A virtual machine is something entirely else than a containerized piece of software.
    • TacticalCoder21 days ago
      &gt; Maybe I am missing something but the last few times I tested VMs ...<p>Tested VMs on <i>what</i>? For VMs are used daily and there are, what, <i>hundreds of millions</i> of VMs running as we speak? Billions?
  • SomaticPirate22 days ago
    Is there a guide on how to do this? I haven’t ever used the raw hypervisor.
    • signa1122 days ago
      a quick kagi search revealed this: <a href="https:&#x2F;&#x2F;briancallahan.net&#x2F;blog&#x2F;20250222.html" rel="nofollow">https:&#x2F;&#x2F;briancallahan.net&#x2F;blog&#x2F;20250222.html</a>, perhaps it might work for you too ?
      • grosswait21 days ago
        This compares VMWare Fusion to Virtual Buddy
    • eschaton22 days 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.
      • jonhohle22 days ago
        “just” is doing a lot of work in that sentence.
        • eschaton22 days 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.)
          • fooker21 days ago
            It&#x27;s a first assignment if you are talking about a computer from 1990.
            • eschaton21 days ago
              What, pray tell, would you do for a first assignment in an Operating Systems class at a top-tier school that actually involves making changes to on realistic operating system code?
              • surajrmal21 days ago
                This is the set of assignments they do at the university of Illinois (a top 10 computer engineering school): <a href="https:&#x2F;&#x2F;courses.grainger.illinois.edu&#x2F;ece391&#x2F;fa2025&#x2F;assignments.html" rel="nofollow">https:&#x2F;&#x2F;courses.grainger.illinois.edu&#x2F;ece391&#x2F;fa2025&#x2F;assignme...</a><p>It looks roughly the same as when I took 15 years ago, except they switched to riscv from x86. Honestly, what you&#x27;re describing sounds too difficult for a first assignment. Implementing irq handlers or syscalls on an existing codebase is far more realistic, plausible, and useful.
              • fooker21 days ago
                I had to implement system calls in xv6.<p>You can look up which top tier schools use it for OS classes.
                • glhaynes21 days ago
                  At the risk of getting further off-topic: what sort of system calls did they have you implement? I’ve never done but a tiny bit of kernel hacking and that sounds like a good exercise, but I’m not sure what would be a good first syscall to add.
                  • surajrmal21 days ago
                    Try asking your favorite llm. They will even guide you with a small curriculum.
                    • throwaway13244821 days ago
                      Advice like this, and then people wonder why they’re lonely.
                      • glhaynes21 days ago
                        I don&#x27;t know… people were lonely before LLMs. And, they&#x27;re right, this is a question one could easily paste into a frontier model and <i>easily</i> get back info that&#x27;s way more useful than the significant majority of blog posts or replies would give! <i>shrug</i> But also I&#x27;d still like to hear what fooker has to say!
                • eschaton21 days ago
                  Oh, is that what MIT’s using these days?
      • cpach22 days 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.
        • fragmede21 days ago
          Parallels will run a VM that can (manually) boot bsd.rd from the EFI shell if you stick BOOTAA64.EFI and bsd.rd on a FAT32 GUID formatted.dmg, connect it to the VM, then boot EFI shell. Type:<p><pre><code> connect -r map -r fs0: bootaa64.efi boot bin.rd </code></pre> Then you&#x27;ll be in the OpenBSD installer, having booted an OpenBSD kernel.<p>You can grab the files from: <a href="https:&#x2F;&#x2F;ftp.openbsd.org&#x2F;pub&#x2F;OpenBSD&#x2F;snapshots&#x2F;arm64&#x2F;" rel="nofollow">https:&#x2F;&#x2F;ftp.openbsd.org&#x2F;pub&#x2F;OpenBSD&#x2F;snapshots&#x2F;arm64&#x2F;</a><p>Actually installing the system is left as an exercise for the reader.
        • eschaton22 days 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.<p>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).<p>BSD has historically used a bootstrap that understands V7FS&#x2F;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.
          • Rediscover22 days ago
            Who else was rdev&#x27;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?
            • fragmede21 days ago
              Originally Linux had Minix FS, followed by ext. Ext2 wouldn&#x27;t make an appearance until 1993 by Rémy Card, so it depends on when you were using it.
  • ggm21 days ago
    Well done! FreeBSD 15 is a complete no-go for X right now on utm, rdp&#x2F;vnc is the only way. Hopefully somebody will work out how to get a frame buffer working there, from this.
  • infi_v1221 days ago
    This is a significant milestone for OpenBSD on Apple hardware. The improved support for Virtualization.framework will definitely make local development and testing much smoother for many users. Kudos to the developers!
  • singularity200121 days ago
    so does redox at least this fork: <a href="https:&#x2F;&#x2F;github.com&#x2F;pannous&#x2F;redox" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;pannous&#x2F;redox</a> completely Rust-based without any Makefiles.
  • 6r1721 days ago
    I wonder if openbsd is secure running as a guest ? it it able to isolate it-self sufficiently so that the host cannot mathematically breach it ? (which makes openbsd very suitable for keyholding)
    • ikmckenz21 days ago
      As of 2025 OpenBSD has support for AMD SEV and SEV-ES, with support for SEV-SNP work-in-progress, so with the right hardware yes it&#x27;s able to isolate itself sufficiently <a href="https:&#x2F;&#x2F;www.bsdcan.org&#x2F;2025&#x2F;timetable&#x2F;timetable-Confidential-Computing-with.html" rel="nofollow">https:&#x2F;&#x2F;www.bsdcan.org&#x2F;2025&#x2F;timetable&#x2F;timetable-Confidential...</a>
    • muricula21 days ago
      The host kernel and probably the host VMM can see guest memory, so I wouldn&#x27;t use it for that.
      • daneel_w21 days ago
        <a href="https:&#x2F;&#x2F;www.amd.com&#x2F;en&#x2F;developer&#x2F;sev.html" rel="nofollow">https:&#x2F;&#x2F;www.amd.com&#x2F;en&#x2F;developer&#x2F;sev.html</a>
  • irusensei21 days ago
    On a slightly related note UTM remote is such a nice remote client for VMs that I wish they would make it compatible with other hypervisor protocols such as libvirtd and bhyve.
  • maximgeorge21 days ago
    [dead]
  • hindustanuday22 days ago
    [dead]
  • iberator22 days ago
    No X and networking. What&#x27;s the point then? Useless imo
    • mghackerlady21 days ago
      Networking is a disappointment but OpenBSD kinda expects you to use the command line. Fire up tmux (included because they invented it) and read the god tier manpages and play some of the games that are included
      • cyberpunk21 days ago
        OpenBSD did not “invent” tmux afaik it was imported later.
        • brynet21 days ago
          tmux was my first OpenBSD port, way back in 2008, albeit it was rather short-lived.<p><a href="https:&#x2F;&#x2F;marc.info&#x2F;?l=openbsd-ports-cvs&amp;m=121226747005033&amp;w=2" rel="nofollow">https:&#x2F;&#x2F;marc.info&#x2F;?l=openbsd-ports-cvs&amp;m=121226747005033&amp;w=2</a><p>I had discovered it searching on SourceForge originally, but the tmux creator Nicholas Marriott was already an OpenBSD user and he took MAINTAINER for the port.<p>A year later, tmux was imported by nicm@ to the OpenBSD base system, where it has remained upstream for last 16 years (GitHub sync&#x27;s from OpenBSD).<p><a href="https:&#x2F;&#x2F;marc.info&#x2F;?l=openbsd-cvs&amp;m=124389728412353&amp;w=2" rel="nofollow">https:&#x2F;&#x2F;marc.info&#x2F;?l=openbsd-cvs&amp;m=124389728412353&amp;w=2</a>