qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] virtio block device and sysfs


From: Anthony Liguori
Subject: Re: [Qemu-devel] virtio block device and sysfs
Date: Tue, 09 Mar 2010 15:34:07 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.5) Gecko/20091209 Fedora/3.0-4.fc12 Lightning/1.0pre Thunderbird/3.0

On 03/06/2010 04:42 PM, Marc Haber wrote:
Hi,

I am looking to get in touch with somebody who knows more about the
connection between host configuration, qemu, kvm, and the virtio block
device driver guest side than I know.

My goal is to have a possibility to give a "speaking" name to any
block device handed into a guest instance by the host. That name
should be visible inside the guest, just as a LV is visible with its
name in the system running the LVM.

For example I would like to say on the qemu or kvm command line
'-drive file=some-file,label=some-label,if=virtio', and have the
string "some-label" show up somewhere in /sys/block in the guest, much
as /sys/block/sda/device/model shows the hardware vendor and type for
a standard SATA disk. The guest could then handle the information
passed into it by the host with udev rules, allowing fstab constructs
like "mount /dev/virtio/block/by-label/some-label as /usr"

You probably would just want to plumb ,serial=X into the virtio-blk config space and have the driver use it. Then you can do /dev/block/by-id/XXXXX

John attempted this and it was reverted because the implementation exhausted the PCI config space.

Regards,

Anthony Liguori

Since I don't have pretty much clue about kernel programming, I guess
that one would need to have qemu/kvm support for the additional label
to be passed to the emulated/virtualized guest, and a modification to
the guest kernel virtio driver which needs to accept the information
passed by the host and to generate the appropriate entry in /sys.

Am I correct in my assumption? Can you say who I need to talk to to
get advice about how to implement this (or to have it implemented, if
it's easy enough)?

Any hints will be appreciated.

Greetings
Marc






reply via email to

[Prev in Thread] Current Thread [Next in Thread]