VM:启动域时出错:未找到 USB 设备

VM:启动域时出错:未找到 USB 设备

我有一个正在运行的虚拟机,不会意外加载。在CentOS7中使用virt-manager

错误是

Error Starting Domain: internal error: Did not find USB device 05ac:12a8

05ac:12a8我在 QEMU GUI 中看到 USB 设备。

我不知道服务器上的 USB 设备是什么,因为这是虚拟化。

虚拟机错误

以下是错误的详细信息:

Error starting domain: internal error: Did not find USB device 05ac:12a8

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 89, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 125, in tmpcb
    callback(*args, **kwargs)
  File "/usr/share/virt-manager/virtManager/libvirtobject.py", line 82, in newfn
    ret = fn(self, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/domain.py", line 1506, in startup
    self._backend.create()
  File "/usr/lib64/python2.7/site-packages/libvirt.py", line 1080, in create
    if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self)
libvirtError: internal error: Did not find USB device 05ac:12a8

libvirtdstatus 还确认未找到设备:

[orca@orcacomputers ~]$ systemctl status libvirtd -l
● libvirtd.service - Virtualization daemon
   Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled; vendor preset: enabled)
   Active: active (running) since Wed 2021-09-22 15:44:22 PDT; 12min ago
     Docs: man:libvirtd(8)
           https://libvirt.org
 Main PID: 2419 (libvirtd)
    Tasks: 17 (limit: 32768)
   Memory: 23.4M
   CGroup: /system.slice/libvirtd.service
           └─2419 /usr/sbin/libvirtd

Sep 22 15:44:23 orcacomputers libvirtd[2419]: 2021-09-22 22:44:23.269+0000: 2523: error : storageDriverAutostartCallback:209 : internal error: Failed to autostart storage pool 'CentOS': cannot open directory '/mnt/raid5/VM/CentOS': No such file or directory
Sep 22 15:44:23 orcacomputers libvirtd[2419]: 2021-09-22 22:44:23.295+0000: 2523: error : virUSBDeviceFindByVendor:229 : internal error: Did not find USB device 05ac:12a8
Sep 22 15:44:23 orcacomputers libvirtd[2419]: 2021-09-22 22:44:23.386+0000: 2523: warning : virHostdevReAttachUSBDevices:1922 : Unable to find device 000.000 in list of active USB devices
Sep 22 15:44:23 orcacomputers libvirtd[2419]: 2021-09-22 22:44:23.386+0000: 2523: warning : virHostdevReAttachUSBDevices:1922 : Unable to find device 000.000 in list of active USB devices
Sep 22 15:44:23 orcacomputers libvirtd[2419]: 2021-09-22 22:44:23.386+0000: 2523: warning : virHostdevReAttachUSBDevices:1922 : Unable to find device 000.000 in list of active USB devices
Sep 22 15:44:23 orcacomputers libvirtd[2419]: 2021-09-22 22:44:23.386+0000: 2523: error : qemuAutostartDomain:258 : internal error: Failed to autostart VM 'Debian': internal error: Did not find USB device 05ac:12a8
Sep 22 15:45:18 orcacomputers libvirtd[2419]: 2021-09-22 22:45:18.706+0000: 2473: error : virUSBDeviceFindByVendor:229 : internal error: Did not find USB device 05ac:12a8
Sep 22 15:45:18 orcacomputers libvirtd[2419]: 2021-09-22 22:45:18.706+0000: 2473: warning : virHostdevReAttachUSBDevices:1922 : Unable to find device 000.000 in list of active USB devices
Sep 22 15:45:18 orcacomputers libvirtd[2419]: 2021-09-22 22:45:18.706+0000: 2473: warning : virHostdevReAttachUSBDevices:1922 : Unable to find device 000.000 in list of active USB devices
Sep 22 15:45:18 orcacomputers libvirtd[2419]: 2021-09-22 22:45:18.706+0000: 2473: warning : virHostdevReAttachUSBDevices:1922 : Unable to find device 000.000 in list of active USB devices

答案1

笼统:

05ac:12a8是USB总线的标识符。默认情况下它们不可用,必须手动添加。只需删除有问题的设备就可以让虚拟机启动。如果您不想允许虚拟机访问 USB 设备,您也可以删除所有三个。

在执行此操作之前,建议像往常一样备份虚拟机。默认保存路径为/var/lib/libvirt/images,扩展名为.qcow.我还建议检查/var/lib/libvirt/qemu/save- 如果机器处于保存状态,您会在这里找到一个名称匹配但扩展名相同的文件.save。如果删除 USB 总线导致出现问题,只需将文件复制回原始位置即可轻松恢复当前状态。

在这个具体案例中:

还有留言

cannot open directory '/mnt/raid5/VM/CentOS'

这可以指创建 VM 时连接到该 USB 总线的实际 USB 存储。我显然无法知道,你只能测试一下。因此,请在更改任何内容之前备份文件。

相关内容