Bug 1017560

Summary: Installing rhel7.0 guest with -initrd and -kernel fails (drops to dracut emergency session)
Product: Red Hat Enterprise Linux 6 Reporter: xhan
Component: qemu-kvmAssignee: Fam Zheng <famz>
Status: CLOSED NOTABUG QA Contact: Virtualization Bugs <virt-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 6.5CC: acathrow, bsarathy, juzhang, michen, mkenneth, qzhang, shuang, virt-maint, xuhan
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-23 10:55:37 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:
Description Flags
dracut session information none

Description xhan 2013-10-10 07:37:28 UTC
Created attachment 810348 [details]
dracut session information

Description of problem:

Install rhel7.0 guest with command line initrd as parameter, the progress would go to dracut session.

If remove the initrd parameter, there is no this issue.

Version-Release number of selected component (if applicable):
qemu-kvm-rhev-0.12.1.2-2.410.el6.x86_64
kernel-2.6.32-421.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1. install rhel7.0 guest 
/usr/local/staf/test/RHEV/kvm/autotest-devel/client/tests/virt/qemu/qemu \
    -S \
    -name 'virt-tests-vm1' \
    -nodefaults \
    -monitor stdio \
    -device ich9-usb-uhci1,id=usb1,bus=pci.0,addr=0x4 \
    -device virtio-scsi-pci,id=virtio_scsi_pci0,addr=0x5 \
    -drive file='RHEL-Server-7.0-64-virtio-m.qcow2',if=none,id=virtio-scsi0-id0,media=disk,cache=none,snapshot=off,format=qcow2,aio=native \
    -device scsi-hd,drive=virtio-scsi0-id0 \
    -device virtio-net-pci,netdev=id1SJzRw,mac='9a:55:56:57:58:59',bus=pci.0,addr=0x3,id='id3Z53kU' \
    -netdev tap,id=id1SJzRw,vhost=on,script= \
    -m 16384 \
    -smp 8,maxcpus=8,cores=4,threads=1,sockets=2 \
    -cpu 'Opteron_G3' \
    -M rhel6.5.0 \
    -drive file='RHEL7.0-Server-x86_64.iso',if=none,id=virtio-scsi1-id1,media=cdrom,readonly=on,format=raw \
    -device scsi-cd,drive=virtio-scsi1-id1 \
    -device AC97,addr=0x6 \
    -drive file='rhel70-64/ks.vfd',if=none,id=fdc0-0-0,media=disk,readonly=off,format=raw \
    -global isa-fdc.driveA=fdc0-0-0 \
    -device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1 \
    -kernel 'rhel70-64/vmlinuz' \
    -append 'ks=floppy nicdelay=60 console=ttyS0,115200 console=tty0' \
    -initrd 'rhel70-64/initrd.img' \
    -vnc :0 \
    -vga cirrus \
    -rtc base=utc,clock=host,driftfix=slew  \
    -boot order=cdn,once=d,menu=off   \
    -no-kvm-pit-reinjection \
    -no-shutdown \
    -enable-kvm

2. connect to vnc screen to watch the installation progress


Actual results:
installation goes to dracut session.

Expected results:
installation would work normally.

Additional info:
dracut information is attached.

Comment 4 Ademar Reis 2014-06-16 22:16:41 UTC
Assuming you're using the initrd and vmlinuz files present in the installation disk, there's probably something wrong or missing with these files that prevent their usage when inside KVM.

I'm also assuming that this is a corner case, not a popular or default way to install RHEL7 as a guest.

Can you please confirm it's not something broken with -initrd/-kernel with the test above:

 - install rhel7 as usual (same command line you used before, but drop -initrd/-kernel)
 - copy the initrd and kernel files from the guest to the host after the installation
 - use these files as parameters to qemu-kvm -initrd and -kernel respectively

