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 1387218 - Disable support for SD disks
Summary: Disable support for SD disks
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: virt-manager
Version: 7.3
Hardware: x86_64
OS: Unspecified
medium
medium
Target Milestone: rc
: 7.4
Assignee: Pavel Hrdina
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 1430672
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-20 11:26 UTC by mxie@redhat.com
Modified: 2017-08-01 21:02 UTC (History)
16 users (show)

Fixed In Version: virt-manager-1.4.1-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-01 21:02:03 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
screenshot1 (21.62 KB, image/png)
2016-10-20 11:26 UTC, mxie@redhat.com
no flags Details
screenshot2 (6.60 KB, image/png)
2016-10-20 11:27 UTC, mxie@redhat.com
no flags Details
screenshot for step1.7 (106.73 KB, image/png)
2017-03-22 10:29 UTC, zhoujunqin
no flags Details
screenshot for step2.7 (121.23 KB, image/png)
2017-03-22 10:30 UTC, zhoujunqin
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:2072 0 normal SHIPPED_LIVE virt-manager bug fix and enhancement update 2017-08-01 18:36:34 UTC

Description mxie@redhat.com 2016-10-20 11:26:38 UTC
Created attachment 1212468 [details]
screenshot1

Description of problem:
[RFE]Seabios/OVMF can recognize SD disk 

Version-Release number of selected component (if applicable):
seabios:1.9.1-5.el7
OVMF-20160608-3.git988715a.el7.noarch


How reproducible:
100%

Steps to Reproduce:
Scenario1:
1.Prepare a guest which has SD disk and default bios mode,besides,enable boot menu for guest in virt-manager
 # virsh dumpxml SD
 ..... 
  <os>
    <type arch='x86_64' machine='pc-i440fx-rhel7.3.0'>hvm</type>
    <bootmenu enable='yes'/>
  </os>
  .......
   <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source file='/var/lib/libvirt/images/SD.qcow2'/>
      <backingStore/>
      <target dev='sda' bus='sd'/>
      <boot order='2'/>
      <alias name='sd-disk0'/>
    </disk>


2.Power on the guest and press 'ESC' to enter boot menu, but found there is no SD listed in boot option, pls refer to screenshot 1

3.If try to install os on this sd disk, there will be no disk found in disk part during installation


Scenario2:
1.Prepare a guest which has SD disk and uefi bios mode,besides,enable boot menu for guest in virt-manager
 # virsh dumpxml generic
 ..... 
  <os>
    <type arch='x86_64' machine='pc-q35-rhel7.3.0'>hvm</type>
    <loader readonly='yes' type='pflash'>/usr/share/OVMF/OVMF_CODE.secboot.fd</loader>
    <nvram>/var/lib/libvirt/qemu/nvram/generic_VARS.fd</nvram>
    <bootmenu enable='yes'/>
  </os>
 .......
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source file='/var/lib/libvirt/images/generic.qcow2'/>
      <backingStore/>
      <target dev='sda' bus='sd'/>
      <boot order='2'/>
      <alias name='sd-disk0'/>
    </disk>


2.Power on the guest and press 'ESC' to enter into boot manager option, but found there is no SD listed in boot option, pls refer to screenshot 2

3.If try to install os this sd disk, there will be no disk found in disk part during installation



Actual results:
As above description

Expected results:
Seabios/OVMF can recognize SD disk 

Additional info:

Comment 1 mxie@redhat.com 2016-10-20 11:27:06 UTC
Created attachment 1212469 [details]
screenshot2

Comment 2 Laszlo Ersek 2016-11-10 13:43:55 UTC
The following <target> attribute:

  bus='sd'

is not documented in the libvirt documentation at <http://libvirt.org/formatdomain.html>. Looking at the libvirt source code however, we can find commit

