如果VirtualBox无法连接您的USB设备或在您的 Windows 11/10 计算机上显示 无法将 USB 设备连接到虚拟机 (Failed to attach the USB device to the virtual machine )错误,您可以采取以下措施来解决此问题。连接USB(USB)设备(如蓝牙(Bluetooth)连接器、笔式驱动器、Wi-Fi适配器等)时可能会发生此错误。
整个错误消息是这样的:
Failed to attach the USB device [device name] to the virtual machine [virtual machine name].
(VirtualBox)当您的主机可以检测到USB设备时, (USB)VirtualBox会显示此错误,但VirtualBox不能这样做。
VirtualBox无法将USB设备连接到虚拟机
要修复VirtualBox无法将USB设备连接到虚拟机错误,请按照下列步骤操作:
- 安装访客添加
- 启用 USB 控制器
- 安装扩展包
- 安装 USB 驱动程序
要了解有关这些解决方案的更多信息,请继续阅读。
1]安装访客添加
这是您需要解决上述问题的第一件事。为此,您需要运行显示错误的虚拟机并转到 the Devices > Install Guest Additions 按钮。
接下来,您需要按照屏幕说明进行安装。安装过程完成后,您可能需要重新启动虚拟机。
2]启用USB控制器
顾名思义,USB 控制器(USB Controller)是控制连接到虚拟机的 USB 设备的功能。如果您的虚拟机未启用此功能,您可能会遇到问题。要验证,请执行以下操作:
- 在您的计算机上打开VirtualBox 。
- 右键单击(Right-click)虚拟机并选择“ 设置” (Settings )选项。
- 切换到 USB 选项卡。
- 勾选 启用 USB 控制器 (Enable USB Controller )复选框。
- 单击 右侧的加号 图标。(plus )
- 选择未检测到的USB设备。(USB)
- 单击 确定 (OK )按钮。
现在检查您是否可以将USB设备与虚拟机一起使用。
3]安装扩展包
与浏览器扩展一样,VirtualBox 的扩展包(VirtualBox)扩展(Extension Pack)了这个应用程序的功能。因此,如果您还没有安装扩展包,您可以尝试安装。因为您需要从官方网站 virtualbox.org下载它。接下来,您可以这样做:
- 转到 工具 (Tools )并单击 首选项 (Preferences )选项。
- 切换到 扩展 (Extensions )选项卡。
- 单击 加号 (plus )图标。
- 选择下载的扩展包。
- 单击 安装 (Install )按钮。
- 单击 确定 (OK )按钮。
之后,重新启动VirtualBox应用程序并检查它是否解决了您的问题。
4]安装USB驱动程序
您需要手动安装VirtualBox的(VirtualBox)USB驱动程序。尽管在Windows 11(Windows 11)或 Windows 10上它不是强制性的。但是,当您遇到问题时,您可能想要这样做。为此,请按照下列步骤操作:
- (Open File Explorer)在您的计算机上打开文件资源管理器。
- 转至:C:Program Files\Oracle\VirtualBox\drivers\USB
- 打开 设备 (device )文件夹。
- 右键单击 VBoxUSB.inf 文件并选择 安装 (Install )选项。
- 打开 过滤器 (filter )文件夹。
- 右键单击 VBoxUSBMon.inf 并选择 安装 (Install )选项。
- 重新启动计算机上的VirtualBox应用程序。
在那之后,你不应该再遇到这个问题了。
如何让我的虚拟机识别我的USB?
通常,每个虚拟机都会自动检测任何USB设备,而无需外部交互。但是,有时,它可能不会按照所说的去做。此时,您可以尝试安装Guest Additions,启用USB Controller,安装扩展包,然后安装USB驱动程序。
可以在USB上安装虚拟机吗?
有一个名为Portable VirtualBox的工具,您可以使用它在(Portable VirtualBox)USB闪存驱动器上安装虚拟机。但是,在使用USB(USB)驱动器中的虚拟机时,您可能需要考虑一些限制。尽管如此,如果您想在旅行时随身携带虚拟机,您当然可以考虑这种方法。
就这样!希望本指南可以帮助您解决问题。
阅读: (Read: )在 Windows 中未检测到 VirtualBox USB(VirtualBox USB not detected in Windows)。
VirtualBox Failed to attach the USB device to the virtual machine
If VirtualBox fails to attach your USB device or shows Failed to attach the USB device to the virtual machine error on your Windows 11/10 computer, here is what you can do to fix the issue. This error can occur while connecting a USB device such as a Bluetooth connector, pen drive, Wi-Fi adapter, etc.
The entire error message says something like this:
Failed to attach the USB device [device name] to the virtual machine [virtual machine name].
VirtualBox displays this error when your host computer can detect the USB device, but the VirtualBox cannot do the same.
VirtualBox Failed to attach the USB device to the virtual machine
To fix VirtualBox failed to attach the USB device to the virtual machine error, follow these steps:
- Install Guest Additions
- Enable USB Controller
- Install Extension pack
- Install USB driver
To know more about these solutions, keep reading.
1] Install Guest Additions
It is the first thing you need to fix the issue as stated above. For that, you need to run the virtual machine showing the error and go to the Devices > Install Guest Additions button.
Next, you need to follow the screen instructions to get it installed. Once the installation process is complete, you might have to restart the virtual machine.
2] Enable USB Controller
As the name denotes, USB Controller is the function that controls your USB devices attached to the virtual machine. If this feature is not turned on for your virtual machine, you might get the issue. To verify, do the following:
- Open the VirtualBox on your computer.
- Right-click on the virtual machine and select the Settings option.
- Switch to the USB tab.
- Tick the Enable USB Controller checkbox.
- Click the plus icon on the right side.
- Select the USB device that was not being detected.
- Click the OK button.
Now check if you can use your USB device with your virtual machine or not.
3] Install Extension pack
Like browser extensions, the Extension Pack of VirtualBox extends the functionality of this app. Therefore, you could try installing the extension pack if you haven’t done that already. For you need to download it from the official website, virtualbox.org. Next, you can do this:
- Go to Tools and click on the Preferences option.
- Switch to the Extensions tab.
- Click on the plus icon.
- Choose the downloaded extension pack.
- Click the Install button.
- Click the OK button.
After that, restart the VirtualBox app and check if it resolves your issue or not.
4] Install USB driver
You need to install the USB driver for VirtualBox manually. Although it is not mandatory on Windows 11 or Windows 10. However, as you are getting the issue, you might want to do that. For that, follow these steps:
- Open File Explorer on your computer.
- Go to: C:\Program Files\Oracle\VirtualBox\drivers\USB
- Open the device folder.
- Right-click on the VBoxUSB.inf file and select the Install option.
- Open the filter folder.
- Right-click on the VBoxUSBMon.inf and select the Install option.
- Restart the VirtualBox app on your computer.
After that, you should not get the issue anymore.
How do I get my virtual machine to recognize my USB?
Generally, every virtual machine detects any USB device automatically without external interactions. However, at times, it might not do what is said. In such a moment, you can try installing the Guest Additions, enable the USB Controller, install the extension pack, and install the USB driver.
Can you install a virtual machine on a USB?
There is a tool called Portable VirtualBox that you can use to install a virtual machine on a USB flash drive. However, you might have to consider some limitations while using a virtual machine from a USB drive. Nonetheless, if you want to take your virtual machine with you while traveling, you can certainly consider this method.
That’s all! Hope this guide helped you fix the issue.
Read: VirtualBox USB not detected in Windows.