Getting error “libosinfo: Unexpected file type (0)” when trying to create or open VM in virt-manager
I get the following error when clicking “Open” or “Create a new virtual machine” in 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)
This started after I’ve upgraded from Ubuntu 18.04 to Ubuntu 20.04.
How can I get rid of this error?
Solution 1:
Had exactly the same issue. Wrong permissions on "~/.config". Set owner to "user:user" and the error went away...you can check by running "virt-manager --debug" to see if there is a permission denied error