One of my friend was trying to run ‘hdparm’ command against guest disk called ‘vdb’ and received above mentioned error.
[root@lap]hdparm -t /dev/vdb
HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Inappropriate ioctl for device
If the guest disk is shown as ‘vda,vdb..etc’ , those are virtio disks which run by virtio bus.
‘hdparm’ is a command which have to be shot against SATA/IDE disk as mentioned in ‘hdparm’ man page.
The passed ‘ioctl’ errored out as in ‘HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Inappropriate ioctl for device.’ so, dont use ‘hdparm’ against kvm virtio guest disks..