Setting up KVM guests with DRBD block device for storage using vmbuilder or virt-manager
On 06/11/2012 01:41 AM, Hans Vos wrote:
I've been working all weekend on getting this work but I can't find any
good documentation or tutorials for creating KVM guests using DRBD block
devices for storage. My setup consists of two identical servers with
Ubuntu 12.04. I have successfully installed them and configured my
network bridge and DRBD block device.
Ideally I would like to be able to create a new KVM guests using
virt-manager on my Ubuntu desktop machine. This way I can install the
KVM quest like I would normally install a server. I can setup the
connection but I have no idea how to configure the storage pool to make
use of the DRBD device (/dev/drbd0) or how to make use of my network
bridge. It defaults to NAT networking. But using vmbuilder tool would be
acceptable also. I have followed several tutorials but none of them
cover the use of a DRBD block device for storage.
How can I get this to work? Do I maybe have to setup an LVM layer on top
of my DRBD device and add that to the libvirt storage pool
configuration? What kind of command should I run to try to get vmbuilder
to create a KVM guest with my DRBD block device?
Over a year ago I tried setting up a Xen guest under CentOS using a DRBD
block device by following the DRBD documentation
(http://www.drbd.org/users-guide/ch-xen.html). I have no idea why this
is so much harder with KVM. Since both CentOS and Ubuntu have switched
to KVM and Ubuntu is my distribution of choice I would like to setup
something similar using Ubuntu.
I managed to get the setup working I was looking for and written a
tutorial for other people to use. Any feedback on the tutorial is