Xen Block Devices Usage tap2:aio

In case of getting max loop devices reached and have already built image of VM and you CAN't restart machine to increase max_loop=XX when loading loop module,
use tap:aio.


#> apt-get install blktap-dkms blktap-utils
#> modprobe blktap

Then change the config of vm from file:/ to tap2:tapdisk:aio:/
Something like this:

bootloader = '/usr/lib/xen-4.1/bin/pygrub'
vcpus = '1'
memory = '512'
root = '/dev/xvda2 ro'
disk = [
'tap2:tapdisk:aio:/home/xen//domains/virtual.com/disk.img,xvda2,w',
'tap2:tapdisk:aio:/home/xen/domains/virtual.com/swap.img,xvda1,w',
]
name = 'virtual.com'
vif = [ 'ip=192.168.10.100 ,mac=01:06:1A:12:FE:C5' ]
on_poweroff = 'destroy'
on_reboot = 'restart'
on_crash = 'restart'