我有一台运行 Ubuntu 23.10 的笔记本电脑,运行 VirtualBox 图形用户界面版本 7.0.10_Ubuntu r158379
当我启动 Virtual Box 界面时,它立即弹出错误:
Failed to enumerate host USB devices.
Could not load the Host USB Proxy service: VERR_DISK_FULL.
Result Code:
NS_ERROR_FAILURE (0X00004005)
Component:
HostWrap
Interface:
IHost {e54f6256-97a7-4947-8a78-10c013ddf4b8}
该笔记本电脑安装了 ZFS 文件系统,拥有超过 1 TB 的可用空间:
$ zfs list
NAME USED AVAIL REFER MOUNTPOINT
UbuntuZFS 6.10T 1.02T 192K none
UbuntuZFS/home 1.93T 1.02T 1.84T /home
UbuntuZFS/replicant 4.10T 1.02T 4.10T /mnt/replicant
UbuntuZFS/root 78.7G 1.02T 58.6G /
我尝试删除并重新安装 VBox 扩展包,但错误并没有改变。
在打开任何虚拟机之前都会弹出此错误。
Syslog 包含以下信息:
023-11-15T14:44:07.550689-05:00 fafnir kernel: [12360.888264] UBSAN: array-index-out-of-bounds in /var/lib/dkms/virtualbox/7.0.10/build/vboxdrv/common/log/log.c:551:41
2023-11-15T14:44:07.582740-05:00 fafnir kernel: [12360.921116] UBSAN: array-index-out-of-bounds in /var/lib/dkms/virtualbox/7.0.10/build/vboxnetflt/linux/VBoxNetFlt-linux.c:861:45
2023-11-15T14:44:07.582757-05:00 fafnir kernel: [12360.921373] UBSAN: array-index-out-of-bounds in /var/lib/dkms/virtualbox/7.0.10/build/vboxnetflt/linux/VBoxNetFlt-linux.c:930:19
2023-11-15T14:44:07.582766-05:00 fafnir kernel: [12360.921529] UBSAN: array-index-out-of-bounds in /var/lib/dkms/virtualbox/7.0.10/build/vboxnetflt/linux/VBoxNetFlt-linux.c:931:19
2023-11-15T14:44:07.587163-05:00 fafnir kernel: [12360.921679] UBSAN: array-index-out-of-bounds in /var/lib/dkms/virtualbox/7.0.10/build/vboxnetflt/linux/VBoxNetFlt-linux.c:937:19
2023-11-15T14:44:07.587179-05:00 fafnir kernel: [12360.921827] UBSAN: array-index-out-of-bounds in /var/lib/dkms/virtualbox/7.0.10/build/vboxnetflt/linux/VBoxNetFlt-linux.c:1213:9
2023-11-15T14:44:07.587187-05:00 fafnir kernel: [12360.921998] UBSAN: array-index-out-of-bounds in /var/lib/dkms/virtualbox/7.0.10/build/vboxnetflt/linux/VBoxNetFlt-linux.c:917:15
2023-11-15T14:44:07.587228-05:00 fafnir kernel: [12360.922224] UBSAN: array-index-out-of-bounds in /var/lib/dkms/virtualbox/7.0.10/build/vboxnetflt/linux/VBoxNetFlt-linux.c:918:15
2023-11-15T14:44:07.587240-05:00 fafnir kernel: [12360.922404] UBSAN: array-index-out-of-bounds in /var/lib/dkms/virtualbox/7.0.10/build/vboxnetflt/linux/VBoxNetFlt-linux.c:919:15
2023-11-15T14:44:29.942888-05:00 fafnir kernel: [12383.281184] UBSAN: array-index-out-of-bounds in /var/lib/dkms/virtualbox/7.0.10/build/vboxnetflt/linux/VBoxNetFlt-linux.c:943:19
2023-11-15T14:44:29.942918-05:00 fafnir kernel: [12383.281600] UBSAN: array-index-out-of-bounds in /var/lib/dkms/virtualbox/7.0.10/build/vboxnetflt/linux/VBoxNetFlt-linux.c:944:19
2023-11-15T14:44:29.946752-05:00 fafnir kernel: [12383.281976] UBSAN: array-index-out-of-bounds in /var/lib/dkms/virtualbox/7.0.10/build/vboxnetflt/linux/VBoxNetFlt-linux.c:945:19
2023-11-15T14:44:58.114804-05:00 fafnir kernel: [12411.453334] UBSAN: array-index-out-of-bounds in /var/lib/dkms/virtualbox/7.0.10/build/vboxnetflt/linux/VBoxNetFlt-linux.c:951:23
2023-11-15T14:44:58.114817-05:00 fafnir kernel: [12411.453681] UBSAN: array-index-out-of-bounds in /var/lib/dkms/virtualbox/7.0.10/build/vboxnetflt/linux/VBoxNetFlt-linux.c:952:23
2023-11-15T14:44:58.118746-05:00 fafnir kernel: [12411.453981] UBSAN: array-index-out-of-bounds in /var/lib/dkms/virtualbox/7.0.10/build/vboxnetflt/linux/VBoxNetFlt-linux.c:958:23
2023-11-15T14:44:58.118774-05:00 fafnir kernel: [12411.454281] UBSAN: array-index-out-of-bounds in /var/lib/dkms/virtualbox/7.0.10/build/vboxnetflt/linux/VBoxNetFlt-linux.c:1222:13
2023-11-15T14:52:00.059611-05:00 fafnir dbus-daemon[2333]: [system] Activating via systemd: service name='org.freedesktop.hostname1' unit='dbus-org.freedesktop.hostname1.service' requested by ':1.182' (uid=1000 pid=45623 comm="/usr/lib/virtualbox/VirtualBox" label="unconfined")
2023-11-16T08:25:23.667358-05:00 fafnir kernel: [76038.004783] input: BM20X-5.0 as /devices/virtual/misc/uhid/0005:000E:3412.0008/input/input34
2023-11-16T08:25:23.739025-05:00 fafnir /usr/libexec/gdm-x-session[4725]: (**) Option "config_info" "udev:/sys/devices/virtual/misc/uhid/0005:000E:3412.0008/input/input34/event4"
2023-11-16T12:32:34.048520-05:00 fafnir kernel: [90867.964254] UBSAN: array-index-out-of-bounds in /var/lib/dkms/virtualbox/7.0.10/build/vboxdrv/common/log/log.c:1558:29
2023-11-16T12:37:05.988567-05:00 fafnir kernel: [91139.906740] UBSAN: array-index-out-of-bounds in /var/lib/dkms/virtualbox/7.0.10/build/vboxdrv/SUPDrvGip.c:648:59
2023-11-16T12:37:05.988587-05:00 fafnir kernel: [91139.906898] UBSAN: array-index-out-of-bounds in /var/lib/dkms/virtualbox/7.0.10/build/vboxdrv/SUPDrvGip.c:647:59
2023-11-16T12:38:40.046438-05:00 fafnir dbus-daemon[2333]: [system] Activating via systemd: service name='org.freedesktop.hostname1' unit='dbus-org.freedesktop.hostname1.service' requested by ':1.263' (uid=1000 pid=45623 comm="/usr/lib/virtualbox/VirtualBox" label="unconfined")
2023-11-16T12:53:44.923189-05:00 fafnir systemd[4532]: app-gnome-virtualbox-86937.scope: Failed to add control inotify watch descriptor for control group /user.slice/user-1000.slice/[email protected]/app.slice/app-gnome-virtualbox-86937.scope: No space left on device
2023-11-16T12:53:44.923464-05:00 fafnir systemd[4532]: app-gnome-virtualbox-86937.scope: Failed to add memory inotify watch descriptor for control group /user.slice/user-1000.slice/[email protected]/app.slice/app-gnome-virtualbox-86937.scope: No space left on device
2023-11-16T12:53:44.944988-05:00 fafnir systemd[4532]: Started app-gnome-virtualbox-86937.scope - Application launched by gnome-shell.
2023-11-16T12:53:45.002296-05:00 fafnir virtualbox.desktop[86937]: Qt CRITICAL: inotify_add_watch(/home/alan/.config/ibus/bus/4ac0e7f5903b1e1023748f9563b86a21-unix-1) failed: (No space left on device)
关于如何解决,有什么想法吗?
答案1
进一步的网络研究表明,系统日志中的错误消息抱怨的是 inotify 监视不足,而不是磁盘空间不足。
我已经编辑了 /etc/syctl.conf 以允许 100,000 个监视,但显然这还不够。
我把观看次数增加到了
fs.inotify.max_user_watches=2097152
重新启动后,USB 即可正常运行。