Site icon TechGit

How to Improve Network Performance in Windows VirtualBox Guests

 

Oracle VirtualBox is a type-2 hypervisor that is popular on Windows, macOS, Linux, and Solaris. For years I used VMWare Workstation and then switched to Hyper-V when it became part of Windows 8, largely because it was free and promised better performance as a type-1 hypervisor.

Then earlier this year, I decided to give VirtualBox a spin. I was curious as to why some people preferred it over Hyper-V. Initially, I was doubtful that VirtualBox could provide the same performance as Hyper-V but in practice, I’ve found the difference between the two to be negligible. But the main reason I’m still using VirtualBox is that it is more user-friendly if you need to interact with the VM. For example, VirtualBox supports file drag and drop between host and source, and vice versa. USB passthrough support is also more seamless than Hyper-V.

VirtualBox might be easier to use than Hyper-V but not everything is great. For instance, trying to get a high screen resolution inside virtual machines (VM) seems almost impossible. Also, 64-bit VMs aren’t supported in VirtualBox if another hypervisor, like Hyper-V, is also installed on the system. And to be fair to Hyper-V, it is a server solution that is provided in Windows 10 for the convenience of IT professionals rather than as a user-friendly virtualization solution for everyone.

But while I’ve found performance in VirtualBox to be excellent, one aspect hasn’t lived up to expectations. Using the default network configuration, browsing the web and transferring files is frustratingly sluggish.

Install a Paravirtualized Network Adapter

After some digging around, it seems that VirtualBox is optimized for Linux guests. Oracle’s documentation suggests the best way to get optimal network performance is to use the Paravirtualized Network (virtio-net) adapter type. By default, if you use the out-of-the-box settings, VirtualBox uses an emulated Intel PRO/1000 MT adapter for Windows VMs. But I discovered this is the root of the performance issue.

Unfortunately, it’s not quite as simple as just changing the Adapter Type field to Paravirtualized Network under Advanced in your VM’s network settings. You will also need to load drivers into Windows before you can use this adapter type. In the instructions below, I show you how to change your adapter type and get it working for better network performance. Before you follow the instructions, you should have at least one VM configured in VirtualBox using the default settings for Windows 10.

Before you can change the network settings for the VM, you need to make sure that it isn’t running. If the VM is running, log in and shut it down before proceeding.

How to Improve Network Performance in Windows VirtualBox Guests (Image Credit: Russell Smith) How to Improve Network Performance in Windows VirtualBox Guests (Image Credit: Russell Smith)

Download Paravirtualized Network Adapter Drivers for Windows

To get the network adapter working again, you’ll need to download and install drivers for the device. Red Hat maintains signed Windows drivers for paravirtualized network adapters, which you can download here. Scroll down to Direct downloads and download the stable virtio-win iso.

How to Improve Network Performance in Windows VirtualBox Guests (Image Credit: Russell Smith) How to Improve Network Performance in Windows VirtualBox Guests (Image Credit: Russell Smith)

Install Virtio-Win Drivers in Windows

Now all that’s left to do is install the drivers in Windows. First, we’ll attach the ISO to your VM and then use Device Manager to install the driver.

How to Improve Network Performance in Windows VirtualBox Guests (Image Credit: Russell Smith) How to Improve Network Performance in Windows VirtualBox Guests (Image Credit: Russell Smith)
How to Improve Network Performance in Windows VirtualBox Guests (Image Credit: Russell Smith) How to Improve Network Performance in Windows VirtualBox Guests (Image Credit: Russell Smith)
How to Improve Network Performance in Windows VirtualBox Guests (Image Credit: Russell Smith) How to Improve Network Performance in Windows VirtualBox Guests (Image Credit: Russell Smith)
How to Improve Network Performance in Windows VirtualBox Guests (Image Credit: Russell Smith) How to Improve Network Performance in Windows VirtualBox Guests (Image Credit: Russell Smith)

Once the installation has completed, Device Manager will refresh automatically and display Red Hat VirtIO Ethernet Adapter instead of a generic Ethernet Controller that it doesn’t recognize. If you close Device Manager, you should see the network adapter is now working in Windows. Not only should it be working but it should work quickly and support up to 10GB transfer speeds.

Further Improving Network Performance

There are several different types of network you can configure in VirtualBox, including Network Address Translation (NAT), Internal, and Bridged. They all have their uses, and advantages and disadvantages. Check out 6.11. Improving Network Performance in Oracle’s documentation here to get a better idea of the performance of each network type.

The post How to Improve Network Performance in Windows VirtualBox Guests appeared first on Petri.

FacebookTwitterTumblrRedditLinkedInHacker NewsDiggBufferGoogle ClassroomThreadsXINGShare
Exit mobile version