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__
  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__
  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
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?

  • Looks like some kind of bug. I would report it on launchpad. Feb 19, 2021 at 18:46

1 Answer 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

  • Bingo! My .config directory was owned by root for some reason. I’ve deleted it (since there wasn’t anything important in there) and it got recreated with correct permissions. Thanks so much!
    – aaronk6
    May 5, 2021 at 17:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.