Bug 2172387 - virt-install default spice VM creation fails if qemu-char-spice is not installed
Summary: virt-install default spice VM creation fails if qemu-char-spice is not installed
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: virt-manager
Version: 40
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Cole Robinson
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: CockpitTest
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-02-22 07:57 UTC by Martin Pitt
Modified: 2024-12-15 02:27 UTC (History)
9 users (show)

Fixed In Version: virt-manager-5.0.0-1.fc41
Clone Of:
Environment:
Last Closed: 2024-12-15 02:27:33 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Martin Pitt 2023-02-22 07:57:07 UTC
Description of problem: This is a bit similar to bug 2064594 and bug 2170110, but yet another error message.

Version-Release number of selected component (if applicable):

virt-install-4.1.0-2.fc38.noarch
libvirt-daemon-9.0.0-2.fc38.x86_64
qemu-system-x86-core-7.2.0-6.fc38.x86_64

# rpm -qa|grep spice
spice-server-0.15.1-2.fc38.x86_64
qemu-ui-spice-core-7.2.0-6.fc38.x86_64

How reproducible: Always


Steps to Reproduce:
1. Remove all spice packages; `dnf remove qemu-ui-spice-core` ought to do that.
2. Confirm that `virsh domcapabilities | grep -A8 graphics` does not contain "spice"
3. dnf install qemu-ui-spice-core
4. `virsh domcapabilities | grep -A8 graphics` now claims spice support
5. Try to install a VM with spice:

curl -L -o /tmp/cirros.qcow2 https://download.cirros-cloud.net/0.4.0/cirros-0.4.0-i386-disk.img
echo '#cloud-config' > /tmp/userdata

virt-install --name c --os-variant cirros0.4.0 --memory 128 --wait -1 --noautoconsole --disk 'size=0.1,format=qcow2,backing_store=/tmp/cirros.qcow2' --graphics 'spice,listen=127.0.0.1'  --cloud-init 'user-data=/tmp/userdata'

Actual results: Fails with

Starting install...
Allocating 'c.qcow2'                                                                                             |    0 B  00:00:00 ... 
Removing disk 'c.qcow2'                                                                                          |    0 B  00:00:00     
ERROR    internal error: process exited while connecting to monitor: 2023-02-22T07:54:57.325028Z qemu-system-x86_64: -chardev spicevmc,id=charchannel1,name=vdagent: 'spicevmc' is not a valid char driver name
Domain installation does not appear to have been successful.
If it was, you can restart your domain by running:
  virsh --connect qemu:///system start c
otherwise, please restart your installation.


Expected results: Either fix the capabilities detection to not claim "spice" without qemu-char-spice, or fix the package dependencies to require qemu-char-spice in this case.

Additional info: Unlike bug 2170110 we will not work around this in cockpit-machines, as this scenario is fairly synthetic. Unless you or someone else disagrees, it would be easy enough with yet another conditional dependency. But it would really be better to fix capability detection.

Thanks!

Comment 1 Cole Robinson 2023-05-07 17:25:30 UTC
Thanks for the detailed report. This one is strictly a virt-install bug. domcapabilities reports whether spicevmc is available or not, but virt-install isn't checking it. We should only default to spice if spicevmc is also available IMO.

Comment 2 Aoife Moloney 2024-05-07 15:57:42 UTC
This message is a reminder that Fedora Linux 38 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 38 on 2024-05-21.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '38'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 38 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 3 Martin Pitt 2024-05-08 15:25:31 UTC
Confirmed on current Fedora 40 with the original reproducer.

Comment 4 Cole Robinson 2024-09-11 16:24:56 UTC
This has been fixed upstream for a while. New release coming soon

Comment 5 Fedora Update System 2024-12-06 19:02:02 UTC
FEDORA-2024-eb0b085f84 (virt-manager-5.0.0-1.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-eb0b085f84

Comment 6 Fedora Update System 2024-12-07 07:25:27 UTC
FEDORA-2024-eb0b085f84 has been pushed to the Fedora 41 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-eb0b085f84`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-eb0b085f84

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

Comment 7 Fedora Update System 2024-12-15 02:27:33 UTC
FEDORA-2024-eb0b085f84 (virt-manager-5.0.0-1.fc41) has been pushed to the Fedora 41 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.