Bug 1144840
Summary: | initrd should include virtio_blk and virtio_scsi drivers when guest installed with ahci | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | CongLi <coli> | ||||||||
Component: | dracut | Assignee: | dracut-maint | ||||||||
Status: | CLOSED NOTABUG | QA Contact: | Release Test Team <release-test-team-automation> | ||||||||
Severity: | high | Docs Contact: | |||||||||
Priority: | high | ||||||||||
Version: | 7.1 | CC: | anaconda-maint-list, coli, dracut-maint-list, dshea, harald, huding, juzhang, michen, rhod, scui, shuang, wquan, xfu, xigao, xuhan | ||||||||
Target Milestone: | rc | Keywords: | Reopened | ||||||||
Target Release: | --- | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Whiteboard: | |||||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||||
Doc Text: | Story Points: | --- | |||||||||
Clone Of: | Environment: | ||||||||||
Last Closed: | 2014-12-08 05:40:42 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: | |||||||||||
Attachments: |
|
Created attachment 939757 [details]
pci - guest boot up failed with virtio-blk driver
Please post the logs from the installation (available in /tmp in the install environment or in /var/log/anaconda in the installed system) to this bug as individual, text/plain attachments. Whoops, messed up the needinfo. Created attachment 940235 [details]
anaconda log from guest
The initrd was created without virtio_block drivers because you installed a system that did not use virtio_block. initrds in RHEL-7 are created with --hostonly, so you cannot change the bus for the drive containing the root partition without first modifying the initrd and your boot parameters to support it. (In reply to David Shea from comment #6) > The initrd was created without virtio_block drivers because you installed a > system that did not use virtio_block. initrds in RHEL-7 are created with > --hostonly, so you cannot change the bus for the drive containing the root > partition without first modifying the initrd and your boot parameters to > support it. Yes, for host, switch driver is not a must. But switching block device controller in a virt environment is quite common useage, so better always include virtio-* driver at the installation stage. Hi Ronen, Could you please have a look at this problem ? Do we support that install a rhel.7 guest with ahci driver and can boot up with virtio-* driver? Thanks. David, A RHEL7 guest needs to be able to boot from a virtio disk (blk/scsi). This is also always doable for Windows guests, and we cannot stay behind. Is there a way to do it without always including the two virtio drivers? Is there a reason to "discriminate" these drivers and not include them? Not sure that I am asking the right questions :-) Thanks, Ronen. (In reply to Ronen Hod from comment #8) > David, > A RHEL7 guest needs to be able to boot from a virtio disk (blk/scsi). This > is also always doable for Windows guests, and we cannot stay behind. > Is there a way to do it without always including the two virtio drivers? Is > there a reason to "discriminate" these drivers and not include them? > Not sure that I am asking the right questions :-) > Thanks, Ronen. The problem you are having is that dracut is *not* being discriminatory in its treatment of the virtio drivers. The initrd created at install time when installing with an ahci bus does not include the virtio drivers, since from dracut's point of view the virtio drivers are not needed, since they are not used to access the storage used while installing. If you want to change the bus used for your virtual storage devices, you will need to regenerate your initrd files, either explicitly including the virtio drivers or using --nohostonly to include a wider set of drivers not used by the currently running system. If you want to pursue this bug to have virtio drivers automatically included in the initrd files in virtual environments, please change the component to dracut so that the virtio drivers can be handled differently during initrd creation. See Comment 9. We would like the virtio drivers to be available at install time too. (In reply to Ronen Hod from comment #10) > See Comment 9. > We would like the virtio drivers to be available at install time too. reassigning The initramfs for installation is composed with dracut, but the dracut module and kernel driver set is controlled by lorax. They already are: lsinitrd initrd.img | grep -i virt -rw-r--r-- 1 root root 27753 Oct 8 14:49 usr/lib/modules/3.10.0-184.el7.x86_64/kernel/drivers/block/virtio_blk.ko -rw-r--r-- 1 root root 50513 Oct 8 14:48 usr/lib/modules/3.10.0-184.el7.x86_64/kernel/drivers/net/virtio_net.ko -rw-r--r-- 1 root root 28561 Oct 8 14:49 usr/lib/modules/3.10.0-184.el7.x86_64/kernel/drivers/scsi/virtio_scsi.ko drwxr-xr-x 2 root root 0 Oct 10 00:48 usr/lib/modules/3.10.0-184.el7.x86_64/kernel/drivers/virtio -rw-r--r-- 1 root root 13145 Oct 8 14:49 usr/lib/modules/3.10.0-184.el7.x86_64/kernel/drivers/virtio/virtio.ko -rw-r--r-- 1 root root 21121 Oct 8 14:49 usr/lib/modules/3.10.0-184.el7.x86_64/kernel/drivers/virtio/virtio_pci.ko -rw-r--r-- 1 root root 25521 Oct 8 14:49 usr/lib/modules/3.10.0-184.el7.x86_64/kernel/drivers/virtio/virtio_ring.ko See comment 9. Also, if this is a kickstart you can add the dracut-config-generic package and it will turn off the hostonly behavior. (In reply to bcl from comment #12) > They already are: > > lsinitrd initrd.img | grep -i virt > -rw-r--r-- 1 root root 27753 Oct 8 14:49 > usr/lib/modules/3.10.0-184.el7.x86_64/kernel/drivers/block/virtio_blk.ko > -rw-r--r-- 1 root root 50513 Oct 8 14:48 > usr/lib/modules/3.10.0-184.el7.x86_64/kernel/drivers/net/virtio_net.ko > -rw-r--r-- 1 root root 28561 Oct 8 14:49 > usr/lib/modules/3.10.0-184.el7.x86_64/kernel/drivers/scsi/virtio_scsi.ko > drwxr-xr-x 2 root root 0 Oct 10 00:48 > usr/lib/modules/3.10.0-184.el7.x86_64/kernel/drivers/virtio > -rw-r--r-- 1 root root 13145 Oct 8 14:49 > usr/lib/modules/3.10.0-184.el7.x86_64/kernel/drivers/virtio/virtio.ko > -rw-r--r-- 1 root root 21121 Oct 8 14:49 > usr/lib/modules/3.10.0-184.el7.x86_64/kernel/drivers/virtio/virtio_pci.ko > -rw-r--r-- 1 root root 25521 Oct 8 14:49 > usr/lib/modules/3.10.0-184.el7.x86_64/kernel/drivers/virtio/virtio_ring.ko > > See comment 9. > > Also, if this is a kickstart you can add the dracut-config-generic package > and it will turn off the hostonly behavior. Hi bcl, Thanks for your explanation. Test pass when add package dracut-config-generic in the kickstart. I will close this bug as 'NOT A BUG'. Thanks. |
Created attachment 939756 [details] guest initrd log Description of problem: initrd should include virtio_blk and virtio_scsi drivers when guest installed with ahci guest can't boot up with virtio_blk or virtio_scsi driver although the guest is installed with ahci. 1. installed the guest with ahci and check the initrd info: # lsinitrd /boot/initramfs-3.10.0-123.el7.x86_64.img | grep -i ahci -rw-r--r-- 1 root root 61169 May 5 23:45 usr/lib/modules/3.10.0-123.el7.x86_64/kernel/drivers/ata/ahci.ko -rw-r--r-- 1 root root 51561 May 5 23:45 usr/lib/modules/3.10.0-123.el7.x86_64/kernel/drivers/ata/libahci.ko 2. check the virtio driver: # lsinitrd /boot/initramfs-3.10.0-123.el7.x86_64.img | grep -i virtio -rw-r--r-- 1 root root 50145 May 5 23:45 usr/lib/modules/3.10.0-123.el7.x86_64/kernel/drivers/net/virtio_net.ko drwxr-xr-x 2 root root 0 Sep 21 18:28 usr/lib/modules/3.10.0-123.el7.x86_64/kernel/drivers/virtio -rw-r--r-- 1 root root 13065 May 5 23:45 usr/lib/modules/3.10.0-123.el7.x86_64/kernel/drivers/virtio/virtio.ko -rw-r--r-- 1 root root 21073 May 5 23:45 usr/lib/modules/3.10.0-123.el7.x86_64/kernel/drivers/virtio/virtio_pci.ko -rw-r--r-- 1 root root 24441 May 5 23:45 usr/lib/modules/3.10.0-123.el7.x86_64/kernel/drivers/virtio/virtio_ring.ko Version-Release number of selected component (if applicable): host: kernel-3.10.0-163.el7.x86_64 qemu-kvm-rhev-2.1.0-4.el7.x86_64 guest: tree: RHEL-7.0-20140507.0 kernel-3.10.0-123.el7.x86_64 How reproducible: 100% Steps to Reproduce: 1. install a rhel.7.0 guest with ahci -device ahci,id=ahci0,bus=pci.0,addr=06 \ -drive id=drive_image1,if=none,cache=none,snapshot=off,aio=native,file=/home/staf-kvm-devel/autotest-devel/client/tests/virt/shared/data/images/RHEL-Server-7.1-64-virtio.qcow2 \ -device ide-hd,id=image1,drive=drive_image1,bootindex=0 \ 2. shutdown the guest 3. boot up the guest with virtio_blk driver -drive id=drive_image1,if=none,cache=none,snapshot=off,aio=native,file=/home/staf-kvm-devel/autotest-devel/client/tests/virt/shared/data/images/RHEL-Server-7.1-64-virtio.qcow2 \ -device virtio-blk-pci,id=image1,drive=drive_image1,bootindex=0 \ Actual results: guest can't boot up with error: systemd-fsck[282]: fsck: error 2 (No such file or directory) while executing fsck.ext2 for /dev/disk/by-uuid/92b20565-b3a8-450a-8d93-2ee580ccaf54 dracut-initqueue[403]: Warning: Could not boot. Expected results: geust can boot up with virtio_blk or virtio_scsi driver Additional info: 1. in guest: [root@unused ~]# systemd-detect-virt --vm kvm [root@unused ~]# lsmod | grep virtio virtio_net 28059 0 virtio_pci 17725 0 virtio_ring 21011 2 virtio_net,virtio_pci virtio 14187 2 virtio_net,virtio_pci 2. in guest: [root@unused ~]# ls -R /dev/disk /dev/mapper /dev/disk: by-id by-uuid /dev/disk/by-id: ata-QEMU_HARDDISK_QM00015 ata-QEMU_HARDDISK_QM00015-part1 ata-QEMU_HARDDISK_QM00015-part2 dm-name-rhel_unused-root dm-name-rhel_unused-swap dm-uuid-LVM-btACEbZNhvfZCguRXORgp27lSyla7JA91MVfq07eSBf7PfxBVFgsbS4leoVmGCD1 dm-uuid-LVM-btACEbZNhvfZCguRXORgp27lSyla7JA9R93qf9g1p6mbNQ0N7mAuvobZAkZwrpJh lvm-pv-uuid-qC4Jaz-KGPK-zeLM-L206-wZK3-Hwvp-PF7CxC /dev/disk/by-uuid: 1f41b1bb-5435-48bd-80de-fa80c705c64c ad27dda0-8f5b-4f04-a402-070a93062614 92b20565-b3a8-450a-8d93-2ee580ccaf54 /dev/mapper: control rhel_unused-root rhel_unused-swap 3. Qemu CML (installed with ahci): /bin/qemu-kvm \ -S \ -name 'virt-tests-vm1' \ -sandbox off \ -M pc \ -nodefaults \ -vga cirrus \ -chardev socket,id=qmp_id_qmpmonitor1,path=/tmp/monitor-qmpmonitor1-20140920-001511-6TchmCvt,server,nowait \ -mon chardev=qmp_id_qmpmonitor1,mode=control \ -chardev socket,id=serial_id_serial0,path=/tmp/serial-serial0-20140920-001511-6TchmCvt,server,nowait \ -device isa-serial,chardev=serial_id_serial0 \ -chardev socket,id=seabioslog_id_20140920-001511-6TchmCvt,path=/tmp/seabios-20140920-001511-6TchmCvt,server,nowait \ -device isa-debugcon,chardev=seabioslog_id_20140920-001511-6TchmCvt,iobase=0x402 \ -device ich9-usb-uhci1,id=usb1,bus=pci.0,addr=03 \ -device ahci,id=ahci0,bus=pci.0,addr=04 \ -drive id=drive_image1,if=none,cache=none,snapshot=off,aio=native,file=/home/staf-kvm-devel/autotest-devel/client/tests/virt/shared/data/images/RHEL-Server-7.1-64-virtio.qcow2 \ -device ide-hd,id=image1,drive=drive_image1,bus=ahci0.0,unit=0 \ -device virtio-net-pci,mac=9a:21:22:23:24:25,id=id9jHflY,vectors=4,netdev=id7TTbXO,bus=pci.0,addr=05 \ -netdev tap,id=id7TTbXO,vhost=on,vhostfd=23,fd=22 \ -m 4096 \ -smp 4,cores=2,threads=1,sockets=2 \ -cpu 'Opteron_G4',+kvm_pv_unhalt \ -drive id=drive_cd1,if=none,snapshot=off,aio=native,media=cdrom,file=/home/staf-kvm-devel/autotest-devel/client/tests/virt/shared/data/isos/linux/RHEL7.1-Server-x86_64.iso \ -device ide-cd,id=cd1,drive=drive_cd1,bus=ide.0,unit=0 \ -drive id=drive_fl,if=none,cache=none,snapshot=off,readonly=off,aio=native,file=/home/staf-kvm-devel/autotest-devel/client/tests/virt/shared/data/images/rhel71-64/ks.vfd \ -global isa-fdc.driveA=drive_fl \ -device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1 \ -kernel '/home/staf-kvm-devel/autotest-devel/client/tests/virt/shared/data/images/rhel71-64/vmlinuz' \ -append 'ks=hd:fd0:/ks.cfg nicdelay=60 console=ttyS0,115200 console=tty0' \ -initrd '/home/staf-kvm-devel/autotest-devel/client/tests/virt/shared/data/images/rhel71-64/initrd.img' \ -vnc :0 \ -rtc base=utc,clock=host,driftfix=slew \ -boot order=cdn,once=d,menu=off \ -no-kvm-pit-reinjection \ -no-shutdown \ -enable-kvm 4. host info: processor : 23 vendor_id : AuthenticAMD cpu family : 21 model : 1 model name : AMD Opteron(TM) Processor 6234 stepping : 2 microcode : 0x6000626 cpu MHz : 2400.031 cache size : 2048 KB physical id : 1 siblings : 12 core id : 5 cpu cores : 6 apicid : 75 initial apicid : 43 fpu : yes fpu_exception : yes cpuid level : 13 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc extd_apicid amd_dcm aperfmperf pni pclmulqdq monitor ssse3 cx16 sse4_1 sse4_2 popcnt aes xsave avx lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs xop skinit wdt lwp fma4 nodeid_msr topoext perfctr_core perfctr_nb arat cpb hw_pstate npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold bogomips : 4799.73 TLB size : 1536 4K pages clflush size : 64 cache_alignment : 64 address sizes : 48 bits physical, 48 bits virtual power management: ts ttp tm 100mhzsteps hwpstate cpb