Hyper-V or VirtualBox – Which One to Choose?

When you want to run a virtual machine, you have several hypervisors to choose from, including two of the most popular products: Oracle VirtualBox and Microsoft Hyper-V. So how do you decide which one to choose: VirtualBox or Hyper-V? Both solutions provide many features that allow you to run and manage VMs. Read the VirtualBox vs Hyper-V comparison to understand the differences between these two hypervisors and select the one that better meets your needs.

Note: For a comparison with other hypervisors, read our complete VirtualBox vs. VMware products overview and the VMware vs Hyper-V comparison.

NAKIVO for Hyper-V Backup

NAKIVO for Hyper-V Backup

Agentless, application-aware backups for Hyper-V. Anti-ransomware protection, instant VM boot from backup, other virtual/physical platform support and more.

Hyper-V vs VirtualBox: Comparison Table

Let’s begin with an overview of the different aspects of Hyper-V vs VirtualBox before we cover each point in more detail in the next sections.

Hyper-V VirtualBox
Hypervisor Type 1 Type 2
Supported host OS Windows Windows, Linux, macOS, Solaris
Supported guest OS Windows, Linux, FreeBSD Windows, Linux, FreeBSD, Solaris, macOS and others
Guest OS drivers and utilities Hyper-V Integration Services VirtualBox Guest Additions
Virtual Disk file format VHD, VHDX VDI, VMDK, VHD, HDD
Virtual disk thin provisioning Yes (Dynamic disks) Yes (Dynamically-allocated)
VM snapshots Yes Yes
VM management tools VMConnect (RDP-based) VirtualBox GUI with VRDE and VRDP
Live migration features Hyper-V Live Migration VirtualBox Teleport
Live Migration functionality Higher Lower
VM replication Yes No
Software virtualization No Yes
Remote management Hyper-V Manager phpVirtualBox
Command line interface Yes, PowerShell Yes, VBoxManage
Network modes 3 modes 7 modes
Network traffic analyzing Port Mirroring Network Tracing
Shared Folders No, only manually Yes, with an adopted feature
Shared Clipboard Limited (text) Wide support (text, files, etc.)
Drag & Drop No Yes
Encryption Yes Yes
Nested virtualization Yes Yes
Failover cluster Yes No

Hypervisor Types Overview

A hypervisor is special software that allows you to run one or multiple virtual machines with their own operating systems (that is, guest OSs) on a physical computer (that is, the host machine). There are two types of hypervisors: type 1 and type 2.

  • Hyper-V is a type 1 hypervisor, also called a bare metal hypervisor, and runs directly on a computer’s hardware. When a physical computer (a host) starts, a Hyper-V hypervisor takes control from BIOS or UEFI. Then, Hyper-V starts the management operating system, which can be Hyper-V Server, Windows, or Windows Server. Virtual machines can be started manually by the user or automatically, depending on its settings.
  • VirtualBox is a type 2 hypervisor, sometimes called a hosted hypervisor. A type 2 hypervisor is an application that runs on the operating system (OS) and is already installed on a host. When a physical computer starts, the operating system installed on the host loads and takes control. A user starts the hypervisor application (VirtualBox in this case) and then starts the needed virtual machines. VM hosted processes are created.

Hyper-V is always on if the host is powered on, while VirtualBox can be started and closed by a user when needed.

Hyper-V vs VirtualBox – a type 1 vs type 2 hypervisor

Note: If you install VirtualBox on a Windows machine, make sure that Hyper-V is disabled to avoid issues.

Thoughts. In terms of Hyper-V vs VirtualBox performance, a type 1 hypervisor delivers better performance. Choose Hyper-V if performance is important and and the needed guest operating systems are supported. A type 2 hypervisor like VirtualBox is more universal, on the other hand.

Windows-Only Hyper-V vs. Multi-Platform VirtualBox

Hyper-V can only run on Windows family operating systems or on a specialized Hyper-V Server. The Hyper-V feature is built-in from Windows 8 onwards and is also available as a server role from Windows Server 2008 and onward.

VirtualBox can run on a larger number of operating systems, including Linux, Windows, Solaris, and Mac OS.

If you have Windows installed on the physical machines in your environment, you may opt for Hyper-V. If you have a multiplatform environment, then you can take advantage of VirtualBox and run your virtual machines on different computers with different operating systems.

Support of Guest Operating Systems

A guest operating system is the OS that is installed to run on a VM. The guest OS and host OS can be different.

Hyper-V can host VMs with the following guest operating systems: Windows, Linux, and FreeBSD.