commit 3730353f6300eee5a3be5ecb5b139cc532240e1b
Author: Cole Robinson <crobinso>
Date:   Wed Jul 31 09:00:26 2013 -0400

    domain_conf: Add disk bus=sd, wire it up for qemu
    
    This corresponds to '-sd' and '-drive if=sd' on the qemu command line.
    Needed for many ARM boards which don't provide any other way to
    pass in storage.

Furthermore, the QEMU manual states,

       -sd file
           Use file as SecureDigital card image.

To me, this device type (as boot device) seems irrelevant for x86_64 guests and aarch64 guests as well, at least in an enterprise setting.

Ming Xie, what is your use case for booting off of this kind of device? Thanks.

Comment 3 Laszlo Ersek 2016-11-10 13:54:45 UTC
Also note that in qemu-kvm-rhev-2.6.0-17.el7, we disabled the SD card emulation:

commit 0b74460678bde675e4bd65d272eece5805bb36de
Author: Miroslav Rezanina <mrezanin>
Date:   Wed Jun 22 14:03:15 2016 +0200

    Disable sd-card
    
    RH-Author: Miroslav Rezanina <mrezanin>
    Message-id: <2a12e11ac596c42edf03c3046bcf2b2c27df3692.1466603432.git.mrezanin>
    Patchwork-id: 70747
    O-Subject: [RHEV-7.3 qemu-kvm-rhev PATCHv3 02/10] Disable sd-card
    Bugzilla: 1333282
    RH-Acked-by: Thomas Huth <thuth>
    RH-Acked-by: Laszlo Ersek <lersek>
    RH-Acked-by: Laurent Vivier <lvivier>
    
    From: Miroslav Rezanina <mrezanin>
    
    We do not support sd-card device so disable it.
    
    Signed-off-by: Miroslav Rezanina <mrezanin>

See bug 1333282.

Furthermore, in downstream, we use a separate "default-configs/aarch64-softmmu.mak" config file, one that doesn't pull in "default-configs/arm-softmmu.mak". The consequence is that we don't enable CONFIG_SD even for aarch64:

$ git grep CONFIG_SD=y
default-configs/arm-softmmu.mak:CONFIG_SD=y
default-configs/lm32-softmmu.mak:CONFIG_SD=y

These settings are no-ops for our downstream.

I'm inclined to close this BZ as NOTABUG ("works by design"), but I'd like to hear the use case first. Thanks.

Comment 4 mxie@redhat.com 2016-11-11 08:29:45 UTC
Hi Laszio,

    Although qemu-kvm-rhev already disable sd card emulation, libvirt seems still support sd bus, because SD bus could be listed in virt-manager 



Hi Pavel,

   Could you help to look at this bug, if qemu-kvm-rhev doesn't support sd card any more, how libvirt will deal with sd? could move this bug to libvirt component and change bug title as "[RFE]remove sd bus in libvirt"?