Comment 5 Fam Zheng 2014-06-17 06:32:07 UTC
(In reply to xhan from comment #0)
> If remove the initrd parameter, there is no this issue.

Then why do we need it?

Fam

Comment 6 Ademar Reis 2014-06-17 14:49:48 UTC
(In reply to Fam Zheng from comment #5)
> (In reply to xhan from comment #0)
> > If remove the initrd parameter, there is no this issue.
> 
> Then why do we need it?
> 

I can't think of any use-case for it, but it's a feature available in qemu. The problem is either in the implementation of the feature, or in the contents of the initrd shipped in the RHEL7 installation CD.

I'm strongly tempted to close this as WONTFIX, but I would like to clarify what's broken first, which is why I asked for this testcase:

> Can you please confirm it's not something broken with -initrd/-kernel with the > test above:
> 
> - install rhel7 as usual (same command line you used before, but
>   drop -initrd/-kernel)
> - copy the initrd and kernel files from the guest to the host after
>   the installation
> - use these files as parameters to qemu-kvm -initrd and -kernel
>   respectively

Leaving the needinfo because of the above. Thanks.

Comment 7 Xu Han 2014-06-18 07:32:05 UTC
(In reply to Ademar Reis from comment #4)
> Can you please confirm it's not something broken with -initrd/-kernel with
> the test above:

qemu-kvm-0.12.1.2-2.427.el6.x86_64

Tested with following steps:

>  - install rhel7 as usual (same command line you used before, but drop
> -initrd/-kernel)

Command line:
-------------
/usr/libexec/qemu-kvm \
    -name 'virt-tests-vm1' \
    -nodefaults \
    -monitor stdio \
    -device ich9-usb-uhci1,id=usb1,bus=pci.0,addr=0x4 \
    -device virtio-scsi-pci,id=virtio_scsi_pci0,addr=0x5 \
    -drive file='bz1017560-rhel7.qcow2',if=none,id=virtio-scsi0-id0,media=disk,cache=none,snapshot=off,format=qcow2,aio=native \
    -device scsi-hd,drive=virtio-scsi0-id0 \
    -device virtio-net-pci,netdev=id1SJzRw,mac='9a:55:56:57:58:59',bus=pci.0,addr=0x3,id='id3Z53kU' \
    -netdev tap,id=id1SJzRw,vhost=on,script=/etc/ovs-ifup,downscript=/etc/ovs-ifdown \
    -m 2048 \
    -smp 2,maxcpus=2,cores=2,threads=1,sockets=1 \
    -cpu 'Penryn' \
    -M rhel6.5.0 \
    -drive file='RHEL-7.0-20140507.0-Server-x86_64-dvd1.iso',if=none,id=virtio-scsi1-id1,media=cdrom,readonly=on,format=raw \
    -device scsi-cd,drive=virtio-scsi1-id1 \
    -device AC97,addr=0x6 \
    -device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1 \
    -vnc :0 \
    -vga cirrus \
    -rtc base=utc,clock=host,driftfix=slew  \
    -boot order=cdn,once=d,menu=off   \
    -no-kvm-pit-reinjection \
    -enable-kvm

>  - copy the initrd and kernel files from the guest to the host after the
> installation

# scp /boot/vmlinuz-3.10.0-123.el7.x86_64 /boot/initramfs-3.10.0-123.el7.x86_64.img root@$HOST_IP:$WORK_DIR

>  - use these files as parameters to qemu-kvm -initrd and -kernel respectively

Command line:
-------------
/usr/libexec/qemu-kvm \
    -name 'virt-tests-vm1' \
    -nodefaults \
    -monitor stdio \
    -device ich9-usb-uhci1,id=usb1,bus=pci.0,addr=0x4 \
    -device virtio-scsi-pci,id=virtio_scsi_pci0,addr=0x5 \
    -drive file='bz1017560-rhel7.qcow2',if=none,id=virtio-scsi0-id0,media=disk,cache=none,snapshot=off,format=qcow2,aio=native \
    -device scsi-hd,drive=virtio-scsi0-id0 \
    -device virtio-net-pci,netdev=id1SJzRw,mac='9a:55:56:57:58:59',bus=pci.0,addr=0x3,id='id3Z53kU' \
    -netdev tap,id=id1SJzRw,vhost=on,script=/etc/ovs-ifup,downscript=/etc/ovs-ifdown \
    -m 2048 \
    -smp 2,maxcpus=2,cores=2,threads=1,sockets=1 \
    -cpu 'Penryn' \
    -M rhel6.5.0 \
    -device AC97,addr=0x6 \
    -device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1 \
    -kernel 'vmlinuz-3.10.0-123.el7.x86_64' \
    -append 'root=UUID=fc569b32-8a54-4451-895c-cd01d27eae21 ro rd.lvm.lv=rhel/root crashkernel=auto  rd.lvm.lv=rhel/swap vconsole.font=latarcyrheb-sun16 vconsole.keymap=us rhgb quiet LANG=en_US.UTF-8' \
    -initrd 'initramfs-3.10.0-123.el7.x86_64.img' \
    -vnc :0 \
    -vga cirrus \
    -rtc base=utc,clock=host,driftfix=slew  \
    -boot order=cdn,once=d,menu=off   \
    -no-kvm-pit-reinjection \
    -enable-kvm


Result:
-------
Guest could booted up normally and did not went into dracut emergency mode.

Comment 11 Fam Zheng 2014-06-23 02:49:44 UTC
So, is there anything we to fix here? If no, we can close this bug.

Fam

Comment 12 Xu Han 2014-06-23 10:14:43 UTC
(In reply to Fam Zheng from comment #11)
> So, is there anything we to fix here? If no, we can close this bug.

I successfully installed rhel7 guest in this scenario.
------------------------------------------------------
18:01:31 INFO | 		GOOD	virt.qemu.repeat1.smp_1.2048m.Host_RHEL.6.5.spice.qcow2.virtio_scsi.up.virtio_net.RHEL.7.0.x86_64.io-github-autotest-qemu.unattended_install.cdrom.floppy_ks.default_install.aio_native	virt.qemu.repeat1.smp_1.2048m.Host_RHEL.6.5.spice.qcow2.virtio_scsi.up.virtio_net.RHEL.7.0.x86_64.io-github-autotest-qemu.unattended_install.cdrom.floppy_ks.default_install.aio_native	timestamp=1403517691	localtime=Jun 23 18:01:31	completed successfully

Command line:
-------------
/usr/bin/qemu-kvm \
    -S  \
    -name 'virt-tests-vm1' \
    -M rhel6.5.0  \
    -nodefaults  \
    -vga qxl  \
    -global qxl-vga.vram_size=33554432 \
    -device intel-hda,bus=pci.0,addr=03 \
    -device hda-duplex  \
    -chardev socket,id=qmp_id_qmpmonitor1,path=/tmp/monitor-qmpmonitor1-20140620-023009-DhNjNUxX,server,nowait \
    -mon chardev=qmp_id_qmpmonitor1,mode=control  \
    -chardev socket,id=serial_id_serial0,path=/tmp/serial-serial0-20140620-023009-DhNjNUxX,server,nowait \
    -device isa-serial,chardev=serial_id_serial0 \
    -device virtio-serial-pci,id=virtio_serial_pci0,bus=pci.0,addr=04  \
    -chardev socket,id=devvs,path=/tmp/virtio_port-vs-20140620-023009-DhNjNUxX,server,nowait \
    -device virtserialport,chardev=devvs,name=vs,id=vs,bus=virtio_serial_pci0.0  \
    -chardev socket,id=seabioslog_id_20140620-023009-DhNjNUxX,path=/tmp/seabios-20140620-023009-DhNjNUxX,server,nowait \
    -device isa-debugcon,chardev=seabioslog_id_20140620-023009-DhNjNUxX,iobase=0x402 \
    -device ich9-usb-uhci1,id=usb1,bus=pci.0,addr=05 \
    -device virtio-scsi-pci,id=virtio_scsi_pci0,bus=pci.0,addr=06 \
    -drive id=drive_image1,if=none,cache=none,snapshot=off,aio=native,file=/root/autotest-devel/client/tests/virt/shared/data/images/RHEL-Server-7.0-64-virtio.qcow2 \
    -device scsi-hd,id=image1,drive=drive_image1 \
    -device virtio-net-pci,mac=9a:72:73:74:75:76,id=idhvFrEM,vectors=4,netdev=idhZfclq,bus=pci.0,addr=07  \
    -netdev tap,id=idhZfclq,vhost=on,vhostfd=23,fd=22  \
    -m 2048  \
    -smp 1,maxcpus=1,cores=1,threads=1,sockets=2  \
    -cpu 'Opteron_G3' \
    -drive id=drive_cd1,if=none,snapshot=off,aio=native,media=cdrom,file=/root/autotest-devel/client/tests/virt/shared/data/isos/linux/RHEL7.0-Server-x86_64.iso \
    -device ide-drive,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=/root/autotest-devel/client/tests/virt/shared/data/images/rhel70-64/ks.vfd \
    -global isa-fdc.driveA=drive_fl \
    -device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1  \
    -kernel '/root/autotest-devel/client/tests/virt/shared/data/images/rhel70-64/vmlinuz'  \
    -append 'ks=hd:fd0:/ks.cfg nicdelay=60 console=ttyS0,115200 console=tty0'  \
    -initrd '/root/autotest-devel/client/tests/virt/shared/data/images/rhel70-64/initrd.img'  \
    -spice port=3000,password=123456,addr=0,tls-port=3200,x509-dir=/tmp/spice_x509d,tls-channel=main,tls-channel=inputs,image-compression=auto_glz,zlib-glz-wan-compression=auto,streaming-video=all,agent-mouse=on,playback-compression=on,ipv4  \
    -rtc base=utc,clock=host,driftfix=slew  \
    -boot order=cdn,once=d,menu=off  \
    -no-kvm-pit-reinjection \
    -no-shutdown \
    -enable-kvm

So, something must be broken in the original environment.
This is not a bug. At least, it is not related to QEMU or kernel.
Please close this. 

Thanks.