VirtualBox supports more guest operating systems than Hyper-V, including Windows, Linux, FreeBSD, Solaris, Mac OS, among others.

You can see the full list of supported operating systems versions for VirtualBox on the vendor’s official pages. The screenshot below explains VirtualBox running on a Windows 10 host machine and Xubuntu Linux running inside a VirtualBox virtual machine (VM).

Note: The screenshots used in this blog post were created in VirtualBox 6.0, but how the features work is the same for later VirtualBox versions such as 6.0.x, 6.1, etc. The interface of Hyper-V for Windows Server 2016 that we use in this blog post is identical to the interface of Hyper-V for Windows Server 2019, 2022, and Windows 10.

VirtualBox vs Hyper-V - running a Linux VM on a Windows host in VirtualBox

Hyper-V Integration Services vs. VirtualBox Guest Additions

Hyper-V Integration Services is a pack of drivers and utilities that improves overall performance as well as interactions between host and guest operating systems. Integration Services are installed on the guest OS that runs on a VM.

  • For Windows OSs, Hyper-V Integration Services can be installed by attaching a virtual disc image (ISO file) to the VM, which includes the installer, or via Windows Update.
  • As for Linux, Integration Services is built into the kernel of modern Linux operating systems. Integration Services can be updated on Linux when the kernel is updated.
  • As an alternative, you can manually download the full installation package of Hyper-V Integration Services for Linux from the Microsoft Download Center.

VirtualBox Guest Additions contains system applications and drivers that, similarly to Hyper-V Integration Services, optimize a guest OS as well as improve its performance and usability.

The following features, among others, become available after installing Guest Additions: Drag & Drop, Bidirectional clipboard, Auto-resize, and Seamless mode.

The installation process of Guest Additions is similar to Integration Services: you attach an ISO disc image with the installer to a VM and install Guest Additions using the GUI or command line.

Virtual Disk Format

Hyper-V VM virtual disks are stored in two file formats:

Read the detailed VHD vs VHDX virtual disk format comparison.

VirtualBox supports virtual disks of the following formats:

  • VDI is the native VirtualBox format.
  • VMDK is VMware virtual disk format.
  • VHD is Hyper-V format (note that VHDX is not supported by VirtualBox).
  • HDD is Parallels Desktop format.

There are two types of virtual disk pre-allocation:

  • Fixed. A fixed virtual disk consumes all provisioned space on storage once the disk has been created. This provisioning type is similar to thick provisioning.
  • Dynamic. A dynamic virtual disk consumes almost no storage space after creation and grows over time when the data is written on the virtual disk. This provisioning type is similar to thin provisioning.

Read the blog post about VMware thin and thick provisioning to learn more about virtual disk pre-allocation.

Both VirtualBox and Hyper-V support fixed-size disks and dynamically allocated disks. You can convert fixed disks to dynamic disks for both Hyper-V and VirtualBox. Fixed virtual disks need more time for creation and consume more storage space upon creation, but they provide higher performance. Dynamic virtual disks are created near instantly and allow you to save storage space, but their performance is lower.

Note: You may need to reclaim free space after deleting files stored on a dynamic (dynamically allocated) virtual disk.

Hyper-V Checkpoints vs. VirtualBox Snapshots

Hyper-V checkpoint is a feature that allows you to save the state of a virtual machine at a specific point in time. A checkpoint can be used to revert a VM back to a previous state if, for example, unwanted changes are made.

There are two types of checkpoints available in the latest version of Hyper-V:

  • Standard Checkpoints
  • Production Checkpoints

Unlike Standard Checkpoints, Production Checkpoints allow you to freeze the VM before creating the checkpoint to prevent write operations on the virtual disk. For Windows-based VMs, VSS (Volume Shadow Copy Service) is used to achieve this, while for Linux-based VMs, File System Freeze is used. This approach allows you to avoid issues that can occur with Standard Checkpoints, such as data inconsistency as a result of data being changed on a disk while a checkpoint is being created. When data is not changed while creating the checkpoint, that checkpoint is data-consistent and application-consistent rather than crash-consistent.

When a checkpoint is created, a differencing virtual disk (AVHD or AVHDX) is created for each VHD (or VHDX) virtual disk of the virtual machine. All changes are written to the differencing disk after checkpoint creation. Differencing virtual disks are stored with parent virtual disks in the same directory.

VirtualBox snapshots are the equivalent of Hyper-V checkpoints. You can save the current VM state with snapshots and revert to a previous state if needed. VDI is the native file format for virtual disks in VirtualBox. When a snapshot is created, a new differencing virtual disk is created as a new VDI file. When you delete a snapshot that represents an earlier VM state as compared to your current VM state, then the differencing virtual disk is merged with the parent virtual disk or multiple differencing virtual disks are merged. Note that snapshots are used primarily for testing purposes but not for production purposes.

