Xen: Failed to find an unused loop device

I had to start a new Xen domU this afternoon,

xm create vm#.domain

But this resulted in following error:

Error: Device 5632 (vbd) could not be connected.
Failed to find an unused loop device

Solution:

Create /etc/modprobe.d/local-loop.conf with this content:

options loop max_loop=64

Turn off all DomUs, yes, bummer. You’ll need to reload the loop module which won’t work if Xen is still using them. xm list should only display Domain-0.

modprobe -r loop && modprobe loop

And restart all DomUs. You can now create 32 (64/2 ~= # of DomUs; increase if you need more) DomUs.

You can check (before & after) the difference in loop back devices: ls -ls /dev | grep loop | wc -l

Leave a Reply...