In this chapter, we will explore the procedure of incorporating a USB device into a vSphere environment. This chapter covers the preparations, including an explanation of the concept of USB passthrough, and provides a step-by-step guide to configuring and handling USB devices in vSphere. By the end of this chapter, you will understand how to enhance your VM’s capabilities by enabling USB connectivity, which guarantees a versatile and practical setup for different scenarios.

Adding a USB device to a vSphere and making it available to a VM is a similar the task of configuring DirectPath I/O passthrough discussed in Chapter 26.

Figure 27-1 shows the workflow and the ESXi host bypass to provide USB Device Passthrough, using an external USB disk to provide access directly to the VM virtual disk.

Figure 27-1
A process flow of E S X I host bypass. It includes E S X I hypervisor, guest O S kernel, virtual disk, and U S B device external disk. Two arrows denote the direct path of I O through V M D K.

(Add a USB device to vSphere 1 of 4)

27.1 Enable USB Devices in the ESXi Host

First, you need to connect your USB device to a USB entry in your ESXi host and then reboot the ESXi host. Then, add a host USB device to the VM that you want to use this USB device. After you have a USB device, vSphere recognizes the USB device and shows it (in this example, I used an 4TB external disk).

The following types of USB devices are typically not supported for passthrough from an ESXi host to a virtual machine:

  • USB devices with a bootable HID interface, such as mice and keyboards

  • Real-time video cameras and audio devices that use isochronous data transfers

  • Devices on which an ESXi host is installed

  • USB CCID (chip/smart card interface) devices

  • USB hubs

Figure 27-2
A screenshot of the edit settings of virtual hardware. The right side of the screen includes C P U, memory, hard disk, network adapters, and others. On the left side, add a new device option and host U S B device under disk, drives, and storage are squared.

(Add a USB device to vSphere 2 of 4)

Figure 27-3
A screenshot of the new host U S B device and Seagate R S S expansion option. It includes a select host device and V motion support options below.

(Add a USB device to vSphere 3 of 4)

27.2 Adding a USB Device to vSphere with vMotion Support

In vSphere, when you add a USB device to a host, you can select the option to support vMotion while the device is connected. This means that even if a VM is migrated to another host using vMotion, the USB device remains connected to the VM, allowing for a seamless transition without interrupting the USB device’s functionality.

The option Support vMotion while device is connected (see Figure 27-3) facilitates the movement of a VM with a connected USB device from one host to another without disruption. However, certain restrictions apply. For instance, all USB devices must be configured for vMotion, and the VM cannot be stopped or paused during the process. Additionally, the migration might fail if one or more devices are not enabled for vMotion.

Note

If you do not plan to migrate a virtual machine with USB devices attached, deselect the Support vMotion option. This action reduces migration complexity, which results in better performance and stability.

We will not enable this option for our test lab since we don’t need it.

After you add the USB device to your VM, power it on, and you can now use the external disk in your Guest OS. Figure 27-4 shows my 4TB external disk available to be used in a Windows Server VM.

Figure 27-4
A window page of two screens titled, device manager and disk management. Seagate expansion U S B device and V M ware virtual disk S C S I disk device under disk manager and H D external under disk management are squared.

(Add a USB device to vSphere 4 of 4)

27.3 Summary

This brief chapter discussed integrating USB devices with ESXi hosts and improving the capabilities of your environment. In Chapter 28, we move on to an essential task in vSphere management: resetting and changing the vCenter root password. Chapter 28 will guide you through a step-by-step process to securely reset and modify the root password of your vCenter Server. This procedure is crucial for you to maintain access to the management hub of your vSphere environment.