[libvirt-users] Fwd: Connecting disks to controller virtio-scsi of qemu/kvm
chickenmarkus at freenet.de
chickenmarkus at freenet.de
Fri Feb 7 20:33:52 UTC 2014
Hello,
after another issue with discard I understood how it works.
-device virtio-scsi-pci,id=scsi0
--> Creates the controller with id scsi0.
-drive file=/dev/ssd0/sarabi,if=none,id=drive0
--> Initialize only (if=none) an image/volume to use.
-device scsi-hd,bus=scsi0.0,drive=drive0
--> Creates the disk on base of drive0 and connect it to port 0 of
controller scsi0 over bus=scsi0.0.
Thanks for not killing me.
Bye Markus
Am 07.02.2014 16:30, schrieb chickenmarkus at freenet.de:
> Hello,
>
> in another mail list with another issue I had problems with HTML
> content. Due no response I send my question in PLAIN/TEXT again.
>
> Bye Markus
>
>
> -------- Original-Nachricht --------
> Betreff: Connecting disks to controller virtio-scsi of qemu/kvm
> Datum: Wed, 05 Feb 2014 18:37:06 +0100
> Von: chickenmarkus at freenet.de
> An: libvirt-users at redhat.com
>
>
>
> Hello,
>
> I try to use the virtio-scsi driver to use my disks. But my setup at
> first:
>
> * in general Debian Wheezy
> * Kernel: 3.11-0.bpo.2-amd64
> (http://packages.debian.org/wheezy-backports/linux-image-3.11-0.bpo.2-amd64)
> * Qemu-KVM: 1.7.0 (http://packages.debian.org/jessie/qemu-kvm)
> * Virsh 1.2.1 (http://packages.debian.org/jessie/libvirt-bin)
>
> The new kernel and dirty things from Jessie are for discard support
> (also not working with current configuration despite thin volumes with
> working discard). Once I have the this "new" qemu version, why not to
> use virtio...
>
> Every disk with target bus "scsi" gets an own scsi-hd device. Libvirt
> ignores the scsi controller of type virtio-scsi.
> Here is a XML snippet:
>
> <devices>
> <controller type='scsi' model='virtio-scsi' index="0"/>
> <disk type="block" device="disk">
> <source dev="/dev/ssd0/sarabi"/>
> <driver discard="unmap"/>
> <target dev="sda" bus="scsi"/>
> <address type="drive" controller="0" bus=0/>
> </disk>
> </devices>
>
> This creates the virtio-scsi controller (verified by lspci in guest)
> but do not "connect" the disks to it. The resulting command line looks
> following:
>
> kvm [...] -device virtio-scsi-pci,id=scsi0,bus=pci.0,addr=0x5 -drive
> file=/dev/ssd0/sarabi,if=none,id=drive-scsi0-0-0-0,format=raw,discard=unmap
> -device
> scsi-hd,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,id=scsi0-0-0-0,bootindex=2
> [...]
>
>
> How get my disk to run over virtio-scsi? Or did I found something like
> a bug?
>
> Bye Markus
>
>
>
> _______________________________________________
> libvirt-users mailing list
> libvirt-users at redhat.com
> https://www.redhat.com/mailman/listinfo/libvirt-users
More information about the libvirt-users
mailing list