Hide Forgot
host info: # uname -r && rpm -q qemu-kvm 3.10.0-34.el7.x86_64 qemu-kvm-1.5.3-9.el7.x86_64 iSCSI LUN: # fdisk /dev/sdb Disk /dev/sdb: 32.2 GB, 32212254720 bytes, 62914560 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 label type: dos Disk identifier: 0xc09bd2e5 e.g:...-drive file=/dev/sdb,if=none,id=drive-data-disk,format=raw,aio=native -device virtio-scsi-pci,bus=pci.0,addr=0x7,id=scsi0 -device scsi-block,drive=drive-data-disk,id=data-disk,bus=scsi0.0 -vnc :1 -monitor stdio QEMU 1.5.3 monitor - type 'help' for more information (qemu) info block drive-data-disk: removable=0 io-status=ok file=/dev/sdb ro=0 drv=raw encrypted=0 bps=0 bps_rd=0 bps_wr=0 iops=0 iops_rd=0 iops_wr=0 ide1-cd0: removable=1 locked=0 tray-open=0 io-status=ok [not inserted] floppy0: removable=1 locked=0 tray-open=0 [not inserted] sd0: removable=1 locked=0 tray-open=0 [not inserted] (qemu) block_resize drive-data-disk 10G (qemu) block_resize drive-data-disk 20G (qemu) block_resize drive-data-disk 30G (qemu) block_resize drive-data-disk 40G Could not resize: Invalid argument But checked that there was no any info about disk changes in guest. Best Regards, sluo
This is expected behavior. Because the capacity is retrieved directly from the disk, block_resize cannot change it (there is no "resize" SCSI command to send to the disk). "Do not shrink" is safe but "do not enlarge" is unsafe, so QEMU is simply checking that you are not asking for more space than allowed.