Bug 1652959 - [machines] Creates IDE disks by default, which are not supported in RHEL8
Summary: [machines] Creates IDE disks by default, which are not supported in RHEL8
Keywords:
Status: VERIFIED
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: cockpit-appstream
Version: 8.0
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: rc
: 8.2
Assignee: Katerina Koukiou
QA Contact: YunmingYang
URL:
Whiteboard:
Depends On:
Blocks: 1715211
TreeView+ depends on / blocked
 
Reported: 2018-11-23 17:06 UTC by Sterling Alexander
Modified: 2019-12-13 03:24 UTC (History)
14 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1715211 (view as bug list)
Environment:
Last Closed:
Type: Bug
Target Upstream Version:


Attachments (Terms of Use)
Screen shot of error (92.63 KB, image/png)
2018-11-23 17:11 UTC, Sterling Alexander
no flags Details

Description Sterling Alexander 2018-11-23 17:06:57 UTC
Description of problem:  When using cockpit-machines to create new VM's on a RHEL8 host, the default disk type will be IDE with no option to change/modify it using the cockpit GUI.  This causes the installer to fail due to the unsupported disk type.



How reproducible:  100% of the time, every time


Steps to Reproduce:
1.  Install cockpit-machines on a RHEL 8 machine
2.  Connect to a RHEL 8 host
3.  Create a VM, the default disk type is IDE
4.  Attempt to start/install the guest, 

Actual results:  Fails with "Unsupported configuration, IDE controllers are unsupported"


Expected results:  The configuration created would be supported


Additional info:  In order to work around this I used the cockpit terminal to edit the XML, I switched it to a virtio device and was able to successfully install the created guest.

Comment 1 Sterling Alexander 2018-11-23 17:11:23 UTC
Created attachment 1508299 [details]
Screen shot of error

Comment 2 Martin Pitt 2018-11-24 11:10:45 UTC
Katerina, this actually smells like a bug in underlying virt-xml or virt-install? Or does cockpit-machines actually explicitly use IDE?

Comment 3 Katerina Koukiou 2018-11-26 08:47:56 UTC
@Alexander what operating system you chose for your guest?
Disk bus type is chosen by virt-install according to the guest OS, we don't make this decisions in the cockpit code.

Comment 4 Sterling Alexander 2018-12-12 14:05:03 UTC
Katerina,

Sorry I missed the needsinfo.  I was installing both rhel7 and rhel8 guests via cockpit.  Each time the disk BUS chosen was IDE.

Comment 7 Katerina Koukiou 2018-12-13 15:57:08 UTC
Alexander you 're right, thanks for noticing this.

$ virt-install --os-variant=rhel8.0 --disk size=1 --name test --memory 1024 --print-xml  | grep -A4 "<disk"
    <disk type="file" device="disk">
      <driver name="qemu" type="qcow2"/>
      <source file="/home/kkoukiou/.local/share/libvirt/images/test-10.qcow2"/>
      <target dev="hda" bus="ide"/>
    </disk>

$ virt-install --os-variant=rhel7.6 --disk size=1 --name test --memory 1024 --print-xml  | grep -A4 "<disk"
    <disk type="file" device="disk">
      <driver name="qemu" type="qcow2"/>
      <source file="/home/kkoukiou/.local/share/libvirt/images/test-12.qcow2"/>
      <target dev="vda" bus="virtio"/>
    </disk>


osinfo-db.noarch: 20181116-1.fc29                

osinfo-db is to blame here, moving bug to that component

Comment 8 Katerina Koukiou 2018-12-13 16:05:00 UTC
Alexander, one more thing that I forgot to mention, is that currently you have to pass the os-vendor option from cockpit-ui if you want virt-install to choose correctly these information. I 'll work to make the os-vendor to be auto-discovered from the location passed, but for now this is not the case.

Comment 9 Fabiano Fidêncio 2018-12-13 16:08:20 UTC
(In reply to Katerina Koukiou from comment #7)
> Alexander you 're right, thanks for noticing this.
> 
> $ virt-install --os-variant=rhel8.0 --disk size=1 --name test --memory 1024
> --print-xml  | grep -A4 "<disk"
>     <disk type="file" device="disk">
>       <driver name="qemu" type="qcow2"/>
>       <source
> file="/home/kkoukiou/.local/share/libvirt/images/test-10.qcow2"/>
>       <target dev="hda" bus="ide"/>
>     </disk>
> 
> $ virt-install --os-variant=rhel7.6 --disk size=1 --name test --memory 1024
> --print-xml  | grep -A4 "<disk"
>     <disk type="file" device="disk">
>       <driver name="qemu" type="qcow2"/>
>       <source
> file="/home/kkoukiou/.local/share/libvirt/images/test-12.qcow2"/>
>       <target dev="vda" bus="virtio"/>
>     </disk>
> 
> 
> osinfo-db.noarch: 20181116-1.fc29                
> 
> osinfo-db is to blame here, moving bug to that component

This issue actually happens on Fedora, but shouldn't be happening on RHEL-8.0 package.
According to the screenshots Alexander is not using the "os-variant" option.

Alexander, would you give it a second try but now setting the "Operating System" to RHEL-8.0? Please, follow Katerina suggestion here on how to do that https://bugzilla.redhat.com/show_bug.cgi?id=1652959#c8
After confirming the issue doesn't happen on RHEL-8.0 (and it shouldn't) I'd close this one as WONTFIX.

