Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-27142

[Machines] "Replace SPICE devices" in vm details page does not detect other vms using SPICE

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • rhel-9.4
    • cockpit-machines
    • None
    • Low
    • rhel-sst-cockpit
    • ssg_front_door
    • None
    • QE ack
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • None

      What were you trying to do that didn't work?
      [Machines] "Replace SPICE devices" in vm details page does not detect other vms using SPICE

      Please provide the package NVR for which bug is seen:

      cockpit-machines-308-1.el9.noarch
      cockpit-311.1-1.el9.x86_64
      libvirt-dbus-1.4.1-5.el9.x86_64
      libvirt-client-9.10.0-1.el9.x86_64

      How reproducible:

      100%

      Steps to reproduce

      1. Prepare RHEL8.10 environment , prepare repo:

      #cat /etc/yum.repos.d/rhel8.repo
      [baseos]
      name=RHEL_8_BASEOS
      baseurl=http://download.eng.pek2.redhat.com/rhel-8/nightly/RHEL-8/latest-RHEL-8/compose/BaseOS/$basearch/os/
      enabled=1
      gpgcheck=0

      [appstream]
      name=RHEL_8_APP
      baseurl=http://download.eng.pek2.redhat.com/rhel-8/nightly/RHEL-8/latest-RHEL-8/compose/AppStream/$basearch/os/
      enabled=1
      gpgcheck=0
       
      2. Prepare cockpit-machines:# yum install libvirt cockpit cockpit-machines -y
      # firewall-cmd --add-service=cockpit --permanent
      # firewall-cmd --reload

      #systemctl enable --now cockpit.socket

      #systemctl enable --now libvirtd
       
      3. Log into cockpit web console, prepare 6 vms, in this case import 6 cirros vm.

      #yum install wget -y

      #wget http://10.73.224.78/images/x86_64/cirros.qcow2 -O /var/lib/libvirt/images/cirros1.qcow2

      #wget http://10.73.224.78/images/x86_64/cirros.qcow2 -O /var/lib/libvirt/images/cirros2.qcow2

      #wget http://10.73.224.78/images/x86_64/cirros.qcow2 -O /var/lib/libvirt/images/cirros3.qcow2

      #wget http://10.73.224.78/images/x86_64/cirros.qcow2 -O /var/lib/libvirt/images/cirros4.qcow2

      #wget http://10.73.224.78/images/x86_64/cirros.qcow2 -O /var/lib/libvirt/images/cirros5.qcow2

      #wget http://10.73.224.78/images/x86_64/cirros.qcow2 -O /var/lib/libvirt/images/cirros6.qcow2

      #wget http://10.73.224.78/images/x86_64/cirros.qcow2 -O /var/lib/libvirt/images/cirros.qcow2

      Then create 6 vms using SPICE:

      #for n in 1 2 3 4 5 6; do virt-install --name cirros$n --memory 2048 --vcpus 2 --os-variant cirros0.4.0 --import --disk /var/lib/libvirt/images/cirros$n.qcow2 --graphics vnc --graphics spice --noautoconsole; done
      Create 1 vm cirros not using SPICE:

      #virt-install {}name cirros{} -memory 2048 --vcpus 2 --os-variant cirros0.4.0 --import --disk /var/lib/libvirt/images/cirros.qcow2 graphics vnc -noautoconsole
       
      4. Install leapp

      1. yum install -y leapp-repository 
         
        5. Prepare rhel9 latest repo(Can use your own latest repo):

      Prepare leapp upgrade repo

      #cat <<EOF > /etc/leapp/files/leapp_upgrade_repositories.repo
      [BaseOS]
      name=baseOS
      baseurl=http://download-node-02.eng.bos.redhat.com/rhel-9/nightly/RHEL-9/latest-RHEL-9/compose/BaseOS/x86_64/os/
      enabled=1
      gpgcheck=0

      [appStream]
      name=appStream
      baseurl=http://download-node-02.eng.bos.redhat.com/rhel-9/nightly/RHEL-9/latest-RHEL-9/compose/AppStream/x86_64/os/
      enabled=1
      gpgcheck=0
      EOF
       
      6. Pre-upgrade:

      #leapp preupgrade --debug --no-rhsm
       
      7. Upgrade, speed up the upgrade by adding the following environment variables

      #LEAPP_UNSUPPORTED=1

      #LEAPP_DEVEL_DATABASE_SYNC_OFF=1
      Then run:

      #leapp upgrade --reboot --no-rhsm
       
      8. After upgrade, log into cockpit web console and goto vm list page, click "Replace SPICE devices" from the context menu of a VM which using SPICE
      There will be a dialog , listing all other vms which using SPICE too 
      Choose few vms and click "Replace", then the vms are replaces and can be run.
       
      9. Enter vm details page of any vm using SPICE, and click "Replace SPICE devices" from the context menu It does not list other vms which uses SPICE on the dialog "Replace SPICE devices in vm ..."
       

      Expected results

      It should list all other vms using SPICE same as click it from vms list page.

       

      Actual results

      See above.

              Unassigned Unassigned
              xchen@redhat.com Xiang Hua Chen
              Yunming Yang Yunming Yang
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated: