Re: Qemu: create empty cdrom

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

 



On 14.10.2016 22:16, Stefan Hajnoczi wrote:
> On Fri, Feb 5, 2016 at 2:56 PM, Gromak Yuriy <sewer@xxxxxxxxxxxx> wrote:
>> Qemu is latest from master branch.
>> Tryingto start a domain, which is connected toa blankcdrom:
>>
>>         <disk type='file' device='cdrom'>
>>           <driver name='qemu' type='raw'/>
>>           <target dev='sdb' bus='scsi'/>
>>           <readonly/>
>>           <address type='drive' controller='0' target='1' bus='0' unit='0'/>
>>         </disk>
>>
>> But I get an error:
>>
>> qemu-system-x86_64: -drive
>> if=none,id=drive-scsi0-0-1-0,readonly=on,format=raw: Can't use 'raw' as a
>> block driver for the protocol level.
> 
> Mathieu hit the same problem with a QEMU 2.6 backport for Debian
> jessie.  His libvirt version is based on 1.2.9.
> 
> QEMU began printing this error starting from version 2.6.0.
> 
> I think newer libvirt versions have compensated.  There is no error
> when I use Mathieu's domain XML with libvirt based on 1.3.3 (Fedora
> 24).
> 
> Looks like you need a modern libvirt to run against a modern QEMU.

Correct, Stefan's right.
This issue has been fixed in this commit:

commit d7db33bfe978c89e1302609ac91e65be3d49379f
Author:     Michal Privoznik <mprivozn@xxxxxxxxxx>
AuthorDate: Mon Dec 28 15:13:52 2015 +0100
Commit:     Michal Privoznik <mprivozn@xxxxxxxxxx>
CommitDate: Tue Jan 5 16:41:16 2016 +0100

    qemu: Specify format= iff disk source is not empty
    
    Just recently, qemu forbade specifying format for sourceless
    disks (qemu commit 39c4ae941ed992a3bb5). It kind of makes sense.
    If there's no file to open, why specify its format. Anyway, I
    have a domain like this:
    
        <disk type='file' device='cdrom'>
          <driver name='qemu' type='raw'/>
          <target dev='hda' bus='ide'/>
          <readonly/>
          <address type='drive' controller='0' bus='0' target='0' unit='0'/>
        </disk>
    
    and obviously I am unable to start it. Therefore, a fix on our
    side is needed too.
    
    Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>

which is contained in the 1.3.1 release.

Michal

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]