Install Virtualization for Block Device

If you intend to use Ceph Block Devices and the Ceph Storage Cluster as abackend for Virtual Machines (VMs) or Cloud Platforms the QEMU/KVM andlibvirt packages are important for enabling VMs and cloud platforms.Examples of VMs include: QEMU/KVM, XEN, VMWare, LXC, VirtualBox, etc. Examplesof Cloud Platforms include OpenStack, CloudStack, OpenNebula, etc.

Install Virtualization for Block - 图1

Install QEMU

QEMU KVM can interact with Ceph Block Devices via librbd, which is animportant feature for using Ceph with cloud platforms. Once you install QEMU,see QEMU and Block Devices for usage.

Debian Packages

QEMU packages are incorporated into Ubuntu 12.04 Precise Pangolin and laterversions. To install QEMU, execute the following:

  1. sudo apt-get install qemu

RPM Packages

To install QEMU, execute the following:

  • Update your repositories.
  1. sudo yum update
  • Install QEMU for Ceph.
  1. sudo yum install qemu-kvm qemu-kvm-tools qemu-img
  • Install additional QEMU packages (optional):
  1. sudo yum install qemu-guest-agent qemu-guest-agent-win32

Building QEMU

To build QEMU from source, use the following procedure:

  1. cd {your-development-directory}
  2. git clone git://git.qemu.org/qemu.git
  3. cd qemu
  4. ./configure --enable-rbd
  5. make; make install

Install libvirt

To use libvirt with Ceph, you must have a running Ceph Storage Cluster, andyou must have installed and configured QEMU. See Using libvirt with Ceph BlockDevice for usage.

Debian Packages

libvirt packages are incorporated into Ubuntu 12.04 Precise Pangolin andlater versions of Ubuntu. To install libvirt on these distributions,execute the following:

  1. sudo apt-get update && sudo apt-get install libvirt-bin

RPM Packages

To use libvirt with a Ceph Storage Cluster, you must have a running CephStorage Cluster and you must also install a version of QEMU with rbd formatsupport. See Install QEMU for details.

libvirt packages are incorporated into the recent CentOS/RHEL distributions.To install libvirt, execute the following:

  1. sudo yum install libvirt

Building libvirt

To build libvirt from source, clone the libvirt repository and useAutoGen to generate the build. Then, execute make and make install tocomplete the installation. For example:

  1. git clone git://libvirt.org/libvirt.git
  2. cd libvirt
  3. ./autogen.sh
  4. make
  5. sudo make install

See libvirt Installation for details.