Post · 2 min read· pp. 9–15

NVMM

NVMM

NVMM

NVMM is a Type-2 hypervisor, and hypervisor platform, that provides support for hardware-accelerated virtualization. A virtualization API is shipped in libnvmm, and allows existing emulators such as Qemu to easily create and manage virtual machines via NVMM.

NVMM is the default hypervisor on DragonFlyBSD and NetBSD.

History

NVMM was developed in 2018, and initially supported NetBSD as main host OS. NVMM development was then moved to GitHub. In 2021, the latest version of NVMM was ported to DragonFlyBSD by Weitian Li. In 2024, as part of GSoC, the Haiku project made an initial pass at porting NVMM to Haiku, and this port was finalized in 2026.

Resources

Article: From Zero to NVMM.

The kernel code: browse.

The libnvmm API: browse.

The man page: open.

The regression tests: browse.

Qemu+NVMM

You can use Qemu with NVMM acceleration by adding "-accel nvmm" to your usual Qemu command line. For example:

text
$ qemu-system-x86_64 -smp 4 -m 8G -cdrom Win10_2004_English_x64.iso -accel nvmm

Tested guest OSes:

Guest OSStatusNotes
FreeBSD 32bitWorks
FreeBSD 64bitWorks
NetBSD 32bitWorks
NetBSD 64bitWorks
OpenBSD 32bitWorks
OpenBSD 64bitWorks
DragonFlyBSD 64bitWorks
Win95 32bitDoesn't work
Win98 32bitDoesn't work
WinXP 32bitWorks
Win7 32bitWorks
Win8 32bitWorks
Win8 64bitWorks
Win10 32bitWorks
Win10 64bitWorks
Fedora 64bitWorksPass "no_timer_check" in grub
ArchLinux 64bitWorksPass "no_timer_check" in grub
Ubuntu 64bitWorks
HaikuOS 64bitWorks
OmniOS 64bitWorks

The other existing OSes have not been tested.

Notes:

Linux performs timer checks at boot time which fail under hypervisors. To work around this, on certain distributions, you must pass "no_timer_check" in the guest's grub.

NetBSD on Qemu+NVMM Fedora on Qemu+NVMM

WindowsXP on Qemu+NVMM Windows10 on Qemu+NVMM

NetBSD 8 (top left), Fedora 29 (top right), Windows XP (bottom left), Windows 10 (bottom right), all running via Qemu+NVMM.

Technical details

NVMM can support up to 128 virtual machines, each having a maximum of 128 VCPUs and 128GB of RAM. It works with both x86 AMD CPUs and x86 Intel CPUs.

NVMM has unique design properties, not currently found in other hypervisor solutions. A detailed analysis is available in this blog post.

NVMM Design

Design overview