Bug 1032955 - Guest can not boot from specified device while attach more than 93 sata disks
Guest can not boot from specified device while attach more than 93 sata disks
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: seabios (Show other bugs)
7.0
x86_64 Linux
medium Severity medium
: rc
: ---
Assigned To: Gerd Hoffmann
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-21 04:53 EST by Xu Han
Modified: 2014-07-11 09:30 EDT (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-07-11 09:30:32 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
command line (16.14 KB, text/plain)
2013-11-21 04:58 EST, Xu Han
no flags Details
no bootable device (6.75 KB, image/png)
2013-11-21 05:01 EST, Xu Han
no flags Details
boot menu (22.68 KB, image/png)
2013-11-21 05:05 EST, Xu Han
no flags Details
seabios debug log (61.98 KB, text/plain)
2014-05-21 23:32 EDT, Xu Han
no flags Details
seabios 1.7.5 log (29.06 KB, text/plain)
2014-05-28 02:22 EDT, Xu Han
no flags Details

  None (edit)
Description Xu Han 2013-11-21 04:53:50 EST
Description of problem:
Guest can not boot from specified device while attach more than 93 sata disks.

Version-Release number of selected component (if applicable):
seabios-bin-1.7.2.2-4.el7.noarch

How reproducible:
Always

Steps to Reproduce:
1. boot guest with more than 93 sata disks.

Actual results:
Can not boot from specified device(virtio disk).
Will attach cmdline and screen shot later.

Expected results:
guest can boot with no error.

Additional info:
Comment 1 Xu Han 2013-11-21 04:58:24 EST
Created attachment 827102 [details]
command line
Comment 2 Xu Han 2013-11-21 05:01:04 EST
Created attachment 827103 [details]
no bootable device
Comment 3 Xu Han 2013-11-21 05:05:24 EST
Created attachment 827104 [details]
boot menu
Comment 5 Gerd Hoffmann 2013-11-22 02:22:27 EST
Root cause is that seabios runs out of memory in real mode address space.
Not easily fixable.  There is some ongoing work upstream to make the seabios ahci driver run completely in 32bit mode, that may improve things.  We'll pick this up when we rebase qemu & seabios, i.e. not before 7.1
Comment 7 Xu Han 2014-05-21 23:32:46 EDT
Created attachment 898186 [details]
seabios debug log

Hi Gerd,

I seem met the same problem with virtio-scsi interface. In this case, seabios wrote "Boot failed: could not read the boot disk", since QEMU booting up with one IDE disk(with OS image) and more than 750 scsi disks. The command line was:
------
...
    -drive id=drive_image1,if=none,cache=writethrough,snapshot=off,aio=native,file=/usr/local/staf/test/RHEV/kvm/autotest-devel/client/tests/virt/shared/data/images/RHEL-Server-6.5-64.qcow2 \
    -device ide-hd,id=image1,drive=drive_image1,bootindex=0,bus=ide.0,unit=0 \
    -device virtio-scsi-pci,id=virtio_scsi_pci0,bus=pci.0,addr=04 \
    -drive id=drive_stg0,if=none,cache=writethrough,snapshot=off,aio=native,file=/usr/local/staf/test/RHEV/kvm/autotest-devel/client/tests/virt/shared/data/images/stg0.qcow2 \
    -device scsi-disk,scsi-id=0,lun=0,id=stg0,drive=drive_stg0 \
...
    -drive id=drive_stg764,if=none,cache=writethrough,snapshot=off,aio=native,file=/usr/local/staf/test/RHEV/kvm/autotest-devel/client/tests/virt/shared/data/images/stg764.qcow2 \
    -device scsi-disk,scsi-id=254,lun=16382,id=stg764,drive=drive_stg764 \
...
------

And seabios debug log wrote:
------
...
2014-05-15 17:53:12: Found 1 serial ports
2014-05-15 17:53:12: ATA controller 1 at 1f0/3f4/0 (irq 14 dev 9)
2014-05-15 17:53:12: ATA controller 2 at 170/374/0 (irq 15 dev 9)
2014-05-15 17:53:12: found virtio-scsi at 0:4
2014-05-15 17:53:12: Searching bootorder for: /pci@i0cf8/*@4/*@0/*@0,0
2014-05-15 17:53:12: virtio-scsi vendor='QEMU' product='QEMU HARDDISK' rev='1.5.' type=0 removable=0
2014-05-15 17:53:12: virtio-scsi blksize=512 sectors=2048
2014-05-15 17:53:12: Searching bootorder for: /pci@i0cf8/*@4/*@0/*@1,0
2014-05-15 17:53:12: virtio-scsi vendor='QEMU' product='QEMU HARDDISK' rev='1.5.' type=0 removable=0
2014-05-15 17:53:12: virtio-scsi blksize=512 sectors=2048
...
2014-05-15 17:53:12: virtio-scsi vendor='QEMU' product='QEMU HARDDISK' rev='1.5.' type=0 removable=0
2014-05-15 17:53:12: virtio-scsi blksize=512 sectors=2048
2014-05-15 17:53:12: WARNING - Unable to allocate resource at virtio_scsi_add_lun:104!
2014-05-15 17:53:12: WARNING - Unable to allocate resource at virtio_scsi_add_lun:104!
...
2014-05-15 17:53:12: WARNING - Unable to allocate resource at virtio_scsi_add_lun:104!
2014-05-15 17:53:12: ata0-0: QEMU HARDDISK ATA-7 Hard-Disk (20480 MiBytes)
2014-05-15 17:53:12: Searching bootorder for: /pci@i0cf8/*@1,1/drive@0/disk@0
2014-05-15 17:53:12: PS2 keyboard initialized
2014-05-15 17:53:12: All threads complete.
2014-05-15 17:53:12: Scan for option roms
2014-05-15 17:53:12: Running option rom at c900:0003
2014-05-15 17:53:13: pmm call arg1=1
2014-05-15 17:53:13: pmm call arg1=0
2014-05-15 17:53:13: pmm call arg1=1
2014-05-15 17:53:13: pmm call arg1=0
2014-05-15 17:53:13: Searching bootorder for: /pci@i0cf8/*@5
2014-05-15 17:53:13: Searching bootorder for: /rom@genroms/kvmvapic.bin
2014-05-15 17:53:13: Searching bootorder for: HALT
2014-05-15 17:53:13: drive 0x000f0000: PCHS=16383/16/63 translation=lba LCHS=1024/255/63 s=41943040
2014-05-15 17:53:13: drive 0x000fdcb0: PCHS=2/16/64 translation=large LCHS=2/16/64 s=2048
2014-05-15 17:53:13: drive 0x000fdc70: PCHS=2/16/64 translation=large LCHS=2/16/64 s=2048
2014-05-15 17:53:13: drive 0x000fdc30: PCHS=2/16/64 translation=large LCHS=2/16/64 s=2048
2014-05-15 17:53:13: drive 0x000fdbf0: PCHS=2/16/64 translation=large LCHS=2/16/64 s=2048
2014-05-15 17:53:13: drive 0x000fdbb0: PCHS=2/16/64 translation=large LCHS=2/16/64 s=2048
2014-05-15 17:53:13: drive 0x000fdb70: PCHS=2/16/64 translation=large LCHS=2/16/64 s=2048
2014-05-15 17:53:13: drive 0x000fdb30: PCHS=2/16/64 translation=large LCHS=2/16/64 s=2048
2014-05-15 17:53:13: drive 0x000fdaf0: PCHS=2/16/64 translation=large LCHS=2/16/64 s=2048
2014-05-15 17:53:13: drive 0x000fdab0: PCHS=2/16/64 translation=large LCHS=2/16/64 s=2048
2014-05-15 17:53:13: drive 0x000fda70: PCHS=2/16/64 translation=large LCHS=2/16/64 s=2048
2014-05-15 17:53:13: drive 0x000fda30: PCHS=2/16/64 translation=large LCHS=2/16/64 s=2048
2014-05-15 17:53:13: drive 0x000fd9f0: PCHS=2/16/64 translation=large LCHS=2/16/64 s=2048
2014-05-15 17:53:13: drive 0x000fd9b0: PCHS=2/16/64 translation=large LCHS=2/16/64 s=2048
2014-05-15 17:53:13: drive 0x000fd970: PCHS=2/16/64 translation=large LCHS=2/16/64 s=2048
2014-05-15 17:53:13: drive 0x000fd930: PCHS=2/16/64 translation=large LCHS=2/16/64 s=2048
2014-05-15 17:53:13: WARNING - Unable to allocate resource at add_drive:224!
2014-05-15 17:53:13: drive 0x000fd8f0: PCHS=2/16/64 translation=large LCHS=2/16/64 s=2048
...
2014-05-15 17:53:13: WARNING - Unable to allocate resource at add_drive:224!
2014-05-15 17:53:13: drive 0x000f0030: PCHS=2/16/64 translation=large LCHS=2/16/64 s=2048
2014-05-15 17:53:13: Running option rom at ca00:0003
2014-05-15 17:53:13: Space available for UMB: 000cc800-000ed800
2014-05-15 17:53:13: Returned 57344 bytes of ZoneHigh
2014-05-15 17:53:13: e820 map has 7 items:
2014-05-15 17:53:13:   0: 0000000000000000 - 000000000009fc00 = 1 RAM
2014-05-15 17:53:13:   1: 000000000009fc00 - 00000000000a0000 = 2 RESERVED
2014-05-15 17:53:13:   2: 00000000000f0000 - 0000000000100000 = 2 RESERVED
2014-05-15 17:53:13:   3: 0000000000100000 - 000000007fffe000 = 1 RAM
2014-05-15 17:53:13:   4: 000000007fffe000 - 0000000080000000 = 2 RESERVED
2014-05-15 17:53:13:   5: 00000000feffc000 - 00000000ff000000 = 2 RESERVED
2014-05-15 17:53:13:   6: 00000000fffc0000 - 0000000100000000 = 2 RESERVED
2014-05-15 17:53:13: enter handle_19:
2014-05-15 17:53:13:   NULL
2014-05-15 17:53:13: Booting from Hard Disk...
2014-05-15 17:53:13: Boot failed: could not read the boot disk
...
------

Would you please check whether it is the same issue?

Thanks.
Comment 8 Gerd Hoffmann 2014-05-22 01:52:40 EDT
> Hi Gerd,
> 
> I seem met the same problem with virtio-scsi interface. In this case,
> seabios wrote "Boot failed: could not read the boot disk", since QEMU
> booting up with one IDE disk(with OS image) and more than 750 scsi disks.
> The command line was:

> 2014-05-15 17:53:13: WARNING - Unable to allocate resource at add_drive:224!
> 2014-05-15 17:53:13: drive 0x000fd8f0: PCHS=2/16/64 translation=large
> LCHS=2/16/64 s=2048

> Would you please check whether it is the same issue?

Yes, same fundamental issue:  seabios runs out of memory.

The per-disk footprint is lower with virtio-scsi, thats why you need more scsi disks than sata disks to hit it.
Comment 9 Gerd Hoffmann 2014-05-27 10:39:32 EDT
seabios 1.7.5 test builds are available here:
http://people.redhat.com/ghoffman/bz1101500/

That has the 32bit ahci driver (see comment #5), which should improve things for ahci.  Please test.
Comment 10 Xu Han 2014-05-28 02:22:51 EDT
Created attachment 899848 [details]
seabios 1.7.5 log

(In reply to Gerd Hoffmann from comment #9)
> seabios 1.7.5 test builds are available here:
> http://people.redhat.com/ghoffman/bz1101500/
> 
> That has the 32bit ahci driver (see comment #5), which should improve things
> for ahci.  Please test.

Also failed by runs out of memory. Could not allocate resource for OS image disk(virtio-blk) after initializing ahci disk.
-------------------------------------------------
...
AHCI controller at 12.0, iobase fc021000, irq 10                                 
Searching bootorder for: /pci@i0cf8/*@12/drive@0/disk@0                          
AHCI/5: registering: "AHCI/5: QEMU HARDDISK ATA-7 Hard-Disk (1024 MiBytes)"      
Searching bootorder for: /pci@i0cf8/*@12/drive@1/disk@0                          
AHCI/0: registering: "AHCI/0: QEMU HARDDISK ATA-7 Hard-Disk (1024 MiBytes)"      
Searching bootorder for: /pci@i0cf8/*@12/drive@2/disk@0                          
AHCI/1: registering: "AHCI/1: QEMU HARDDISK ATA-7 Hard-Disk (1024 MiBytes)"      
Searching bootorder for: /pci@i0cf8/*@12/drive@3/disk@0                          
AHCI/2: registering: "AHCI/2: QEMU HARDDISK ATA-7 Hard-Disk (1024 MiBytes)"      
Searching bootorder for: /pci@i0cf8/*@12/drive@4/disk@0                          
AHCI/3: registering: "AHCI/3: QEMU HARDDISK ATA-7 Hard-Disk (1024 MiBytes)"      
Searching bootorder for: /pci@i0cf8/*@12/drive@5/disk@0                          
WARNING - Unable to allocate resource at ahci_port_realloc:392!                  
AHCI/4: registering: "AHCI/4: QEMU HARDDISK ATA-7 Hard-Disk (1024 MiBytes)"      
WARNING - Unable to allocate resource at ahci_controller_setup:576!              
found virtio-blk at 0:3                                                          
WARNING - Unable to allocate resource at init_virtio_blk:109!                    
All threads complete.                                                            
Scan for option roms                                                             
Searching bootorder for: /rom@genroms/kvmvapic.bin                               
                                                                                 
Press F12 for boot menu.                                                         
                                                                                 
Searching bootorder for: HALT                                                    
drive 0x000f1d50: PCHS=2080/16/63 translation=large LCHS=520/64/63 s=2097152
...
Comment 11 Gerd Hoffmann 2014-07-11 09:30:32 EDT
Hmm, too bad.  There isn't much we can do about it though, other than switching to a firmware not constrained by real mode interfaces (i.e. UEFI).

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