Running VirtualBox on Rocky Linux 10 or AlmaLinux 10 used to mean hunting for an EL9 build and hoping the kernel modules still compiled. That’s no longer the case. Oracle ships native el10 RPMs for VirtualBox 7.2, the Extension Pack rides along, and the whole install drops into a clean EL10 host in under ten minutes.
This guide covers installing Oracle VirtualBox on Rocky Linux 10, AlmaLinux 10, and RHEL 10 from the official Oracle repo. It walks through kernel module build prerequisites, adding the repo and GPG key, installing the Extension Pack for USB 3.0, RDP, and disk encryption, and a VBoxManage CLI tour for headless VM lifecycle. It also covers the hypervisor conflict you WILL hit on bare metal: KVM and VirtualBox fighting over the Intel VT-x instructions, and what to do about it.
Tested April 2026 on Rocky Linux 10.1 (kernel 6.12.0-124.8.1.el10_1) with Oracle VirtualBox 7.2.6 and Extension Pack 7.2.6
What’s changed since the Rocky 9 / VirtualBox 7.0 era
Three things matter for anyone coming from an older guide:
- Oracle now publishes first-class
el10builds athttps://download.virtualbox.org/virtualbox/rpm/el/10/x86_64/. No need to fall back on the el9 path. Both the 7.1.x and 7.2.x trees are available for EL10. - The EHCI and XHCI USB controllers moved into the open-source base package back in 7.0. You still need the Extension Pack for USB device passthrough, PXE boot for Intel cards, VRDE (VirtualBox Remote Desktop), disk image encryption, and Oracle Cloud integration.
- EL10 ships with a newer kernel toolchain (gcc 14, kernel 6.12 LTS series). The vboxdrv build completes cleanly on that stack, but only if the installed
kernel-develversion matches the running kernel exactly. AppStream may ship a newerkernel-headersthan the kernel you booted; we deal with that in the prerequisites step.
Prerequisites
- A Rocky Linux 10.x, AlmaLinux 10.x, or RHEL 10.x host with root or sudo access
- An x86_64 CPU with VT-x (Intel) or AMD-V enabled in BIOS/UEFI firmware
- At least 4 GB RAM on the host (more if you plan to run Windows guests)
- Internet access to reach
download.virtualbox.organd the EL AppStream mirrors
If you want a Rocky 10 server to practice on without putting a second box on your desk, spin one up at DigitalOcean or Hetzner Cloud. For real VirtualBox workloads with nested virt and hardware passthrough, a Hetzner dedicated server gives you bare metal at cloud pricing. Cloud VPS nodes do not expose VT-x to the guest by default, so VMs built inside VirtualBox on a VPS will fall back to software emulation and be slow. Check the Rocky 10 post-install guide at top things to do after installing Rocky Linux 10 for baseline hardening.
Confirm the CPU exposes hardware virtualization:
lscpu | grep -E 'Virtualization|Vendor'
You should see VT-x (Intel) or AMD-V. On an Intel host:
Vendor ID: GenuineIntel
Virtualization: VT-x
Empty output means virtualization is disabled in firmware. Reboot, enter BIOS/UEFI, find the CPU or advanced section, and enable VT-x, Intel VT-d, or AMD-V / SVM depending on your platform.
Step 1: Install kernel headers and build tools
VirtualBox ships three kernel modules (vboxdrv, vboxnetflt, vboxnetadp) that are compiled against the running kernel at install time. If kernel-devel is missing or mismatched, the modules don’t build and VBox refuses to start VMs.
Check the running kernel:
uname -r
On our test box:
6.12.0-124.8.1.el10_1.x86_64
Install the matching headers plus the rest of the toolchain. The $(uname -r) pin matters: if AppStream has already rolled a newer kernel, a plain dnf install kernel-devel pulls that new version and vboxconfig fails because modules must be built against the booted kernel, not a newer one.
sudo dnf install -y kernel-devel-$(uname -r) kernel-headers-$(uname -r) \
gcc make perl elfutils-libelf-devel wget
If dnf reports the pinned version is not available, the running kernel is older than anything in the repo — reboot into the latest kernel (sudo dnf update kernel && sudo reboot) and re-run the install with the new $(uname -r) value.
Step 2: Add the Oracle VirtualBox repo
VirtualBox is not in AppStream, EPEL, or CRB. It comes from Oracle’s own yum repo at download.virtualbox.org. Import the 2016 signing key first:
sudo wget https://www.virtualbox.org/download/oracle_vbox_2016.asc \
-O /etc/pki/rpm-gpg/oracle_vbox_2016.asc
sudo rpm --import /etc/pki/rpm-gpg/oracle_vbox_2016.asc
Drop a repo file into /etc/yum.repos.d/. Open the editor:
sudo vi /etc/yum.repos.d/virtualbox.repo
Paste the following. The $releasever variable auto-resolves to 10 on EL10, so the same file works for Rocky, AlmaLinux, and RHEL:
[virtualbox]
name=Oracle VirtualBox for Enterprise Linux $releasever - $basearch
baseurl=https://download.virtualbox.org/virtualbox/rpm/el/$releasever/$basearch
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/oracle_vbox_2016.asc
Confirm the repo is reachable and signed:
sudo dnf repolist virtualbox
Expected output:
repo id repo name status
virtualbox Oracle VirtualBox for Enterprise Linux 10 - x86_64 enabled
Step 3: Install VirtualBox 7.2
List the available VirtualBox builds in the repo. Both the 7.1.x and 7.2.x lines are published for EL10:
sudo dnf search --refresh VirtualBox- | grep ^VirtualBox
Install the 7.2 line (current stable). The package pulls in Qt6 GUI components, graphics stack bits, and ICU libraries:
sudo dnf install -y VirtualBox-7.2
Pick VirtualBox-7.1 instead if you need to match an existing fleet on the LTS-ish 7.1 line; both install cleanly on Rocky 10. Mixing 7.1 and 7.2 appliances between hosts is supported, but Extension Packs must match the installed VirtualBox major.minor version exactly.
Check the installed version:
VBoxManage --version
On our box:
7.2.6r172322
Step 4: Build and load the kernel modules
The package triggers a vboxdrv build during install. If it looked fine, skip ahead to Step 5. If the post-install messages mentioned kernel modules warnings, or if you just reinstalled the kernel headers, re-run vboxconfig manually:
sudo /sbin/vboxconfig
Successful build output is short:
vboxdrv.sh: Stopping VirtualBox services.
vboxdrv.sh: Starting VirtualBox services.
vboxdrv.sh: Building VirtualBox kernel modules.
Verify the three modules are loaded:
lsmod | grep vbox
You should see all three:
vboxnetadp 32768 0
vboxnetflt 40960 0
vboxdrv 724992 2 vboxnetadp,vboxnetflt
And the systemd service that keeps them loaded across reboots:
sudo systemctl status vboxdrv --no-pager
Expected summary:
● vboxdrv.service - VirtualBox Linux kernel module
Loaded: loaded (/usr/lib/virtualbox/vboxdrv.sh; enabled; preset: disabled)
Active: active (exited)
If vboxconfig fails with a message about a missing Module.symvers or an unsigned module on a Secure Boot system, see the Troubleshooting section below.
Step 5: Install the Extension Pack
The Extension Pack is a separate download under the PUEL license (free for personal use, evaluation, and educational use; commercial use needs a paid license). It adds USB 2.0/3.0 device passthrough, VRDE (VirtualBox Remote Desktop), disk image encryption, Intel PXE boot ROM for E1000 cards, and Oracle Cloud Infrastructure integration. Without it, headless remote access and USB dongles inside guests don’t work.
Fetch the matching version. The filename must match the exact installed VirtualBox version:
VBOX_VER=$(VBoxManage --version | sed 's/r.*//')
echo "Installed VirtualBox: ${VBOX_VER}"
wget "https://download.virtualbox.org/virtualbox/${VBOX_VER}/Oracle_VirtualBox_Extension_Pack-${VBOX_VER}.vbox-extpack"
Install it. The first attempt prints the license and asks for y/n — that’s fine for one-off installs. For scripted installs or to capture the license hash, run the install directly and you’ll see the hash at the end of the license text:
sudo VBoxManage extpack install --replace \
"Oracle_VirtualBox_Extension_Pack-${VBOX_VER}.vbox-extpack"
Answer y to the license. The last line prints a license hash you can reuse for unattended installs:
License accepted. For batch installation add
--accept-license=eb31505e56e9b4d0fbca139104da41ac6f6b98f8e78968bdf01b1f3da3c4f9ae
to the VBoxManage command line.
Successfully installed "Oracle VirtualBox Extension Pack".
For Ansible or other automation, re-run with the captured hash (it is version-specific — do not copy this one blindly, generate your own):
sudo VBoxManage extpack install --replace \
--accept-license=eb31505e56e9b4d0fbca139104da41ac6f6b98f8e78968bdf01b1f3da3c4f9ae \
"Oracle_VirtualBox_Extension_Pack-${VBOX_VER}.vbox-extpack"
Confirm the Extension Pack is registered:
VBoxManage list extpacks
Expected:
Extension Packs: 1
Pack no. 0: Oracle VirtualBox Extension Pack
Version: 7.2.6
Revision: 172322
Edition:
Description: Oracle Cloud Infrastructure integration, PXE ROM.
VRDE Module:
Crypto Module:
Usable: true
Why unusable:
Usable: true is what matters. A Usable: false with a reason in Why unusable usually means a version mismatch between the Extension Pack file and the installed VirtualBox — re-download the matching .vbox-extpack for your exact installed version.
Step 6: Add your user to the vboxusers group
The package creates a vboxusers group. Non-root accounts need membership in it to use USB passthrough and shared folders from the GUI. Add the user that will run the VMs, then log out and back in for the new group to take effect:
sudo usermod -aG vboxusers $USER
id $USER
For a dedicated service user (useful on headless hosts running vboxheadless):
sudo useradd -m -G vboxusers vbox
sudo passwd vbox
Step 7: Smoke-test with VBoxManage
Before spinning up guests, verify the host-side view is sane:
VBoxManage list hostinfo | head -20
Output from our Rocky 10.1 box:
Host Information:
Host time: 2026-04-18T18:58:49.608000000Z
Processor online count: 1
Processor core count: 1
Processor supports HW virtualization: yes
Processor supports PAE: yes
Processor supports long mode: yes
Processor supports nested paging: yes
Processor supports unrestricted guest: yes
Processor supports nested HW virtualization: yes
Processor#0 description: 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz
Memory size: 1769 MByte
Operating system: Linux
Operating system version: 6.12.0-124.8.1.el10_1.x86_64
Processor supports HW virtualization: yes and Processor supports nested HW virtualization: yes mean you can build guests that themselves run hypervisors (useful for lab work with KVM-on-VirtualBox or Docker-in-VM).
Below is a quick snapshot of the verification output from the test host — VBoxManage version, loaded kernel modules, and Extension Pack registration in one view:

