Description of problem: virt-manager 默认配置虚拟机以 spcie 显示启动后,无法切换为 vnc 显示 libvirt 报错信息: libvirt.libvirtError: unsupported configuration: chardev 'spicevmc' not supported without spice graphics Version-Release number of selected component (if applicable): kernel版本 5.10.134-16.2_rc1.an23.loongarch64 qemu版本 6.2.0-4.an23 libvirt版本 9.9.0 virt-manager版本 4.1.0 Steps to Reproduce: 1. virt-manager默认配置虚拟机以 spcie 显示启动,然后关机 2. 将 Display Spice 修改为 VNC,点击Apply Actual results: libvirt 报错: libvirt.libvirtError: unsupported configuration: chardev 'spicevmc' not supported without spice graphics Expected results: 修改成功,切换为 vnc 显示 Additional info: x86 AnolisOS-23 也有此问题
问题由libvirt社区patch引入: https://listman.redhat.com/archives/libvir-list/2022-May/231225.html 无共有问题,目前libvirt社区没有人报bug,virt-manager可以通过删除硬件 Channel(spice) 同时通过编辑xml,删除以下行 <graphics type="spice" autoport="yes"> <listen type="address"/> <image compression="off"/> </graphics> <audio id="1" type="spice"/> 可以删除spice显示,然后再添加VNC,问题本质spice和spice audio增加删除缺少联动机制,同时libvirt有增加了spice和spice audio之间的合法性判断导致的