RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1946939 - [RHEL-9] Disable SPICE options in virt-manager
Summary: [RHEL-9] Disable SPICE options in virt-manager
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: virt-manager
Version: 9.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: beta
: ---
Assignee: Jonathon Jongsma
QA Contact: zhoujunqin
URL:
Whiteboard:
: 1969952 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-04-07 09:58 UTC by Uri Lublin
Modified: 2021-12-07 21:26 UTC (History)
13 users (show)

Fixed In Version: virt-manager-3.2.0-5.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-12-07 21:24:13 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)

Description Uri Lublin 2021-04-07 09:58:37 UTC
Description of problem:
SPICE has been deprecated in RHEL-8.3 and is to be removed from RHEL-9.

Please:
- Disable support for SPICE components (graphics, smart-card, USB, etc)
- Remove SPICE components from the default configuration (including QXL)
- Remove "Requires: spice-gtk3" in virt-manager.spec

Comment 1 Uri Lublin 2021-04-07 10:00:50 UTC
I built (rhel-9.0 code on a Fedora 33) qemu-kvm without SPICE and QXL,
and tried to create a new VM from iso. The default configuration is with
SPICE and QXL ("Customize configuration before Installation").
"Begin Installation" failed with errors such as:
"Unable to complete install: 'unsupported configuration: spice graphics
 are not supported with this QEMU'"

So possibly it's enough to change the default configuration such that it
does not fail for users and remove Requires from spec-file.

$ rpm -q qemu-kvm libvirt-daemon libvirt-client virt-manager
qemu-kvm-5.2.0-7.el9.0.1.uri3.x86_64
libvirt-daemon-6.6.0-5.fc33.x86_64
libvirt-client-6.6.0-5.fc33.x86_64
virt-manager-3.2.0-2.fc33.noarch

Comment 2 zhoujunqin 2021-04-28 02:37:49 UTC
Hi Pavel,
When I test with the latest virt-viewer package, spice graphics is not supported.


Steps as follows:

Package version:

virt-viewer-10.0-1.el9.x86_64
virt-install-3.2.0-4.el9.noarch
qemu-kvm-5.2.0-15.el9.x86_64
libvirt-7.0.0-6.el9.x86_64


1. Create a new vm by virt-install command.
# virt-install --memory 4096 --disk /var/lib/libvirt/images/vm1.img,size=9 --location http://download.eng.pek2.redhat.com/rhel-9/composes/RHEL-9/RHEL-9.0.0-20210421.d.2/compose/BaseOS/x86_64/os 


Actual results:
Failed to connect to vm console by virt-viewer, and an error message window pops up: 
=================================================================================
Failed to connect: unsupported graphic type 'spice'
=================================================================================

Expected results:
virt-install cmd should set vnc as the default graphics type since Spice removal from rhel9.

