Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 2107247

Summary: [machines] Failed to attach disk from physical device if firstly choose an iso file in other pool
Product: Red Hat Enterprise Linux 9 Reporter: Xianghua Chen <xchen>
Component: cockpit-machinesAssignee: Simon Kobyda <skobyda>
Status: CLOSED ERRATA QA Contact: Xianghua Chen <xchen>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.1CC: mpitt, qzhang, wshi, ymao, yunyang
Target Milestone: rcKeywords: Triaged
Target Release: 9.1Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: cockpit-machines-272-1.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-11-15 10:19:39 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Xianghua Chen 2022-07-14 15:02:17 UTC
Description of problem:
[machines] Failed to attach disk from physical device if firstly choose an iso file in other pool
Packages:
cockpit-machines-271-1.el9.noarch
cockpit-272-1.el9.x86_64
libvirt-8.0.0-8.el9_0.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Prepare a running vm, you will have an default pool like : images
2. Prepare a iso file in the default pool, e.g. you can get an iso from: http://dl-cdn.alpinelinux.org/alpine/v3.16/releases/x86_64/alpine-standard-3.16.0-x86_64.iso
3. Prepare a physical device, and create a pool and volume in it:
# virsh pool-define-as loop-disk disk - - /dev/sda - /var/lib/cockpittest/poolLoopImages && virsh pool-build loop-disk --overwrite && virsh pool-start loop-disk && virsh vol-create-as loop-disk sda1 1M
4. Enter the details page of the running vm, click "Add disk", change to "Use existing"
Firstly , choose the prepared iso file from default pool
Then, change the pool to the one prepared in step 3 called loop-disk, the default volume is sda1

Click "Add"

Actual results:
The disk failed to be attached to the vm with:
Disk failed to be attached
Operation not supported: cdrom/floppy device hotplug isn't supported


Expected results: 
The disk should be attached successfully in step4.

Comment 1 Simon Kobyda 2022-07-19 22:14:59 UTC
Patch PR: https://github.com/cockpit-project/cockpit-machines/pull/767

Comment 2 Simon Kobyda 2022-07-20 11:19:42 UTC
Fix merged to main: https://github.com/cockpit-project/cockpit-machines/pull/767

Comment 5 Xianghua Chen 2022-08-01 04:32:00 UTC
Verified with packages:
cockpit-machines-272-1.el9.noarch
cockpit-273-1.el9.x86_64
libvirt-8.5.0-2.el9.x86_64

Steps:
1. Prepare a running vm, you will have an default pool like : images
2. Prepare a iso file in the default pool, e.g. you can get an iso from: http://dl-cdn.alpinelinux.org/alpine/v3.16/releases/x86_64/alpine-standard-3.16.0-x86_64.iso
3. Prepare a physical device, and create a pool and volume in it:
# virsh pool-define-as loop-disk disk - - /dev/sda - /var/lib/cockpittest/poolLoopImages && virsh pool-build loop-disk --overwrite && virsh pool-start loop-disk && virsh vol-create-as loop-disk sda1 1M
4. Enter the details page of the running vm, click "Add disk", change to "Use existing"
Firstly , choose the prepared iso file from default pool
Then, change the pool to the one prepared in step 3 called loop-disk, the default volume is sda1

Click "Add"
It can be added successfully, so verified.

Comment 7 errata-xmlrpc 2022-11-15 10:19:39 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (cockpit-machines bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:8094