How to Install VirtualBox USB Wi-Fi Adapter inside VMs
In this article, describe how to install a USB Wi-Fi adapter into the virtual machine. My goal was to have the virtual machine completely isolated on a separate network than the host; hence, the VM now has no network connections shared with the host.
To install the USB Wi-Fi adapter properly, and avoid blue screens on the host, I had to go through several steps, which I summarize below:
1. Update VirtualBox to latest version 6.1.26
2. Install the extensions pack on the host
3. Update the extensions inside the VM
4. Reboot host and VM
5. Plug in the USB WI-FI adapter to the host
6. Check the product ID and vendor ID in the device settings of the adapter.
The product and vendor IDs for my adapter (TP-Link USB Wireless adapter TL-WN823N) are shown below. This screen is accessible inside the Device Manager in Windows (click image to enlarge):
Import Step: Do not install a driver for your USB stick on the host. If a driver is already present, uninstall and delete the driver so that when you plug in the stick, it no longer shows up on the host.
Next, go to the VM’s USB settings in VirtualBox with the VM off and create a new USB filter as shown below, you need to enter the product and vendor ID and click OK:
Once it’s all done, boot up the VM. It should go through the steps needed to install the USB WIFI driver. Then you go ahead and connect to a WIFI network inside the VM.
Benefits of this Solution
This solution provides 100% isolation from the host. The host no longer shares its network with the VM. If you have access to several different wireless networks, this setup ensures no traffic from the host affects the VM and vice versa. For example, if you wanted to test malware, if you wanted to isolate the VM for browsing the web, simulating external access to your internal network, or whatever other reason to isolate the VM, this is a simple and cost-effective way of doing it.
If you need an occasional network connection to the VM from the host or between VMs, you could install a virtual switch and temporary, second network adapter with the host.
VirtualBox Backup Solution
Since you are using VirtualBox, do you have an automatic Virtualbox backup? Especially for important virtual machines, it makes sense to invest in a robust and fully automated backup solution that backs up the VMs in an efficient manner, saving time and storage spaces.