Unable to define, create or start a Virtual Machine using spice or qxl in RHEL 9 KVM
Environment
- Red Hat Enterprise Linux 9
Issue
-
After upgrading from RHEL 8 to 9, some Virtual Machines fails to start.
-
Cannot provision new Virtual Machines in RHEL 9 using spice.
-
Trying to create a Virtual Machine with virt-install using spice graphics fails with:
# virt-install [...] --graphics spice ERROR unsupported configuration: domain configuration does not support video model 'qxl' -
Trying to create a Virtual Machine with virt-install using spice graphics and vga display fails with:
# virt-install [...] --graphics spice --video vga ERROR unsupported configuration: spice graphics are not supported with this QEMU -
Trying to define, edit or start a Virtual Machine with spice graphics fails with:
error: unsupported configuration: spice graphics are not supported with this QEMU
Resolution
- When creating or redefining Virtual Machines please use
--graphics vncin virt-install. - For already existing VMs, please edit each Virtual Machine as shown below.
1. Backup the XML and enter the editor for the VM XML
$ virsh dumpxml VmName > VmNameBkp.xml
$ virsh edit VmName
2. Find these sections below and remove them:
<channel type='spicevmc'>
<target type='virtio' name='com.redhat.spice.0'/>
<address type='virtio-serial' controller='0' bus='0' port='2'/>
</channel>
<audio id='1' type='spice'/>
<redirdev bus='usb' type='spicevmc'>
<address type='usb' bus='0' port='2'/>
</redirdev>
<redirdev bus='usb' type='spicevmc'>
<address type='usb' bus='0' port='3'/>
</redirdev>
3. Find this section
<video>
<model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1' primary='yes'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
</video>
Replace model type 'qxl' with 'vga' and remove the other parameters except for 'primary', as follows:
<video>
<model type='vga' primary='yes'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
</video>
4. Finally, find this section
<graphics type='spice' autoport='yes'>
<listen type='address'/>
<image compression='off'/>
</graphics>
And replace it with VNC:
<graphics type='vnc' port='-1' autoport='yes'>
<listen type='address'/>
</graphics>
5. Save and exit the editor. If some error occur, please investigate the edited XML. Hitting 'n' will roll-back to the pre-edit state.
6. Start the VM
NOTE: your XML domain may contain other settings on each element being edited, you may be able to keep some of those configurations. Please consult the RHEL Documentation for further information.
Root Cause
- SPICE was deprecated in RHEL 8.3 and the server side is now removed in RHEL 9 KVM hosts. See Spice protocol is being deprecated in RHEL 8.3.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.