Note: Checkpoints and snapshots are useful for testing and help you revert VMs to their previous state. However, note that they are not sufficient for data protection, there are numerous differences between snapshots and backups.

Hyper-V VMConnect vs. VirtualBox Remote Display

Hyper-V Virtual Machine Connection (VMConnect) is a tool that provides access to the GUI or console interface of the VM and used to manage the VM. VMConnect uses WMI (Windows Management Instrumentation) for this purpose. You can interact with the guest OS of the VM by using a keyboard and mouse, just like you would interact with physical machines. A connection to the VM can be established from the local machine on which Hyper-V is installed and the VM is running or from a remote machine via the network.

VMConnect is usually enabled by default when the Hyper-V role is installed. Otherwise, you can add the Hyper-V Tools feature in the Add Features Wizard. VMConnect uses Microsoft Remote Desktop Protocol (RDP) to establish a connection.

Hyper-V vs VirtualBox - managing a Guest OS with Hyper-V VMConnect

Enhanced session mode allows you to redirect local devices and resources to a VM. The clipboard, disk drive, USB flash drive, audio, printer, and display configuration can be redirected. Thus, you can use a USB flash drive inserted into a USB port of your physical machine in your virtual machine.

VirtualBox also offers tools for the convenient management of virtual machines. VMs that are run on the local machine can be managed with the user-friendly VirtualBox GUI from the local computer.

  • VirtualBox Remote Desktop Extension (VRDE) is the general extension interface that provides maximum flexibility with extension packages that can be developed by third parties. VRDE is compatible with Microsoft RDP.
  • VirtualBox Remote Display Protocol (VRDP) is provided with VRDE. This is a backward-compatible extension to RDP that allows you to use standard RDP clients for controlling remote VMs.

To connect to a remote guest VM, you should type the IP address of the host machine and port set for remote connections to the VM in the VM display settings. The port 3389 is used by default. You can set different RDP port numbers for different VirtualBox VMs.

Configuring Remote Display for managing VMs in VirtualBox

VirtualBox has a feature called Seamless mode that allows you to display windows from the VM guest OS together with the windows of your host operating system. Hyper-V doesn’t have such a feature. VirtualBox can also record video of what is displayed in the VM user interface. The Seamless mode is similar to the Unity mode in VMware Workstation.

VirtualBox has more flexible options to output information on multiple monitors. Hyper-V uses RDP technology and allows you to use one monitor or all monitors for graphics output. VirtualBox allows you to select a custom number of monitors for graphics output. For example, you can select 2 of 3 monitors in VirtualBox. VirtualBox supports up to 8 monitors.

Thoughts. VirtualBox is the winner when it comes to convenience in guest operating system management in this category of our Hyper-V vs VirtualBox comparison.

Hyper-V Live Migration vs. VirtualBox Teleporting

Hyper-V Live Migration allows you to move running VMs from one Hyper-V host to another transparently and without significant downtime. This feature is especially useful when you use Hyper-V Failover Cluster because it helps you provide high availability for the VMs. It is recommended that you use a dedicated migration network for Hyper-V Failover Cluster. VM files such as virtual disks must be located on shared storage. If you need to move VM files from one storage to another, then Storage Migration should be used.

VirtualBox Teleporting is a VM migration feature that allows you to move virtual machines from one VirtualBox host to another over a TCP/IP network, even while the VM is running. Source and destination VMs must use the same shared storage. The VM can be transferred from a source host to a target host with minimal downtime, independently from the host OS. For example, you can transfer running Windows-based VMs from a Linux host to a Solaris host or vice versa. Teleporting is available from VirtualBox version 3.1 onwards. Migration of running VMs improves the flexibility of your virtual environment.

Thoughts. Virtual machine live migration functionality in Hyper-V is more advanced and easy to use, and Hyper-V supports failover clustering.

Hardware Virtualization and Software Virtualization

Hyper-V supports hardware virtualization, which is a technology that uses a hypervisor to create an abstraction layer between software and physical hardware for emulating computers. All devices needed for the proper functionality of a computer are emulated with special software. Hardware virtualization must be enabled in UEFI/BIOS on a physical machine.

VirtualBox supports both hardware and software virtualization. Software virtualization can only be used for VMs with 32-bit guest operating systems that use x86 architecture. For 64-bit guest systems, only hardware virtualization may be used. Unlike most other virtualization products, software virtualization makes it possible to run VirtualBox on a number of guest operating systems on computers with old processors even if those processors don’t have hardware virtualization support.

