在 virt-manager 中单击“打开”或“创建新虚拟机”时出现以下错误:
Error launching details: libosinfo: Unexpected file type (0)
Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/vmwindow.py", line 39, in get_instance
cls._instances[key] = vmmVMWindow(vm)
File "/usr/share/virt-manager/virtManager/vmwindow.py", line 76, in __init__
self._details = vmmDetails(self.vm, self.builder, self.topwin,
File "/usr/share/virt-manager/virtManager/details/details.py", line 447, in __init__
self.init_details()
File "/usr/share/virt-manager/virtManager/details/details.py", line 774, in init_details
self._os_list = vmmOSList()
File "/usr/share/virt-manager/virtManager/oslist.py", line 39, in __init__
self._init_state()
File "/usr/share/virt-manager/virtManager/oslist.py", line 55, in _init_state
all_os = virtinst.OSDB.list_os()
File "/usr/share/virt-manager/virtinst/osdict.py", line 274, in list_os
for name, osobj in self._all_variants.items():
File "/usr/share/virt-manager/virtinst/osdict.py", line 198, in _all_variants
loader = self._os_loader
File "/usr/share/virt-manager/virtinst/osdict.py", line 190, in _os_loader
loader.process_default_path()
gi.repository.GLib.GError: libosinfo: Unexpected file type (0)
这是在我从 Ubuntu 18.04 升级到 Ubuntu 20.04 后开始的。
我怎样才能消除这个错误?
答案1
遇到了完全相同的问题。“~/.config”上的权限错误。将所有者设置为“user:user”,错误消失...您可以通过运行“virt-manager --debug”来检查是否存在权限被拒绝的错误