[ kvm-Bugs-2091534 ] Guests see 2 CD drives if one is specified with -drive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Bugs item #2091534, was opened at 2008-09-03 19:27
Message generated for change (Comment added) made by jessorensen
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=893831&aid=2091534&group_id=180599

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: qemu
Group: None
>Status: Closed
>Resolution: Out of Date
Priority: 5
Private: No
Submitted By: Roman Yepishev (rtg20)
Assigned to: Nobody/Anonymous (nobody)
Summary: Guests see 2 CD drives if one is specified with -drive

Initial Comment:
Host: 2.6.24-19 (Ubuntu Hardy 8.04.1)
Guest: RHEL5, CentOS 5.2 (2.6.18-92.1.10.el5) on i686, FreeBSD7 on x86_64
Version: kvm-74
BIOS: $Revision: 1.182 $ $Date: 2007/08/01 17:09:51 $

Commandline: 
/usr/bin/kvm -M pc -m 500 -smp 1 -monitor pty \
-drive file=/home/rtg/vm/RHEL/RHEL.img,if=ide,boot=on \
-drive file=/home/rtg/Downloads/Linux/rhel-5.2-server-i386-dvd.iso,if=ide,media=cdrom \
-net nic,macaddr=52:54:00:00:00:02,vlan=0 \
-net tap,fd=11,script=,vlan=0 -usb -vnc 127.0.0.1:0

Guests see 2 CD drives when CD drive is specified via -drive flag:
hda: QEMU HARDDISK, ATA DISK drive
hdb: QEMU DVD-ROM, ATAPI CD/DVD-ROM drive
hdc: QEMU DVD-ROM, ATAPI CD/DVD-ROM drive
hda: max request size: 512KiB
hda: 16777216 sectors (8589 MB) w/256KiB Cache, CHS=16383/255/63, (U)DMA
hda: cache flushes supported
 hda: hda1 hda2
hdb: ATAPI 4X CD-ROM drive, 512kB Cache, (U)DMA
hdc: ATAPI 4X CD-ROM drive, 512kB Cache, (U)DMA

This does not happen when -cdrom & -hda is used. 

----------------------------------------------------------------------

>Comment By: Jes Sorensen (jessorensen)
Date: 2010-08-19 12:28

Message:
Closing per rtg20's comment on 2008/09/04.



----------------------------------------------------------------------

Comment By: Jes Sorensen (jessorensen)
Date: 2010-07-01 09:51

Message:
Hi,

Just checking, are you still seeing this problem? I use recent
libvirt/qemu/kvm regularly and haven't seen anything like this for a long
long time.

Thanks,
Jes
 

----------------------------------------------------------------------

Comment By: Roman Yepishev (rtg20)
Date: 2008-09-04 21:27

Message:
Logged In: YES 
user_id=1445483
Originator: YES

Ok, please resolve this ticket. The latest libvirt (0.4.4) supplies valid
-drive file=/home/rtg/vm/RHEL/RHEL.img,if=ide,index=0,boot=on -drive
file=/home/rtg/Downloads/Linux/rhel-5.2-server-i386-dvd.iso,if=ide,media=cdrom,index=2.
So this is now out of the scope of this ticket. 

Thanks!

----------------------------------------------------------------------

Comment By: Laurent Vivier (lvivier)
Date: 2008-09-04 19:49

Message:
Logged In: YES 
user_id=400005
Originator: NO

There is no way to create machine without CD-ROM, SD card or floppy.

BTW, this not a KVM issue but a Qemu one.

Contact qemu-devel@xxxxxxxxxx

----------------------------------------------------------------------

Comment By: Roman Yepishev (rtg20)
Date: 2008-09-04 19:40

Message:
Logged In: YES 
user_id=1445483
Originator: YES

Ok, this makes sense. The commandline is constructed by libvirt's libvirtd
and it seems to ignore <target dev='hdc' /> node. If it is possible to
attach the cdrom to any interface then there is no need to patch the
behaviour w/o index, livbirtd needs one :)
However this raises the question: how to create a virtual machine without
any physical cdrom device,SD card and floppy as they are all created
automatically even if no devices were requested? 


----------------------------------------------------------------------

Comment By: Laurent Vivier (lvivier)
Date: 2008-09-04 16:57

Message:
Logged In: YES 
user_id=400005
Originator: NO

By default, "-drive" take the first empty connector available.
In your case, the first empty connector is ide0/slave, so your "-drive
file=...,media=cdrom" is connected to ide0/slave.
But by default, qemu also creates an empty ATAPI cdrom at ide1/master,
it's why you have two CD-ROMs.

two solutions:
- specify an index, as the "-cdrom" does: "-drive
file=...,media=cdrom,index=2"
OR
- modify the default behavior of "-driver file=...,media=cdrom" when no
index is provided (I can provide a patch)

----------------------------------------------------------------------

Comment By: Roman Yepishev (rtg20)
Date: 2008-09-03 23:22

Message:
Logged In: YES 
user_id=1445483
Originator: YES

-drive file=/home/rtg/vm/RHEL/RHEL.img,if=ide,boot=on
-drive
file=/home/rtg/Downloads/Linux/rhel-5.2-server-i386-dvd.iso,if=ide,media=cdrom:

(qemu) info block
ide0-hd0: type=hd removable=0 file=/home/rtg/vm/RHEL/RHEL.img ro=0
drv=raw
ide0-cd1: type=cdrom removable=1 locked=0
file=/home/rtg/Downloads/Linux/rhel-5.2-server-i386-dvd.iso ro=0 drv=raw
ide1-cd0: type=cdrom removable=1 locked=0 [not inserted]
floppy0: type=floppy removable=1 locked=0 [not inserted]
sd0: type=floppy removable=1 locked=0 [not inserted]

-hda /home/rtg/vm/RHEL/RHEL.img 
-cdrom /home/rtg/Downloads/Linux/rhel-5.2-server-i386-dvd.iso:
(qemu) info block
ide0-hd0: type=hd removable=0 file=/home/rtg/vm/RHEL/RHEL.img ro=0
drv=raw
ide1-cd0: type=cdrom removable=1 locked=0
file=/home/rtg/Downloads/Linux/rhel-5.2-server-i386-dvd.iso ro=0 drv=raw
floppy0: type=floppy removable=1 locked=0 [not inserted]
sd0: type=floppy removable=1 locked=0 [not inserted]

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=893831&aid=2091534&group_id=180599
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux