From: Paolo Bonzini <pbonzini@redhat.com>
To: Zhipeng Lu <luzhipeng@cestc.cn>
Cc: "Markus Armbruster" <armbru@redhat.com>,
"open list:Block layer core" <qemu-block@nongnu.org>,
qemu-devel <qemu-devel@nongnu.org>,
"Kevin Wolf" <kwolf@redhat.com>,
"Hanna Reitz" <hreitz@redhat.com>,
"Daniel P.Berrangé" <berrange@redhat.com>,
"Eduardo Habkost" <eduardo@habkost.net>,
"Fam Zheng" <fam@euphon.net>
Subject: Re: [PATCH] blockdev: add 'media=cdrom' argument to support usb cdrom emulated as cdrom
Date: Wed, 7 Dec 2022 09:39:24 +0100 [thread overview]
Message-ID: <CABgObfb9kL2WCHUNQ4KVRAQWZPGBWmKGyaodX5yMChS+9x9PmA@mail.gmail.com> (raw)
In-Reply-To: <718dbdad-4920-d2c8-b3a6-c0f83fd818f1@cestc.cn>
[-- Attachment #1: Type: text/plain, Size: 1764 bytes --]
It should be like this:
-device usb-bot,id=bot0
-device scsi-{cd,hd},bus=bot0.0,drive=drive0
Libvirt has the code to generate the options for SCSI controllers, but
usb-bot only allows one disk attached to it so it's easier to make it a
<drive> element.
Paolo
Il sab 3 dic 2022, 13:52 Zhipeng Lu <luzhipeng@cestc.cn> ha scritto:
> Could you give the detail qemu cmdline about usb-bot?
>
> 在 2022/12/2 17:40, Paolo Bonzini 写道:
> > On 12/2/22 03:26, Zhipeng Lu wrote:
> >> NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
> >> sda 8:0 0 100M 1 disk
> >> vda 252:0 0 10G 0 disk
> >> ├─vda1 252:1 0 1G 0 part /boot
> >> └─vda2 252:2 0 9G 0 part
> >> ├─rhel-root 253:0 0 8G 0 lvm /
> >> └─rhel-swap 253:1 0 1G 0 lvm [SWAP]
> >> lshw -short|grep cdrom -i
> >> No cdrom.
> >>
> >> My patch is to solve this problem, usb cdrom emulated as cdrom.
> >
> > This is a libvirt bug, it should use usb-bot instead of usb-storage
> > together with -blockdev. Then it can add a scsi-cd device below usb-bot.
> >
> > Paolo
> >
> >>
> >>
> >> 在 2022/12/1 23:35, Markus Armbruster 写道:
> >>> luzhipeng <luzhipeng@cestc.cn> writes:
> >>>
> >>>> From: zhipeng Lu <luzhipeng@cestc.cn>
> >>>>
> >>>> The drive interface supports media=cdrom so that the usb cdrom
> >>>> can be emulated as cdrom in qemu, but libvirt deprived the drive
> >>>> interface, so media=cdrom is added to the blockdev interface to
> >>>> support usb cdrom emulated as cdrom
> >>>>
> >>>> Signed-off-by: zhipeng Lu <luzhipeng@cestc.cn>
> >>>
> >>> What problem are you trying to solve?
> >>>
> >>>
> >>>
> >>
> >>
> >>
> >
> >
> >
>
>
>
[-- Attachment #2: Type: text/html, Size: 2905 bytes --]
next prev parent reply other threads:[~2022-12-07 8:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-01 13:42 [PATCH] blockdev: add 'media=cdrom' argument to support usb cdrom emulated as cdrom luzhipeng
2022-12-01 15:35 ` Markus Armbruster
2022-12-02 2:26 ` Zhipeng Lu
2022-12-02 9:40 ` Paolo Bonzini
2022-12-03 12:51 ` Zhipeng Lu
2022-12-07 8:39 ` Paolo Bonzini [this message]
2022-12-09 2:28 ` Zhipeng Lu
2022-12-09 8:57 ` Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CABgObfb9kL2WCHUNQ4KVRAQWZPGBWmKGyaodX5yMChS+9x9PmA@mail.gmail.com \
--to=pbonzini@redhat.com \
--cc=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=eduardo@habkost.net \
--cc=fam@euphon.net \
--cc=hreitz@redhat.com \
--cc=kwolf@redhat.com \
--cc=luzhipeng@cestc.cn \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).