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 593544 - The default value of "if" in -drive should set to be "none"
Summary: The default value of "if" in -drive should set to be "none"
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.0
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Gerd Hoffmann
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 580953
TreeView+ depends on / blocked
 
Reported: 2010-05-19 05:37 UTC by Mike Cao
Modified: 2013-01-09 22:35 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-05-25 15:34:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Mike Cao 2010-05-19 05:37:19 UTC
Description of problem:

Version-Release number of selected component (if applicable):
#uname -r
2.6.32-25.el6.x86_64
# rpm -q qemu-kvm
qemu-kvm-0.12.1.2-2.53.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1.start a vm with virtio blocks and without "if" param in -drive by using:
 /usr/libexec/qemu-kvm -rtc-td-hack -no-hpet -usbdevice tablet -drive file=/RHEL-Server-6.0-64-virtio.raw,media=disk,cache=none,id=test -device virtio-blk-pci,drive=test,physical_block_size=1024,min_io_size=2048,opt_io_size=4096 -net nic,macaddr=20:10:43:23:33:42,model=e1000,vlan=0 -net tap,script=/etc/qemu-ifup,vlan=0 -uuid `uuidgen` -vnc :6 -boot dc -cpu qemu64,+sse2 -smp 2 -m 2G -balloon none -startdate now
2.check disk by using "fdisk -l"
3.start a vm with virtio blocks and without "if" param in -drive by using:
/usr/libexec/qemu-kvm -rtc-td-hack -no-hpet -usbdevice tablet -drive file=/RHEL-Server-6.0-64.raw,media=disk,cache=none,id=test -device ide-block,drive=test,physical_block_size=1024,min_io_size=2048,opt_io_size=4096 -net nic,macaddr=20:10:43:23:33:42,model=e1000,vlan=0 -net tap,script=/etc/qemu-ifup,vlan=0 -uuid `uuidgen` -vnc :6 -boot dc -cpu qemu64,+sse2 -smp 2 -m 2G -balloon none -startdate now
4 check disk by using "fdisk -l"
  
Actual results:
after step2, It shows 2 disks info ,/dev/vda and /dev/sda
after step3, It shows 2 disks info ,/dev/sda and /dev/sdb

Expected results:
After step2, It shows only 1 disk info:/dev/vda
After step4, It shows only 1 disk info:/dev/sda

Additional info:
start a vm with "if=none‘ in -drive:
/usr/libexec/qemu-kvm -rtc-td-hack -no-hpet -usbdevice tablet -drive file=/RHEL-Server-6.0-64-virtio.raw,if=none, media=disk,cache=none,id=test -device virtio-blk-pci,drive=test,physical_block_size=1024,min_io_size=2048,opt_io_size=4096 -net nic,macaddr=20:10:43:23:33:42,model=e1000,vlan=0 -net tap,script=/etc/qemu-ifup,vlan=0 -uuid `uuidgen` -vnc :6 -boot dc -cpu qemu64,+sse2 -smp 2 -m 2G -balloon none -startdate now

In the guest can only find 1 disk info:/dev/vda.and it should be this.

I think the resason is there're 2 parts can decide blocks type,the one is the value of "if" in -drive,the other is -device's first parameter,when using -drive ,We should always set 'if=none' in -drive .Since now the default value of "if" is "ide",I think change it "none" may be better.

Comment 2 Gerd Hoffmann 2010-05-25 15:34:26 UTC
if=ide is the default for historical reasons and this will most likely
not be changed upstream to maintain backward compatibility with older
versions.  It can be a bit annoying at times but this doesn't justify
diverging from upstream here.


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