Basic Setup: Files

For people who don't want the hassle and overhead of LVM, Xen supports fast and efficient file-backed block devices using the blktap driver and library.

blktap (blk being the worn-down stub of "block" after being typed hundreds of times) includes a kernel driver and a userspace daemon. The kernel driver directly maps the blocks contained by the backing file, avoiding much of the indirection involved in mounting a file via loopback. It works with many file formats used for virtual block devices, including the basic "raw" image format obtainable by dd ing a block device.

You can create a file using the dd command:

# dd if=/dev/zero of=/opt/xen/anthony.img bs=1M count=1024


Your version of dd might require slightly different syntax—for ...

Get The Book of Xen now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.