Comment 3 Pavel Hrdina 2021-05-04 08:10:07 UTC
(In reply to zhoujunqin from comment #2)
> Hi Pavel,
> When I test with the latest virt-viewer package, spice graphics is not
> supported.
> 
> 
> Steps as follows:
> 
> Package version:
> 
> virt-viewer-10.0-1.el9.x86_64
> virt-install-3.2.0-4.el9.noarch
> qemu-kvm-5.2.0-15.el9.x86_64
> libvirt-7.0.0-6.el9.x86_64
> 
> 
> 1. Create a new vm by virt-install command.
> # virt-install --memory 4096 --disk /var/lib/libvirt/images/vm1.img,size=9
> --location
> http://download.eng.pek2.redhat.com/rhel-9/composes/RHEL-9/RHEL-9.0.0-
> 20210421.d.2/compose/BaseOS/x86_64/os 
> 
> 
> Actual results:
> Failed to connect to vm console by virt-viewer, and an error message window
> pops up: 
> =============================================================================
> ====
> Failed to connect: unsupported graphic type 'spice'
> =============================================================================
> ====
> 
> Expected results:
> virt-install cmd should set vnc as the default graphics type since Spice
> removal from rhel9.

Hi Junqin,

that is correct, we need to add RHEL-only patch to use VNC by default if spice
is not available.

Comment 4 zhoujunqin 2021-05-06 02:07:13 UTC
(In reply to Pavel Hrdina from comment #3)
> (In reply to zhoujunqin from comment #2)
> > Hi Pavel,
> > When I test with the latest virt-viewer package, spice graphics is not
> > supported.
> > 
> > 
> > Steps as follows:
> > 
> > Package version:
> > 
> > virt-viewer-10.0-1.el9.x86_64
> > virt-install-3.2.0-4.el9.noarch
> > qemu-kvm-5.2.0-15.el9.x86_64
> > libvirt-7.0.0-6.el9.x86_64
> > 
> > 
> > 1. Create a new vm by virt-install command.
> > # virt-install --memory 4096 --disk /var/lib/libvirt/images/vm1.img,size=9
> > --location
> > http://download.eng.pek2.redhat.com/rhel-9/composes/RHEL-9/RHEL-9.0.0-
> > 20210421.d.2/compose/BaseOS/x86_64/os 
> > 
> > 
> > Actual results:
> > Failed to connect to vm console by virt-viewer, and an error message window
> > pops up: 
> > =============================================================================
> > ====
> > Failed to connect: unsupported graphic type 'spice'
> > =============================================================================
> > ====
> > 
> > Expected results:
> > virt-install cmd should set vnc as the default graphics type since Spice
> > removal from rhel9.
> 
> Hi Junqin,
> 
> that is correct, we need to add RHEL-only patch to use VNC by default if
> spice
> is not available.

Hi Pavel,
Got it, thanks for your reply.
I will keep an eye on the fix of virt-install, thanks.

Best Regards,
Juzhou.

Comment 5 Cole Robinson 2021-05-19 22:20:50 UTC
If we just care about virt-install and friends, adding `./setup.py configure --default-graphics=vnc` to the spec file should mostly do it I think.

Teaching virt-manager to handle non-spice default, and cope with lack of spice client, will be more work, but that may not be relevant for RHEL9

Comment 6 Pavel Hrdina 2021-05-26 11:57:22 UTC
Instead of adding new setup.py option called --default-graphics we can reuse the output of libvirt domcapabilities where libvirt already reports if spice is available or not.

Comment 7 Cole Robinson 2021-05-26 15:26:04 UTC
`./setup.py configure --default-graphics` is pre-existing.

You're right we should be using domcapabilities to check reported graphics types (we currently aren't in virt-install). But checking domcapabilities is not the whole picture. That tells us whether the virt host supports spice. If RHEL9 virt-install is talking to RHEL8 libvirt, RHEL8 libvirt reports spice is supportd, but the client host does not support spice, so we will still want to default to VNC so the client has a chance to connect. It's pretty messy.

Comment 8 Pavel Hrdina 2021-05-26 16:05:42 UTC
Agreed that it's a mess. There is basically no way how to make the spice removal seamless for users if we take into account remote connection and different OSes. For example virt-viewer would not be able to connect to existing VMs on RHEL8 as they will most likely have spice only. If we would pick VNC as default in this situation it would be inconsistent on the RHEL8 host. Now if we take into account that that RHEL8 host may be managed by other users with RHEL8 or even Fedora or other distributions where they would be able to use SPICE it would be a regression feature wise for these users.

Regardless of what we do the situation is doomed and the result will be broken for some users. I honestly don't know which approach would be better but I guess we will have to use the `--default-graphics` configure option as well to make it somehow work for most users.

Comment 9 Pavel Hrdina 2021-06-09 14:53:34 UTC
*** Bug 1969952 has been marked as a duplicate of this bug. ***

Comment 17 zhoujunqin 2021-06-25 07:58:30 UTC
Reproduce this issue as Comment 2 said.

Then test with the latest packages:
virt-manager-3.2.0-5.el9.noarch
virt-install-3.2.0-5.el9.noarch
qemu-kvm-6.0.0-6.el9.x86_64
libvirt-7.4.0-1.el9.x86_64

Steps:
1. New virt-manager rpm can be installed successfully.

# yum install virt-manager
Updating Subscription Management repositories.
Unable to read consumer identity

This system is not registered with an entitlement server. You can use subscription-manager to register.

Last metadata expiration check: 2:41:34 ago on Thu 24 Jun 2021 04:45:57 AM EDT.
Dependencies resolved.
====================================================================================================
 Package                  Architecture       Version                   Repository              Size
====================================================================================================
Installing:
 virt-manager             noarch             3.2.0-5.el9               libvirt_ci             539 k

Transaction Summary
====================================================================================================
Install  1 Package

Total download size: 539 k
Installed size: 2.9 M
Is this ok [y/N]: y
Downloading Packages:
virt-manager-3.2.0-5.el9.noarch.rpm                                 147 kB/s | 539 kB     00:03    
----------------------------------------------------------------------------------------------------
Total                                                               147 kB/s | 539 kB     00:03     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                            1/1 
  Installing       : virt-manager-3.2.0-5.el9.noarch                                            1/1 
  Running scriptlet: virt-manager-3.2.0-5.el9.noarch                                            1/1 
  Verifying        : virt-manager-3.2.0-5.el9.noarch                                            1/1 
Installed products updated.

Installed:
  virt-manager-3.2.0-5.el9.noarch                                                                   

Complete!

2. Download the package virt-manager-3.2.0-5.el9.src.rpm and extrat it,
Check the file virt-manager.spec, "Requires: spice-gtk3" has removed.

$ grep -nr 'spice-gtk3' virt-manager.spec

Result - No output is as expected.

3. Install a vm via virt-install command and finding the default graphics type is vnc.

# virt-install  --name testvm --memory 4096 --location http://download.eng.pek2.redhat.com/rhel-9/nightly/RHEL-9-Beta/latest-RHEL-9.0/compose/BaseOS/x86_64/os/  --nodisk --dry-run --print-xml
...
    <graphics type="vnc" port="-1"/>
    <video>
      <model type="vga"/>
    </video>
...

As a summary, I add the Verified:Tested flag to this bug, thanks.

Comment 20 zhoujunqin 2021-06-28 09:01:47 UTC
Based on Comment 17 and our automation jobs' test result[1], I move this bug from ON_QA to VERIFIED status, thanks.

[1]https://libvirt-jenkins.rhev-ci-vms.eng.rdu2.redhat.com/view/virt-install/view/RHEL-9.0%20x86_64/


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