One of the main reasons for passing from virtio_blk to virtio_scsi should be hot plug and hot resize (I hoped). But with f17 host and f17 guest it seems not working, at least for me...
On host $ uname -r 3.4.0-1.fc17.x86_64
qemu-kvm command line $ ps -ef|grep f17 qemu 17838 1 24 18:37 ? 00:03:57 /usr/bin/qemu-kvm -S -M pc-0.14 -enable-kvm -m 1024 -smp 1,sockets=1,cores=1,threads=1 -name f17 -uuid 259201b8-0699-6213-c583-e85bd3a05f1e -nodefconfig -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/f17.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=localtime -no-shutdown -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x5 -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -device virtio-scsi-pci,id=scsi0,bus=pci.0,addr=0x6 -drive file=/var/lib/libvirt/images/f17.img,if=none,id=drive-scsi0-0-0-0,format=qcow2 -device scsi-disk,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,id=scsi0-0-0-0,bootindex=1 -drive if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw -device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -netdev tap,fd=24,id=hostnet0,vhost=on,vhostfd=25 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:b0:6c:5f,bus=pci.0,addr=0x3 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -chardev spicevmc,id=charchannel0,name=vdagent -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.spice.0 -spice port=5900,addr=127.0.0.1,disable-ticketing -vga qxl -global qxl-vga.vram_size=67108864 -device intel-hda,id=sound0,bus=pci.0,addr=0x4 -device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x7
$ sudo qemu-img info /var/lib/libvirt/images/f17.img image: /var/lib/libvirt/images/f17.img file format: qcow2 virtual size: 7.0G (7516192768 bytes) disk size: 5.0G cluster_size: 65536
In guest: # fdisk -l /dev/sda
Disk /dev/sda: 7516 MB, 7516192768 bytes 232 heads, 62 sectors/track, 1020 cylinders, total 14680064 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00031461
Device Boot Start End Blocks Id System /dev/sda1 * 2048 1026047 512000 83 Linux /dev/sda2 1026048 14680063 6827008 8e Linux LVM
On host $ sudo qemu-img resize /var/lib/libvirt/images/f17.img +1G Image resized.
$ sudo qemu-img info /var/lib/libvirt/images/f17.img [sudo] password for g.cecchi: image: /var/lib/libvirt/images/f17.img file format: qcow2 virtual size: 8.0G (8589934592 bytes) disk size: 5.0G cluster_size: 65536
But in f17 guest # uname -r 3.4.0-1.fc17.x86_64
# cat /sys/class/scsi_device/2:0:0:0/device/model QEMU HARDDISK
Tried these sort of commands to rescan
# echo "- - -" > /sys/class/scsi_host/host2/scan (expected to work only for new added disk, not resize of pre-existing)
# echo "1" > /sys/class/scsi_device/2:0:0:0/device/rescan
# echo 1 > /sys/block/sda/device/rescan
# echo 1 > /sys/bus/scsi/devices/2:0:0:0/rescan
# blockdev --rereadpt /dev/sda BLKRRPART: Device or resource busy
# partprobe -s /dev/sda /dev/sda: msdos partitions 1 2
But no change in guest .... Any parameter to set for guest or kernel module to load in guest to allow this dynamic change? At this moment in guest:
[root@f17 g.cecchi]# lsmod|grep hot [root@f17 g.cecchi]# lsmod|grep plug [root@f17 g.cecchi]# lsmod|grep acpi [root@f17 g.cecchi]#
Thanks, Gianluca