Comment 7 Ademar Reis 2016-12-06 18:09:46 UTC
(In reply to mxie from comment #4)
> Hi Laszio,
> 
>     Although qemu-kvm-rhev already disable sd card emulation, libvirt seems
> still support sd bus, because SD bus could be listed in virt-manager 
> 
> 
> 
> Hi Pavel,
> 
>    Could you help to look at this bug, if qemu-kvm-rhev doesn't support sd
> card any more, how libvirt will deal with sd? could move this bug to libvirt
> component and change bug title as "[RFE]remove sd bus in libvirt"?

Moving BZ to virt-manager for further triage.

Comment 8 Pavel Hrdina 2017-01-24 07:44:14 UTC
Upstream commit:

commit 798a2e508011512e0fe5671f222a9e49049059e3
Author: Pavel Hrdina <phrdina>
Date:   Fri Jan 20 16:07:53 2017 +0100

    virtManager/addhardware: get supported disk bus types from libvirt

Comment 10 zhoujunqin 2017-03-22 10:28:24 UTC
I can reproduce this bug with package:
virt-manager-1.4.0-2.el7.noarch

Then try to verify this bug with new build:
virt-manager-1.4.1-1.el7.noarch
virt-manager-common-1.4.1-1.el7.noarch
virt-install-1.4.1-1.el7.noarch
libvirt-3.1.0-2.el7.x86_64
spice-gtk3-0.33-1.el7.x86_64
qemu-kvm-rhev-2.8.0-6.el7.x86_64

Steps:
Scenario-1: Create a new vm using default Seabios.
1.1 
Launch virt-manager
# virt-manager
1.2 
Click NEW button at the top of "Virtual Machine Manager" window.
1.3 
Configure guest information in installation steps and check "Customize configuration before install" in last page, then click "Finish".
1.4
Using default Seabios:
Firware:  BIOS
Chipset: i440FX

1.5 Select default disk and remove it.
1.6 Click "Add hardware" button, then add a new storage for vm, check supported device type and bus type, add a new disk.
1.7 Begin installation

Result:
For step1.6:
Device type contains: 
Disk device     (bus type: IDE/SCSI/USB/VirtIO)
CDROM device    (bus type: IDE/SCSI)
Floppy device   (bus type: fdc)
LUN Passthrough (bus type:SCSI)

For step1.7, in guest hardware details page, no other pci controller list, see screenshot-1.

Scenario-2: Create a new vm using UEFI bios + Q35 chipset
Steps as above.
Result:
For step2.6, get same result with default bios guest.
Device type contains: 
Disk device     (bus type: IDE/SCSI/USB/VirtIO)
CDROM device    (bus type: IDE/SCSI)
Floppy device   (bus type: fdc)
LUN Passthrough (bus type:SCSI)
For step2.7, in guest hardware details page, SATA controller list, see screenshot-2.

As a summary:
I. SD not listed as expected.
II. All the bus type showed in virt-manger GUI keep consistent with command 
# virsh capabilities 
...
    <disk supported='yes'>
      <enum name='diskDevice'>
        <value>disk</value>
        <value>cdrom</value>
        <value>floppy</value>
        <value>lun</value>
      </enum>
      <enum name='bus'>
        <value>ide</value>
        <value>fdc</value>
        <value>scsi</value>
        <value>virtio</value>
        <value>usb</value>
      </enum>
    </disk>

@Pavel, i want to confirm 2 issue with you:
Q1: IDE is not supported by uefi bios, but virt-manger will assign a ide bus for cdrom device while you add it during installation, then you start installation will get a error about "Error starting domain: unsupported configuration: IDE controllers are unsupported for this QEMU binary or machine type", then we need change scsi bus for cdrom device by hand, why not disabled it when choosing uefi bios.

Q2. disk bus type "usb" shows newly in virt-manger GUI, but SATA doesn't list, why virt-manger shows "Controller SATA" in screenshot-2.

Comment 11 zhoujunqin 2017-03-22 10:29:27 UTC
Created attachment 1265349 [details]
screenshot for step1.7

Comment 12 zhoujunqin 2017-03-22 10:30:21 UTC
Created attachment 1265350 [details]
screenshot for step2.7

Comment 13 Laszlo Ersek 2017-03-22 11:17:43 UTC
CC Cole, Laine and John Snow

(In reply to zhoujunqin from comment #10)

> @Pavel, i want to confirm 2 issue with you:
> Q1: IDE is not supported by uefi bios,

This is false. OVMF supports the SATA/AHCI controller on Q35.

> but virt-manger will assign a ide bus
> for cdrom device while you add it during installation, then you start
> installation will get a error about "Error starting domain: unsupported
> configuration: IDE controllers are unsupported for this QEMU binary or
> machine type", then we need change scsi bus for cdrom device by hand, why
> not disabled it when choosing uefi bios.

I saw the same error a few hours ago. In my opinion, the error is the following: the Q35 board has an integrated IDE controller, but virt-manager generates an explicit <controller> element, with @model='ide' (if memory serves). That translates to some kind of QEMU command line fragment that QEMU cannot satisfy, because Q35 has no IDE, it has only (built-in) AHCI/SATA.

Therefore, IMO, this is either a virt-manager or a libvirt bug. It has nothing to do with OVMF itself. And, this issue is unrelated to this RHBZ -- a new one should be filed for it, IMO.

Thanks
Laszlo

Comment 14 Laszlo Ersek 2017-03-22 11:19:09 UTC
(In reply to Laszlo Ersek from comment #13)

> following: the Q35 board has an integrated IDE controller, but virt-manager

Sigh, that was obviously meant as "integrated *SATA* controller". Not IDE.

Comment 15 Pavel Hrdina 2017-03-22 12:31:32 UTC
(In reply to zhoujunqin from comment #10)
> I can reproduce this bug with package:
> virt-manager-1.4.0-2.el7.noarch
> 
> Then try to verify this bug with new build:
> virt-manager-1.4.1-1.el7.noarch
> virt-manager-common-1.4.1-1.el7.noarch
> virt-install-1.4.1-1.el7.noarch
> libvirt-3.1.0-2.el7.x86_64
> spice-gtk3-0.33-1.el7.x86_64
> qemu-kvm-rhev-2.8.0-6.el7.x86_64
> 
> Steps:
> Scenario-1: Create a new vm using default Seabios.
> 1.1 
> Launch virt-manager
> # virt-manager
> 1.2 
> Click NEW button at the top of "Virtual Machine Manager" window.
> 1.3 
> Configure guest information in installation steps and check "Customize
> configuration before install" in last page, then click "Finish".
> 1.4
> Using default Seabios:
> Firware:  BIOS
> Chipset: i440FX
> 
> 1.5 Select default disk and remove it.
> 1.6 Click "Add hardware" button, then add a new storage for vm, check
> supported device type and bus type, add a new disk.
> 1.7 Begin installation
> 
> Result:
> For step1.6:
> Device type contains: 
> Disk device     (bus type: IDE/SCSI/USB/VirtIO)
> CDROM device    (bus type: IDE/SCSI)
> Floppy device   (bus type: fdc)
> LUN Passthrough (bus type:SCSI)
> 
> For step1.7, in guest hardware details page, no other pci controller list,
> see screenshot-1.
> 
> Scenario-2: Create a new vm using UEFI bios + Q35 chipset
> Steps as above.
> Result:
> For step2.6, get same result with default bios guest.
> Device type contains: 
> Disk device     (bus type: IDE/SCSI/USB/VirtIO)
> CDROM device    (bus type: IDE/SCSI)
> Floppy device   (bus type: fdc)
> LUN Passthrough (bus type:SCSI)
> For step2.7, in guest hardware details page, SATA controller list, see
> screenshot-2.
> 
> As a summary:
> I. SD not listed as expected.
> II. All the bus type showed in virt-manger GUI keep consistent with command 
> # virsh capabilities 
> ...
>     <disk supported='yes'>
>       <enum name='diskDevice'>
>         <value>disk</value>
>         <value>cdrom</value>
>         <value>floppy</value>
>         <value>lun</value>
>       </enum>
>       <enum name='bus'>
>         <value>ide</value>
>         <value>fdc</value>
>         <value>scsi</value>
>         <value>virtio</value>
>         <value>usb</value>
>       </enum>
>     </disk>
> 
> @Pavel, i want to confirm 2 issue with you:
> Q1: IDE is not supported by uefi bios, but virt-manger will assign a ide bus
> for cdrom device while you add it during installation, then you start
> installation will get a error about "Error starting domain: unsupported
> configuration: IDE controllers are unsupported for this QEMU binary or
> machine type", then we need change scsi bus for cdrom device by hand, why
> not disabled it when choosing uefi bios.

This should be fixed in libvirt to not report IDE for Q35 machine type.

> Q2. disk bus type "usb" shows newly in virt-manger GUI, but SATA doesn't
> list, why virt-manger shows "Controller SATA" in screenshot-2.

Virt-manager switched to get the list of BUS from domain capabilities but libvirt didn't report SATA BUS.  There is a Bug 1430672 to fix libvirt to report SATA BUS.

Comment 16 zhoujunqin 2017-03-23 02:48:21 UTC
Hi, Laszlo and Pavel,
Thanks for all your reply.
I think i'd better verify this bug again when Bug 1430672 fixed.

Comment 17 zhoujunqin 2017-04-12 10:51:03 UTC
Notice that Bug 1430672 is ON_QA now, so try to verify this bug again with new libvirt build:
libvirt-3.2.0-2.el7.x86_64
virt-manager-1.4.1-1.el7.noarch
libvirt-python-3.2.0-1.el7.x86_64
qemu-kvm-rhev-2.8.0-6.el7.x86_64

Steps:
I. Check disk type/bus supported by libvirt:
# virsh domcapabilities
...
    <disk supported='yes'>
      <enum name='diskDevice'>
        <value>disk</value>
        <value>cdrom</value>
        <value>floppy</value>
        <value>lun</value>
      </enum>
      <enum name='bus'>
        <value>ide</value>
        <value>fdc</value>
        <value>scsi</value>
        <value>virtio</value>
        <value>usb</value>
        <value>sata</value> 
      </enum>
    </disk>
...
Result: Report SATA bus in domain capabilities.

II. Check disk type/bus display on virt-manager GUI
Scenario-1: Create a new vm using default Seabios.
1.1 
Launch virt-manager
# virt-manager
1.2 
Click NEW button at the top of "Virtual Machine Manager" window.
1.3 
Configure guest information in installation steps and check "Customize configuration before install" in last page, then click "Finish".
1.4
Using default Seabios:
Firware:  BIOS
Chipset: i440FX

1.5 Select default disk and remove it.
1.6 Click "Add hardware" button, then add a new storage for vm, check supported device type and bus type, add a new disk.
1.7 Begin installation

Result:
For step1.6:
Device type contains: 
Disk device     (bus type: IDE/SATA/SCSI/USB/VirtIO)
CDROM device    (bus type: IDE/SATA/SCSI)
Floppy device   (bus type: fdc)
LUN Passthrough (bus type:SCSI)

Result: SATA bus type added.

Scenario-2: Create a new vm using UEFI bios + Q35 chipset
Steps as above.
Result:
For step2.6, get same result with default bios guest.
Device type contains: 
Disk device     (bus type: IDE/SATA/SCSI/USB/VirtIO)
CDROM device    (bus type: IDE/SATA/SCSI)
Floppy device   (bus type: fdc)
LUN Passthrough (bus type:SCSI)

Result:
SATA bus type added, but i think the same time, IDE bus type should hidden from virt-manager side when choose vm using UEFI bios + Q35 chipset.
For we can also meet error when we assign a ide disk/cdrom for uefi guest:
"Error starting domain: unsupported configuration: IDE controllers are unsupported for this QEMU binary or machine type".

@Pavel, though SD has removed, i think we'd better disable ide controller for Q35 machine type.

Comment 18 Pavel Hrdina 2017-04-13 07:51:56 UTC
Hi Junqin, yes we should probably hide IDE for Q35, but this should be fixed in libvirt.  This bug is for SD bus which is fixed.

Comment 19 zhoujunqin 2017-04-13 08:33:51 UTC
(In reply to Pavel Hrdina from comment #18)
> Hi Junqin, yes we should probably hide IDE for Q35, but this should be fixed
> in libvirt.  This bug is for SD bus which is fixed.

Yes, as you told me, i file a new Bug 1441964 to track this issue, thanks.
Since SD bus has removed from bus type list, move this bug from ON_QA to VERIFIED.

Comment 20 errata-xmlrpc 2017-08-01 21:02:03 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, 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-2017:2072


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