Bug 1883008

Summary: After upgrade to F33, can't start VMs: Error launching details: 'modelType'
Product: [Fedora] Fedora Reporter: Tomasz Torcz <tomek>
Component: virt-managerAssignee: Cole Robinson <crobinso>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 33CC: berrange, crobinso, philip.wyett
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: virt-manager-3.1.0-1.fc33 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-10-03 00:56:35 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
virt-manager --debug
none
sudo virsh domcapabilities none

Description Tomasz Torcz 2020-09-27 12:42:43 UTC
Description of problem:
After upgrade to Fedora 33, can't open virtual machines:

Error launching details: 'modelType'

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/vmwindow.py", line 40, in get_instance
    cls._instances[key] = vmmVMWindow(vm)
  File "/usr/share/virt-manager/virtManager/vmwindow.py", line 80, in __init__
    self._details = vmmDetails(self.vm, self.builder, self.topwin,
  File "/usr/share/virt-manager/virtManager/details/details.py", line 421, in __init__
    self._init_details()
  File "/usr/share/virt-manager/virtManager/details/details.py", line 837, in _init_details
    vmmAddHardware.build_video_combo(self.vm, video_dev)
  File "/usr/share/virt-manager/virtManager/addhardware.py", line 793, in build_video_combo
    default = DeviceVideo.default_model(vm.xmlobj)
  File "/usr/share/virt-manager/virtinst/devices/video.py", line 43, in default_model
    guest.lookup_domcaps().supports_video_bochs()):
  File "/usr/share/virt-manager/virtinst/domcapabilities.py", line 337, in supports_video_bochs
    models = self.devices.video.get_enum("modelType").get_values()
  File "/usr/share/virt-manager/virtinst/domcapabilities.py", line 49, in get_enum
    return d[name]
KeyError: 'modelType'



Version-Release number of selected component (if applicable):
virt-manager-3.0.0-1.fc33.noarch

How reproducible:
Always

Steps to Reproduce:
1. Upgrade to F33
2. Start virt-manager
3. Open any existing virtual machine.

Actual results:


Expected results:


Additional info:

Comment 1 Cole Robinson 2020-09-27 19:58:30 UTC
Thanks for the report. Can you provide

* `virt-manager --debug` output: start the app, reproduce the issue, close the app, attach everything that was output
* output of: sudo virsh domcapabilities

Comment 2 Tomasz Torcz 2020-09-28 05:43:59 UTC
Created attachment 1717197 [details]
virt-manager --debug

Relevant line seem to be:

ValueError: Host does not support domain type kvm with machine 'pc-0.14' for virtualization type 'hvm' arch 'x86_64'

Comment 3 Tomasz Torcz 2020-09-28 05:44:37 UTC
Created attachment 1717198 [details]
sudo virsh domcapabilities

Comment 4 Tomasz Torcz 2020-09-28 05:47:03 UTC
Change in QEMU 5.0:
* The pc-0.12, pc-0.13, pc-0.14, pc-0.15 machines have been removed. Newer versions of the machine type should be used instead.

So I guess virt-manager or libvirt should migrate existing machines to newer models?

Comment 5 Cole Robinson 2020-09-28 17:58:48 UTC
Thanks for the info. I fixed that issue upstream now:

commit f7bd274a556070f27749609d179528de7f8add47 (HEAD -> master)
Author: Cole Robinson <crobinso>
Date:   Mon Sep 28 13:44:34 2020 -0400

    domcaps: Fix error if enum not found


migrating these automatically is tricky, there's a lot of things to consider. 

The fix for any of the 'pc-X.X' cases is use the virt-manager XML editor and replace that string with just 'pc', which will update the VM to the latest machine type alias.

I guess we will have to see how often this happens in practice now that qemu is removing old machine types

Comment 6 Fedora Update System 2020-09-30 22:28:52 UTC
FEDORA-2020-c30055ffe4 has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2020-c30055ffe4

Comment 7 Fedora Update System 2020-10-01 01:20:51 UTC
FEDORA-2020-c30055ffe4 has been pushed to the Fedora 33 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-c30055ffe4`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-c30055ffe4

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 8 Fedora Update System 2020-10-03 00:56:35 UTC
FEDORA-2020-c30055ffe4 has been pushed to the Fedora 33 stable repository.
If problem still persists, please make note of it in this bug report.