I found instructions on how to create a virtual disk for use with virtualbox that points to a raw block device. You can't do it from the ui, but you can do it from the command line:
VBoxManage internalcommands createrawvmdk -filename "</path/to/file>.vmdk" -rawdisk /dev/sda
this works great except it doesn't do direct i/o to the block device so everything ends up in the page cache, and if you know how the page cache works, it spoon feeds the block device dirty pages one at a time. This takes forever on a slow block device.
If virtualbox accessed the block device with direct io then batched reads and writes would go directly to the block device as a batch (a bio with many segments in it) and it would all go a lot more quickly.
I can't find an option anywhere that describes how to do this or if it is even possible. Anybody know of such a thing?
0 Answers