About the Fedora issue, nice catch! Patch is already submitted upstream
https://www.redhat.com/archives/libosinfo/2018-December/msg00075.html

Comment 10 Sterling Alexander 2018-12-13 18:12:45 UTC
Katerina,

Re-tested with selecting the OS vendor and the install succeeds.  From a customer experience point of view I'd still argue needs some sort of fix.  Unless I misunderstand something, this type of disk (IDE) will never work on RHEL8...so no tools should automatically create one.

I can add this information to KCS article on the portal.

Comment 11 Katerina Koukiou 2018-12-14 09:21:21 UTC
Alexander you 're right. The OS should be auto detected from the location url in cockpit for better user experience. I am moving this BZ back to cockpit so that we keep track of this there.

Fabiano, thanks for fixing the Fedora issue in osinfo-db that we caught my accident here.

Comment 12 Eduardo Habkost 2019-04-09 19:33:32 UTC
I have just hit this bug and found out (by accident) that I can work around it by checking the "Immediately Start VM" option.  If that option is checked, an appropriate machine type and disk type is automatically selected depending on the install ISO I'm using.

Does this mean OS autodetection is already working somehow, but only if "Immediately Start VM" is enabled?

Versions I'm running:
cockpit-machines-191-1.el8.noarch
virt-install-2.0.0-5.el8.noarch

