How to Add Wireless to a VMware Virtual Machine

Have you ever had the need to add wireless to a virtual machine? There are many use cases that come to mind. However, the other day, I had a specific need to test a connection from the “outside” rather than the LAN as this was the easiest way to troubleshoot a specific connectivity issue. This can be especially handy instead of having to create firewall exceptions and other network hoops just to allow connectivity for a single test or simple pass/fail type scenario. In this quick post, I will show you how to add wireless to a VMware virtual machine and show you how to quickly connect a VM running in vSphere ESXi to a wireless network.

Wireless connectivity in a vSphere Virtual Machine Use cases

Have you ever had that time where you wish you just could make a quick connection from the outside on a development machine that you may have running inside vSphere ESXi? I have certainly been there and it can be frustrating to jump through hoops to create VLANs or connect to a vSwitch and then add firewall rules just for a simple test or troubleshooting session.

I was in this situation just the other day and remembered, “wait I have a tiny USB wireless adapter.” You probably know where I am going with this.

How to Add Wireless to a VMware Virtual Machine

If you have a small USB wireless adapter, don’t forget about USB passthrough from your ESXi host. If you have a small USB wireless device, an available USB port on your ESXi host, and a hotspot on your phone, you can connect your VMware virtual machine to a wireless connection in under 5 minutes.

An example of a very similar USB device to the one I used as a POC is found here:

Amazon.com: Cudy AC 650Mbps USB WiFi Adapter for PC, 5GHz/2.4GHz WiFi Dongle, WiFi USB, USB Wireless Adapter for Desktop/Laptop – Nano Size, Compatible with Windows XP/7/8/8.1/10, Mac OS: Electronics

USB-wireless-network-adapter-for-connecting-a-VMware-vSphere-virtual-machine How to Add Wireless to a VMware Virtual Machine
USB wireless network adapter for connecting a VMware vSphere virtual machine

If you have one of these little USB wireless network dongles, you can plug into your ESXi host and add a Host USB Device to your virtual machine you want to allow wireless connectivity.

Adding-a-Host-USB-device-for-wireless-network-connectivity How to Add Wireless to a VMware Virtual Machine
Adding a Host USB device for wireless network connectivity

After adding the device to the ESXi host, it appears as a Realtek 802.11n NIC.

Realtek-USB-wireless-802.11n-adapter-added-to-a-VMware-virtual-machine How to Add Wireless to a VMware Virtual Machine
Realtek USB wireless 802.11n adapter added to a VMware virtual machine

Now, in Windows, the process to connect to the wireless network is exactly what you are used to. Simply scan for wireless networks and connect to the network of choice.

Wireless-network-connected-and-added-to-the-VMware-vSphere-virtual-machine-1 How to Add Wireless to a VMware Virtual Machine
Wireless network connected and added to the VMware vSphere virtual machine

Security hats on

Connecting a VMware vSphere virtual machine to a wireless network is not something you want to do “willy nilly” without any thought about what you are doing. Exposing an internal network to a wireless network, especially any that are insecure can open up grave security risks.

Keep in mind this was done in a very controlled manner. The wireless network was connected and active on the above virtual machine for a total of about 10 minutes and was connected to my phone’s hotspot and then disconnected once a simple connectivity test was performed.

Thinking outside the box

Hopefully this little demonstration of what is possible in situations where testing network connectivity from the “outside” may be extremely difficult. However, it may be needed to narrow down on a particular issue. By using a cheap USB wireless network dongle, ESXi USB passthrough, and a quickly configured wireless hotspot on a cell phone, you can quickly connect your VMware virtual machine running in vSphere to a wireless network.

Post a Comment

0 Comments