Re: [PATCH 0/6] qemu: Fix cdrom as SCSI hostdev via -blockdev

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

 



Greetings All,

> Sent: Thursday, October 15, 2020 at 6:25 PM
> From: "Peter Krempa" <pkrempa@xxxxxxxxxx>
> To: libvir-list@xxxxxxxxxx
> Cc: "daggs" <daggs@xxxxxxx>
> Subject: [PATCH 0/6] qemu: Fix cdrom as SCSI hostdev via -blockdev
>
> -drive detects whether a device is a cdrom automatically but we need to
> use 'host_cdrom' when using blockdev explicitly. Fix the hostdev code
> which was recently converted to -blockdev.
>
> Warning:
>
> I _don't_ have a box with a CDROM handy so this code is not tested in action!
>
> Peter Krempa (6):
>   qemuProcessCreatePretendCmd: Split up preparation and command building
>   qemu: hostdev: Prepare definition bits in qemuDomainPrepareHostdev
>   qemu: Prepare hostdev data which depends on the host state separately
>   qemuxml2argvmock: Remove mocking of 'virSCSIDeviceGetSgName'
>   qemu: Detect whether a SCSI hostdev is a cdrom
>   qemu: Add test cases for 'host_cdrom' blockdev backend via <disk>

I've tested the bellow on libvirt 6.8.0, I wasn't able to get it to work, with the same entry as the example, e.g.:
    <hostdev mode='subsystem' type='scsi' managed='yes'>
      <source>
        <adapter name='cdrom'/>
        <address bus='0' target='0' unit='0'/>
      </source>
      <readonly/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </hostdev>
I get this error:
error: XML error: SCSI host device doesn't support managed mode.

if I mark the managed as no (like other pci pass-through devices I have in the vm), I get this error:
error: internal error: Cannot parse adapter 'cdrom'

full machine xml can be found at https://dpaste.com/G32WWAJA2

Dagg.





[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]

  Powered by Linux