Thoughts. VirtualBox is more flexible and universal in terms of running different guest operating systems, including old operating systems, with the help of software virtualization. Hyper-V doesn’t support software virtualization, but as a type-1 hypervisor, performance for the supported guest OSes can be better.

Remote Management with GUI

Hyper-V Manager is a tool with GUI that helps you manage your Hyper-V VMs. You can create, import, configure, start, stop, and remove VMs with Hyper-V Manager. You can also perform other actions such as configuring virtual switches, virtual hard disks, creating checkpoints, connecting to the guest OS interface with VMConnect, etc. You can also use it to connect to a remote Hyper-V Server and manage the VMs residing on that server.

phpVirtualBox is an open source tool with a web interface written in PHP that allows you to manage remote VirtualBox instances with VMs. phpVirtualBox provides an interface that is the same as the GUI interface of VirtualBox. As a result, you can manage your VirtualBox instances remotely with a browser, similarly to how you manage your local instances. This tool can be a nice alternative to VirtualBox GUI if you’re running VirtualBox on a headless server (a server that has an OS without GUI).

Remote Management with Console Interface

Hyper-V servers can be managed with PowerShell commands. Powershell is a Windows command line interface developed by Microsoft. But PowerShell Core is also compatible with Linux and macOS. PowerShell Remoting must be enabled for this purpose. Using PowerShell is a way to automate Hyper-V and VM management, especially in large environments.

VBoxManage is a command line interface (CLI) for VirtualBox. You can access all the features available in the VirtualBox GUI. Moreover, you can access all features provided by the VirtualBox virtualization engine with VBoxManage (not all of the features are available in GUI). The CLI can also be used for managing VirtualBox instances on operating systems without GUI (that only have a console interface). Another advantage is the ability to use scripting and automation. VBoxManage is a set of commands to manage VirtualBox and VMs that is compatible with Linux, Windows, Solaris, and Mac OS.

Virtual Networking

Hyper-V allows you to use virtual switches to connect virtual network adapters of virtual machines to the needed network and to a host machine. There are three virtual network modes in Hyper-V:

  • Private
  • Internal
  • External (Public)

Read more about Hyper-V virtual switches and networking. Hyper-V supports NIC teaming, which is useful for a cluster.

VirtualBox has more virtual network modes than Hyper-V and provides wide networking options:

  • Not Attached
  • NAT
  • NAT Network
  • Bridged Adapter
  • Internal Network
  • Host-Only Adapter
  • Generic Driver

Read more about VirtualBox network settings and network modes.

Hyper-V External is identical to VirtualBox Bridged Adapter, Hyper-V Internal is identical to VirtualBox NAT Network, and Hyper-V Private is identical to VirtualBox Internal Network mode.

Thoughts. VirtualBox provides more attractive networking modes for individual users. Hyper-V is better adapted for link aggregation for better network performance and reliability in a cluster.

VM Network Traffic Analyzing

Port Mirroring is a network traffic analyzing tool for Hyper-V. This feature allows you to send copies of all received and transmitted packets from one port to another for further packet analysis. The main purpose of using Port Mirroring is troubleshooting. You can create a VM that has a virtual network adapter connected to the appropriate virtual switch port, install packet analysis software on that destination VM, and send network packets from multiple VMs to the destination VM for analysis.

VirtualBox provides a network tracing feature with which you can enable network packet logging for further analysis. As a result, VirtualBox utilizes the built-in capability and writes all captured traffic of the VM network interface into PCAP files. Later you can open these files in a traffic analysis tool such as Wireshark. This feature can be activated with a command line interface. Disable this feature after finishing the investigation to prevent filling out the whole disk with PCAP files.

Shared Folders, Drag & Drop in Hyper-V and VirtualBox

Shared folders are useful for file exchange between different machines and can be used for copying files from a host OS to a guest OS and vice versa.

Hyper-V doesn’t include such a built-in feature. You can manually share a folder in your host OS using the Windows GUI or PowerShell and provide access to that folder for specified users or groups used in a guest OS. You can also use the Copy-VMFile PowerShell cmdlet in Hyper-V virtual environments as an alternative method to copy files between physical and virtual machines.

Hyper-V supports attaching only USB storage devices to a guest operating system. You cannot attach USB HASP keys, printers, scanners, and other peripheral and multimedia devices to Hyper-V VMs.

VirtualBox includes a built-in Shared Folders feature that can be easily enabled from the VirtualBox user interface to transfer files between the VirtualBox host machine and guest machine:

  • Open VM Settings and select Shared Folders.
  • Add Share: Set a folder path (the folder is located on the host machine, for example, C:\temp).
  • Enter a folder name that would be displayed in the guest OS.