VBoxManage CLI: create, start, stop a VM from the shell
VBoxManage is the CLI that mirrors every option in the GUI and then some. It is how you drive VirtualBox on a headless server. The full lifecycle, start to teardown, is a handful of commands. Here’s a minimal Rocky Linux guest created, powered on with a disk, and cleaned up — no GUI needed.
Register a new VM:
VBoxManage createvm --name rocky10-lab --ostype RedHat_64 --register
Expected:
Virtual machine 'rocky10-lab' is created and registered.
UUID: a0462f3a-0337-4b51-8a44-40b8c41fe477
Settings file: '/root/VirtualBox VMs/rocky10-lab/rocky10-lab.vbox'
Shape the hardware. 2 vCPU, 4 GB RAM, NAT networking, default graphics:
VBoxManage modifyvm rocky10-lab \
--memory 4096 --cpus 2 \
--nic1 nat --boot1 dvd --boot2 disk --boot3 none --boot4 none \
--audio-driver none --graphicscontroller vmsvga
Create a 20 GB virtual disk and attach it plus an ISO:
VBoxManage createhd --filename ~/VirtualBox\ VMs/rocky10-lab/rocky10-lab.vdi \
--size 20480 --format VDI
VBoxManage storagectl rocky10-lab --name SATA --add sata --controller IntelAhci
VBoxManage storageattach rocky10-lab --storagectl SATA --port 0 --device 0 \
--type hdd --medium ~/VirtualBox\ VMs/rocky10-lab/rocky10-lab.vdi
VBoxManage storagectl rocky10-lab --name IDE --add ide
VBoxManage storageattach rocky10-lab --storagectl IDE --port 0 --device 0 \
--type dvddrive --medium /path/to/Rocky-10.1-x86_64-dvd.iso
Start the VM headless and attach to the console over VRDE (port 3389):
VBoxManage modifyvm rocky10-lab --vrde on --vrdeport 3389
VBoxManage startvm rocky10-lab --type headless
Connect from your workstation with any RDP client. The VRDE feature is what the Extension Pack enabled earlier. To list running VMs and their state:
VBoxManage list runningvms
VBoxManage showvminfo rocky10-lab | grep -E 'State|VRDE|Memory size'
Graceful shutdown (ACPI power button), force-off, and full teardown:
VBoxManage controlvm rocky10-lab acpipowerbutton
VBoxManage controlvm rocky10-lab poweroff
VBoxManage unregistervm rocky10-lab --delete
That’s the entire lifecycle in six commands. Wrap it in a shell script and you have a reproducible lab builder. Credentials for these VMs (host admin passwords, VNC, RDP) go in a real vault — see 1Password if you don’t already have a password manager wired into your infra.
The KVM and VirtualBox conflict (important on bare metal)
On bare metal, VirtualBox and KVM both want exclusive access to the Intel VT-x instructions (or AMD-V on AMD CPUs). If the kernel’s kvm_intel or kvm_amd module is loaded when you try to start a VirtualBox VM, the VM refuses to boot with the message VT-x is being used by another hypervisor.
Check whether KVM modules are loaded:
lsmod | grep kvm
On our test box, which happens to be a KVM guest itself, both stacks coexist because the outer hypervisor (Proxmox KVM) exposes nested VT-x to the guest kernel, and VirtualBox’s recent 7.x builds can accept the hardware through that path:
vboxnetadp 32768 0
vboxnetflt 40960 0
vboxdrv 724992 2 vboxnetadp,vboxnetflt
kvm_intel 446464 0
kvm 1396736 1 kvm_intel
irqbypass 12288 1 kvm
On a bare-metal host where both are installed, you have to pick one. To temporarily free VT-x for VirtualBox:
sudo modprobe -r kvm_intel # or kvm_amd on AMD hosts
sudo modprobe -r kvm
That only lasts until reboot or until something loads KVM again (virt-manager, cockpit-machines, a libvirt-backed container). To make it stick, blacklist the KVM modules. Create a modprobe drop-in:
sudo vi /etc/modprobe.d/blacklist-kvm.conf
Add (Intel example — switch kvm_intel for kvm_amd on AMD):
blacklist kvm_intel
blacklist kvm
Rebuild the initramfs and reboot:
sudo dracut -f
sudo reboot
The other way round — if KVM is your primary and you only reach for VirtualBox occasionally — keep KVM and unload it before starting VBox VMs. Pick your primary based on workload. See KVM on Rocky Linux / AlmaLinux / RHEL for the libvirt setup and nested virtualization on KVM/QEMU if you need hypervisor-on-hypervisor.
KVM vs VirtualBox: when to pick which
Quick comparison, because the conflict above forces the choice:
| Concern | KVM + libvirt | Oracle VirtualBox |
|---|---|---|
| Type | Type 1 (kernel-integrated) | Type 2 (hosted) |
| Performance | Near-native on Linux hosts | Good for desktop/lab loads |
| Guest OS support | Linux-first, Windows via virtio | Broadest OS matrix, easiest Windows |
| Management UI | virt-manager, Cockpit, virsh | Qt6 GUI, VBoxManage, phpVirtualBox |
| USB passthrough | Works with libvirt XML | Built-in, polished (needs Extension Pack) |
| Snapshots / clones | qcow2 snapshots, fast | Built-in snapshot tree, GUI-friendly |
| Licensing | GPLv2, no cost | GPLv3 base; Extension Pack PUEL (commercial use = paid) |
| Best fit | Production VM hosts, bulk VM labs | Developer workstations, Windows guests, cross-platform appliance testing |
Most CFG readers run KVM for servers and VirtualBox on their laptop. The two do not coexist cleanly, but they don’t have to. If you’re building a production VM host, go KVM. If you want to boot the latest Ubuntu, Windows 11, or a weird BSD once a month to verify something, VirtualBox is easier.
Troubleshooting
Error: “Kernel driver not installed (rc=-1908)”
The vboxdrv module isn’t loaded. Either the build failed (missing kernel-devel matching $(uname -r)) or Secure Boot is blocking an unsigned module. Re-run:
sudo /sbin/vboxconfig
Read the full log at /var/log/vbox-setup.log. Common fixes: install the matching kernel-devel (Step 1), or sign the VBox modules with a Machine Owner Key (MOK) if Secure Boot is enforced.
Error: “VT-x is being used by another hypervisor (VERR_VMX_IN_VMX_ROOT_MODE)”
KVM is holding VT-x. See the KVM conflict section above. Unload kvm_intel or kvm_amd, or blacklist them for a permanent fix.
Error: “Extension pack name mismatch”
If you renamed the downloaded .vbox-extpack file, the internal XML name inside the archive no longer matches the filename and VBoxManage refuses to install it. Re-download without renaming:
wget "https://download.virtualbox.org/virtualbox/${VBOX_VER}/Oracle_VirtualBox_Extension_Pack-${VBOX_VER}.vbox-extpack"
Error: “Failed to acquire the VirtualBox COM object” (GUI)
Almost always a stale VirtualBox process holding a lock on ~/.config/VirtualBox/VBoxSVC.log. Kill any running VBoxSVC processes, then retry:
pkill -f VBoxSVC
pkill -f VirtualBoxVM
virtualbox &
Kernel module built, but loads fail after a kernel update
Every time dnf update pulls a new kernel, the VBox modules need rebuilding against that new kernel. The repo package triggers that automatically on dnf update VirtualBox-7.2, but if the kernel moves first and you haven’t touched VBox, run:
sudo dnf install -y kernel-devel-$(uname -r) kernel-headers-$(uname -r)
sudo /sbin/vboxconfig
For a long-term fix, install dkms and set up a DKMS hook so kernel module rebuilds happen automatically — though vboxconfig is fast enough that most admins skip DKMS on single-host setups.
Keeping VirtualBox updated
Oracle rolls point releases every couple of months. Pull them in with the usual dnf flow:
sudo dnf update -y VirtualBox-7.2
Every time you bump VirtualBox, bump the Extension Pack to the matching version. Skipping this leaves Usable: false in VBoxManage list extpacks and USB/VRDE silently stop working:
VBOX_VER=$(VBoxManage --version | sed 's/r.*//')
wget "https://download.virtualbox.org/virtualbox/${VBOX_VER}/Oracle_VirtualBox_Extension_Pack-${VBOX_VER}.vbox-extpack"
sudo VBoxManage extpack install --replace \
"Oracle_VirtualBox_Extension_Pack-${VBOX_VER}.vbox-extpack"
If you want to stay on the 7.1 line specifically, pin VirtualBox-7.1 instead of VirtualBox-7.2 in dnf, and fetch extpack archives from the 7.1.x tree.
Uninstall
Clean removal, in order:
sudo VBoxManage extpack uninstall "Oracle VirtualBox Extension Pack"
sudo dnf remove -y VirtualBox-7.2
sudo rm -f /etc/yum.repos.d/virtualbox.repo /etc/pki/rpm-gpg/oracle_vbox_2016.asc
sudo rm -rf /etc/vbox /var/log/vbox-*.log
sudo groupdel vboxusers # optional
User-owned VM data in ~/VirtualBox VMs/ is not touched by the package removal. Clear it manually if the guest images are no longer needed.
Related guides
If you came here to run Linux desktops on a VBox host, Rocky Linux Vagrant boxes for KVM and VirtualBox covers the Vagrant layer on top. AlmaLinux Vagrant boxes is the AlmaLinux equivalent. For CLI-level hypervisor ops on the KVM side, the virsh commands cheat sheet mirrors much of what VBoxManage does here but for libvirt/KVM. And if containers are closer to what you actually want, Docker CE on Rocky Linux / AlmaLinux gets you running with a fraction of the hypervisor overhead.
Newsletter
Want hands-on Linux, virtualization, and DevOps tutorials in your inbox the day they ship? Subscribe to the ComputingForGeeks newsletter from the footer of any article. No spam, no upsells — just new content as it lands.
Hire us
Need help architecting a lab, migrating between hypervisors, or standing up a KVM/Proxmox cluster to replace a VirtualBox-on-laptop workflow? Reach out through the contact page. We do consulting on Linux, virtualization, Kubernetes, and cloud infra for teams that want their platform to stop being a side quest.