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

Re: [libvirt] [PATCH]: Fix Qemu CD-ROM with no source

Daniel P. Berrange wrote:
> On Tue, Jul 29, 2008 at 12:07:37PM +0200, Chris Lalancette wrote:
>> The new generic domain re-factor introduced a small regression into the drive
>> handling code.  In particular, if you had a section of XML like:
>>     <disk type='file' device='cdrom'>
>>       <target dev='hdc' bus='ide'/>
>>       <readonly/>
>>     </disk>
>> This used to work with older libvirt, but now fails.  This is because we are
>> actually passing the literal string (null) to the qemu command-line, which qemu
>> barfs on.  This patch fixes it up by making it blank, which allows qemu to
>> continue on it's merry way.
>> Signed-off-by: Chris Lalancette <clalance redhat com>
> ACK, looks fine. The other branch for QEMU without -drive, will simply
> omit the '-cdrom' arg, which is correct behaviour because QEMU adds an
> implicit CDROM device in that case.

Oh, btw: even qemu with -drive implicitly adds and cdrom drive (ide1
master).  Unless you configure something else there of course.  So you
can end up with two virtual cdrom drives even with only one specified on
the command line (happens in case you connect the cdrom to something
other than ide1 master).  And there are some other implicit block
devices (floppy and sd card).  Try 'info block' on the monitor ;)

Just for completeness, in case anyone cares ...



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