# VirtualBox vs. QEMU



## trutlze (Feb 5, 2014)

Hi,

Could someone point me to an up-to-date comparison of VirtualBox and QEMU? And how is support on FreeBSD for both. VirtualBox seems to be well integrated in FreeBSD.

First point that  seems obvious is that QEMU can emulate more platforms than VirtualBox.
From what I found so far, VirtualBox was faster than QEMU in the past. Is it still faster?

Thank you,
trutlze


----------



## SirDice (Feb 5, 2014)

QEMU is an emulator not virtualization software. Different techniques. Virtualization runs directly on the processor (it's a feature of modern CPUs), emulators 'translate' CPU instructions.

http://en.wikipedia.org/wiki/Virtualization
http://en.wikipedia.org/wiki/Hardware_emulation


----------



## trutlze (Feb 5, 2014)

OK. What about this statement on QEMU-website: "When used as a virtualizer, QEMU achieves near native performances by executing the guest code directly on the host CPU." To me it means that you can use QEMU for virtualization. As far as I understood you need a kernel module (emulators/kqemu-kmod) to use this feature that's not ported to FreeBSD for QEMU-versions after 0.11.


----------



## SirDice (Feb 5, 2014)

trutlze said:
			
		

> OK. What about this statement on QEMU-website: "When used as a virtualizer, QEMU achieves near native performances by executing the guest code directly on the host CPU." To me it means that you can use QEMU for virtualization.


It's possible they now have that feature. But it's primarily aimed at emulation rather than virtualization. VirtualBox is primarily virtualization and cannot emulate other architectures.


----------



## trutlze (Feb 5, 2014)

This is what I found so far:

To use virtualization with QEMU you need a kernel module. For older versions of QEMU this was kqemu (emulators/kqemu-kmod). But newer version of QEMU use KVM on Linux. There was a port of Linux KVM for FreeBSD developed in GSoC 2007 but after this there has been no developement of Linux KVM for FreeBSD and in the meanwhile the port is broken.
So you can't compare VirtualBox virtualization to QEMU virtualization on FreeBSD.

QEMU seems to be used for cross-compiling (for example: compiling for ARM platforms (Raspberry) on x86-64 platforms).


----------

