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 2083032 - [RFE] No storage format can be selected during vm creation
Summary: [RFE] No storage format can be selected during vm creation
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: cockpit-machines
Version: 9.0
Hardware: All
OS: All
low
low
Target Milestone: rc
: 9.3
Assignee: Nobody
QA Contact: Xianghua Chen
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-05-09 06:40 UTC by g.danti
Modified: 2023-11-07 09:05 UTC (History)
4 users (show)

Fixed In Version: 289
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-11-07 08:24:46 UTC
Type: Feature Request
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)
new vm wizard (47.76 KB, image/jpeg)
2022-05-09 06:40 UTC, g.danti
no flags Details
add disk wizard (31.03 KB, image/jpeg)
2022-05-09 06:40 UTC, g.danti
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-121361 0 None None None 2022-05-09 06:47:25 UTC
Red Hat Product Errata RHBA-2023:6336 0 None None None 2023-11-07 08:24:59 UTC

Description g.danti 2022-05-09 06:40:14 UTC
Created attachment 1877973 [details]
new vm wizard

Description of problem:
When creating a new VM via cockpit-machines, the storage file format can not be selected. The wizard auto-creates a qcow2 format. Such info can be provided, instead, when adding a new disk to an existing VM. See attached screenshots.

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

How reproducible:
Create a new VM trying to set the storage file format.

Steps to Reproduce:
1. Login to cockpit
2. Go to Virtual Machines panel
3. click "Create VM" and try to set the storage file format (no such option is listed).

Actual results:
Creating a new VM with raw file is impossible (a qcow2 file will be automatically created).

Expected results:
The storage file format should be editable by the user. Alternatively, one should be able to set a default value different from qcow2 (which are not the best choice for all environments). Please also note this last option is available in the deprecated virt-manager, which let the user select the default storage format.

Additional info:
None.

Comment 1 g.danti 2022-05-09 06:40:50 UTC
Created attachment 1877974 [details]
add disk wizard

Comment 2 Martin Pitt 2022-05-09 07:38:42 UTC
This is deliberate. The VM creation dialog should *not* offer all the possible options, as this would make it way too complex. For non-default options, create the VM without storage, don't start it, and then tweak storage, devices, boot loader/order, networking, etc; then start it.

Comment 3 g.danti 2022-05-09 07:44:11 UTC
I completely agree that providing *all* options would be insane, but selecting the image storage format is a very basic operation that should not be taken away from the user in my opinion. Especially considering that the field can have a default value (let it qcow2 or raw) so that the casual user can simply ignore it, I fail to understand how that option would complicate things for VM creation.

The workaround you provided is real (it is how I am working at the moment), but it adds unneeded steps to the creation of a new virtual machine. So I would ask to reconsider your decision.
Regards.

Comment 5 g.danti 2022-09-25 10:56:59 UTC
I would add that, due to apparmor issues described in https://bugzilla.redhat.com/show_bug.cgi?id=2129408, adding a raw disk is unneeded complex. 

At the moment, when operating on an apparmor-enabled distro, one had to:
- create a vm with no storage selected;
- create and add a raw disk via the wizard;
- remove the just-added disk;
- re-add it specifying a full, custom path.

So please consider enabling raw disk image selection on the vm creation wizard.
Regards.

Comment 6 Simon Kobyda 2023-04-21 22:31:33 UTC
Merged: https://github.com/cockpit-project/cockpit-machines/pull/1031

Comment 14 Xianghua Chen 2023-05-22 06:26:13 UTC
Verified with Packages:
cockpit-machines-290-1.el9.noarch
cockpit-292-1.el9.x86_64
libvirt-dbus-1.4.1-5.el9.x86_64
libvirt-daemon-9.0.0-10.1.el9_2.x86_64

Steps :
1. click "Create VM" 
Storage: "Create new qcow2 volume" 
Fill in left fields , click "Crate and run"

The vm image file format will be qcow2:
# qemu-img info /var/lib/libvirt/images/fedora37-2023-5-22.qcow2 
image: /var/lib/libvirt/images/fedora37-2023-5-22.qcow2
file format: qcow2
virtual size: 20 GiB (21474836480 bytes)
disk size: 40.4 MiB
cluster_size: 65536
Format specific information:
    compat: 1.1
    compression type: zlib
    lazy refcounts: true
    refcount bits: 16
    corrupt: false
    extended l2: false
Child node '/file':
    filename: /var/lib/libvirt/images/fedora37-2023-5-22.qcow2
    protocol type: file
    file length: 20 GiB (21478375424 bytes)
    disk size: 40.4 MiB
    Format specific information:
        extent size hint: 1048576


2. click "Create VM" again
Storage: "Create new raw volume" 
Fill in left fields , click "Crate and run"

The vm image file format will be raw:
# qemu-img info /var/lib/libvirt/images/test2.img
image: /var/lib/libvirt/images/test2.img
file format: raw
virtual size: 20 GiB (21474836480 bytes)
disk size: 4 KiB
Child node '/file':
    filename: /var/lib/libvirt/images/test2.img
    protocol type: file
    file length: 20 GiB (21474836480 bytes)
    disk size: 4 KiB


So verified.

Comment 17 errata-xmlrpc 2023-11-07 08:24:46 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-2023:6336


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