If needed, enable or disable the following options for shared folders: Read-only, Auto Mount, and Make Permanent by selecting the respective checkboxes. Note that VirtualBox Guest Additions must be installed on the guest OS.

Adding shared folders in VirtualBox

Shared Clipboard is a feature to copy and paste data such as text from a host to guest. Hyper-V Integration Services or VirtualBox Guest Additions must be installed in a guest OS for this feature. Both Hyper-V and VirtualBox products support the shared clipboard feature. VirtualBox additionally supports copying and pasting files via a shared clipboard.

Drag & drop is a feature for GUI that allows you to move objects, such as files or folders, from one part of the screen to another. In the context of a virtualization environment, Drag & Drop allows you to move files or folders from a host machine to a guest machine and the other way round. However, Hyper-V doesn’t support drag & drop.

In VirtualBox go to Devices > Drag & Drop and select the direction (you can select bidirectional) to enable this feature.

Thoughts. VirtualBox is the winner in the category of transferring data between host and guest in this VirtualBox vs Hyper-V comparison. VirtualBox has rich functionality for this purpose and is more convenient. Hyper-V doesn’t support drag & drop files and Hyper-V file transferring features are related to the Remote Desktop Protocol. You can configure a shared folder manually as it is done in Windows to exchange files with Hyper-V VMs. While in VirtualBox, there is the “one-click” feature to use shared folders.

Hyper-V vs VirtualBox Security

Hyper-V supports VM encryption using Key Storage Drive and virtual TPM. Generation 2 VMs support using vTPM (virtual Trusted Platform Module) but not Generation 1 VMs. Gen2 VMs in Hyper-V support Secure Boot for Windows and Linux guests. Generation 1 VMs use a special file – Key Storage Drive – to store BitLocker secrets. The file is attached to the VM’s virtual IDE controller and is used instead of a vTPM to store BitLocker secrets.

Hyper-V can encrypt both VMs and VM migration traffic. For this purpose, Hyper-V has a feature called Shielded Virtual Machines. Host Guardian Service has been present since Windows Server 2016 to define legitimate Hyper-V hosts that can run VMs in a datacenter.

VirtualBox can encrypt data stored on VM virtual disks. VirtualBox supports 256-bit or 128-bit data encryption keys (DEK). You should keep a VM configuration file in which the DEK is stored in a safe place and make sure not to lose this file.

Virtual disk images of different formats encrypted in VirtualBox cannot be used in other software used for virtualization. The AES algorithm in XTS mode is used for VM data encryption. A user must enter the password when starting an encrypted VM.

Starting from VirtualBox 7.0, emulation of TPM 2.0 chips is available and Secure Boot is supported. This feature allows you to run the latest Windows versions on VMs in VirtualBox.

Thoughts. Encryption methods used in both hypervisors are strong enough. However, we should mention in this Hyper-V vs VirtualBox comparison that Hyper-V encryption settings can meet the needs of large virtual environments with more secure and better migration of VMs between hosts.

Hyper-V vs VirtualBox Licensing

Hyper-V is comes with Windows client and server versions, which require a paid license for use. You can read about Windows Server licensing options and Windows Server licensing for virtual machines to learn more. There is a free alternative, a standalone solution called Hyper-V Server. Hyper-V Server is a hypervisor with a command line interface with limited functionality compared to the full-featured paid version of Hyper-V for Windows.

VirtualBox is an open-source solution provided by the GNU General Public License, version 2. The VirtualBox Extension pack, which enhances VirtualBox capabilities, is also free for personal use but not open source. VirtualBox Extension Pack is distributed via VirtualBox Extension Pack Personal Use and Evaluation License.

VirtualBox Extension Pack enables features such as USB 2.0 and USB 3.0 device pass-through, VM encryption, PXE boot, VRDP, host webcam pass-through, PCI pass-through, integration with Oracle Cloud, among other features.

Conclusion

There is no universal answer on what to use – VirtualBox or Hyper-V. The choice depends on your requirements and the product features you need. Whatever you choose, make sure to implement a VM backup strategy. NAKIVO Backup & Replication is a comprehensive data protection solution for physical servers and virtual machines, including Microsoft Hyper-V VMs.

1 Year of Free Data Protection: NAKIVO Backup & Replication

1 Year of Free Data Protection: NAKIVO Backup & Replication

Deploy in 2 minutes and protect virtual, cloud, physical and SaaS data. Backup, replication, instant recovery options.

People also read