Comment 13 Karen Noel 2019-04-09 22:44:10 UTC
(In reply to Eduardo Habkost from comment #12)
> I have just hit this bug and found out (by accident) that I can work around
> it by checking the "Immediately Start VM" option.  If that option is
> checked, an appropriate machine type and disk type is automatically selected
> depending on the install ISO I'm using.
> 
> Does this mean OS autodetection is already working somehow, but only if
> "Immediately Start VM" is enabled?
> 
> Versions I'm running:
> cockpit-machines-191-1.el8.noarch
> virt-install-2.0.0-5.el8.noarch

Katerina, Can we consider fixing this in RHEL 8.1.0 and 8.0 z-stream? Thanks!

Comment 14 Katerina Koukiou 2019-04-10 09:01:13 UTC
@Karen, I will fix it now, I will just force the user to select an operating system in the Create dialog. That will solve the issue.

Comment 15 Lars Karlitski 2019-04-10 09:07:03 UTC
Requesting zstream.

Comment 16 Katerina Koukiou 2019-04-12 08:47:04 UTC
https://github.com/cockpit-project/cockpit/pull/11574

Comment 17 Eduardo Habkost 2019-04-12 18:39:12 UTC
Do we have a BZ for guest OS autodetection?  virt-install, Boxes, and virt-manager automatically detect the guest OS type from ISO images.

Comment 18 Katerina Koukiou 2019-04-15 07:54:47 UTC
Eduardo we don't have seperate BZ to track OS autodetection but the PR above introduces exactly this feature in the create VM dialog.

Comment 19 Eduardo Habkost 2019-04-15 18:15:36 UTC
(In reply to Katerina Koukiou from comment #18)
> Eduardo we don't have seperate BZ to track OS autodetection but the PR above
> introduces exactly this feature in the create VM dialog.

Thanks!  What's the plan for zstream?  Forcing the user to choose a guest OS, or backporting OS autodetection?

Comment 20 Katerina Koukiou 2019-04-16 05:41:20 UTC
Eduardo, it's a mix. In the background we always try to do autodetection, with osinfo-detect from libosinfo.
But this tool has still some limitations, so if it does not manage to autodetect the OS, I am forcing the user to manually select these options, in the case that the installation media are over http/https and when 'Start immediately' checkbox in unset. This is the exact case described above that virt-install with not autodetect the OS by itself.

In all other cases, living the dialog with the vendor/os fields uninitialized will not harm the installation.

Comment 27 Martin Pitt 2019-05-05 19:39:46 UTC
Not approved, thus moving back to 8.1.0.

Comment 30 YunmingYang 2019-05-30 05:41:18 UTC
Test Versions:
cockpit-machines-193-1.el8.noarch
libvirt-dbus-1.2.0-2.module+el8.1.0+2983+b2ae9c0a.x86_64


For the four installation source type, there are different performances:

1. For the 'Local Install Media', 'OS Vendor' and 'Operating System' can be auto-detected, but user can change these two options to Unspecified and Other OS, and creation will be successful.Then, the disk bus is ide. There will be an error during installation.
2. For the 'URL', 'OS Vendor' and 'Operating System' can be auto-detected, and these two options are also required fields, so there are no questions.
3. For the 'Network Boot(PXE)', 'OS Vendor' and 'Operating System' can not be auto-detected, and these two options are not required fields, but the creation can be successful and the disk bus is ide, the installation can be also successful
4. For the 'Existing Disk Image', 'OS Vendor' and 'Operating System' can not be auto-detected, and these two options are not required fields, but the creation can be successful and the disk bus is ide.The installation is not needed,  and the VM can run correctly.

It seems that 'OS Vendor' and 'Operating System' is always needed to input, so i think the limitation for these two options need to be more strict.

Comment 31 YunmingYang 2019-05-30 10:37:59 UTC
Sorry for forgetting needinfo

Comment 32 YunmingYang 2019-08-02 10:05:50 UTC
Based on #c30, I think there are still some issues, so changing the status to ASSIGNED for tracking purpose.
Also according to the 8.0.0.z clone https://bugzilla.redhat.com/show_bug.cgi?id=1715211#c4, dev is working closely with it.

Comment 33 Martin Pitt 2019-08-13 08:41:57 UTC
@Yunming: The part about auto-detecting the OS for iso or network installs should work now. So we can either restrict this bugzilla to that functionality in 8.1 and file a new one for 8.2 for the other cases (requiring an explicit OS for PXE/import); or changing the scope of this bz to all use cases, then I'll just change the target of this bug to 8.2 and we don't track this partial fix for 8.1. Either is fine for me, do you have a preference?

Comment 34 Martin Pitt 2019-08-13 09:49:43 UTC
Mandatory OS choice gets implemented in https://github.com/cockpit-project/cockpit/pull/12563

Comment 35 YunmingYang 2019-08-14 03:35:55 UTC
@Martin,I prefer to change the scope of this bz to all use cases and switch the ITR of this bug to 8.2.Because I think it is better to fix the bug in a comprehensive way. But there is still a problem which is the bug that needs to be cloned to 8.0.0.z(https://bugzilla.redhat.com/show_bug.cgi?id=1715211), how should we deal with it?

Comment 36 Martin Pitt 2019-08-29 06:09:05 UTC
Ack, moving to 8.2 then. I don't know if it even makes sense to stuff that into 8.0.0.z still, given that 8.1 will release at the same time as the next z-stream?

Comment 38 Xianghua Chen 2019-09-16 05:37:01 UTC
Please help to remove the bug from Errata advisory: https://errata.devel.redhat.com/advisory/40553 since it has been moved to 8.2.0, thanks.

Comment 40 Martin Pitt 2019-09-18 09:18:14 UTC
@xchen: Dropped from advisory, and resetting state. Thanks!

Comment 42 Martin Pitt 2019-12-02 17:44:56 UTC
Oops, the fix for this is already in RHEL 8.2, I forgot to link it.

Comment 44 Xianghua Chen 2019-12-13 03:24:23 UTC
Verified with packages:
cockpit-machines-208-1.el8.noarch
libvirt-dbus-1.2.0-3.module+el8.1.0+4066+0f1aadab.x86_64

Steps:
1. Open Virtual Machines page, and click "Create VM", then try:
   Choose "Download an OS", the 'Operating System' is mandatory now and will be error message under the field if leave it blank.
   Choose 'Local Install Media', the 'Installation Source' and "Operating System" are mandatory now and will be error message under the field if leave them blank.
   Choose 'URL',  the 'Installation Source' and "Operating System" are mandatory now and will be error message under the field if leave them blank.
   Choose 'Network Boot(PXE)', the 'Operating System' is mandatory now and will be error message under the field if leave it blank.
2. Click "Import VM", the 'Installation Source' and "Operating System" are mandatory now and will be error message under the field if leave them blank.
3. Click "Create VM"
   Choose "Download an OS" , input name/os info, click create. Check the Bus column under Disks tab, it's virtio.
   Choose 'Local Install Media', input name/installation source/os info, click create. Check the Bus column under Disks tab, it's virtio.
   Choose 'URL',  input name/installation source/os info, click create. Check the Bus column under Disks tab, it's virtio.
   Choose 'Network Boot(PXE)', input nam/os info, click create. Check the Bus column under Disks tab, it's virtio.

So verified.


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