2013-10-31 21:47:25 +00:00
|
|
|
=========================================
|
|
|
|
Install Virtualization for Block Device
|
|
|
|
=========================================
|
2013-10-30 22:20:08 +00:00
|
|
|
|
|
|
|
If you intend to use Ceph Block Devices and the Ceph Storage Cluster as a
|
|
|
|
backend for Virtual Machines (VMs) or :term:`Cloud Platforms` the QEMU/KVM and
|
|
|
|
``libvirt`` packages are important for enabling VMs and cloud platforms.
|
|
|
|
Examples of VMs include: QEMU/KVM, XEN, VMWare, LXC, VirtualBox, etc. Examples
|
|
|
|
of Cloud Platforms include OpenStack, CloudStack, OpenNebula, etc.
|
|
|
|
|
|
|
|
|
2020-04-09 13:25:39 +00:00
|
|
|
.. ditaa::
|
|
|
|
|
|
|
|
+---------------------------------------------------+
|
2013-10-30 22:20:08 +00:00
|
|
|
| libvirt |
|
|
|
|
+------------------------+--------------------------+
|
|
|
|
|
|
|
|
|
| configures
|
|
|
|
v
|
|
|
|
+---------------------------------------------------+
|
|
|
|
| QEMU |
|
|
|
|
+---------------------------------------------------+
|
|
|
|
| librbd |
|
2019-12-16 04:50:50 +00:00
|
|
|
+---------------------------------------------------+
|
|
|
|
| librados |
|
2013-10-30 22:20:08 +00:00
|
|
|
+------------------------+-+------------------------+
|
|
|
|
| OSDs | | Monitors |
|
|
|
|
+------------------------+ +------------------------+
|
|
|
|
|
|
|
|
|
|
|
|
Install QEMU
|
|
|
|
============
|
|
|
|
|
|
|
|
QEMU KVM can interact with Ceph Block Devices via ``librbd``, which is an
|
|
|
|
important feature for using Ceph with cloud platforms. Once you install QEMU,
|
2015-09-18 18:13:21 +00:00
|
|
|
see `QEMU and Block Devices`_ for usage.
|
2013-10-30 22:20:08 +00:00
|
|
|
|
|
|
|
|
|
|
|
Debian Packages
|
|
|
|
---------------
|
|
|
|
|
|
|
|
QEMU packages are incorporated into Ubuntu 12.04 Precise Pangolin and later
|
2015-09-18 18:13:21 +00:00
|
|
|
versions. To install QEMU, execute the following::
|
2013-10-30 22:20:08 +00:00
|
|
|
|
|
|
|
sudo apt-get install qemu
|
2015-09-18 18:13:21 +00:00
|
|
|
|
2013-10-30 22:20:08 +00:00
|
|
|
|
|
|
|
RPM Packages
|
|
|
|
------------
|
|
|
|
|
|
|
|
To install QEMU, execute the following:
|
|
|
|
|
2015-01-15 19:39:01 +00:00
|
|
|
|
2015-09-18 18:13:21 +00:00
|
|
|
#. Update your repositories. ::
|
2013-10-30 22:20:08 +00:00
|
|
|
|
|
|
|
sudo yum update
|
|
|
|
|
2015-09-18 18:13:21 +00:00
|
|
|
#. Install QEMU for Ceph. ::
|
2013-10-30 22:20:08 +00:00
|
|
|
|
|
|
|
sudo yum install qemu-kvm qemu-kvm-tools qemu-img
|
2015-09-18 18:13:21 +00:00
|
|
|
|
|
|
|
#. Install additional QEMU packages (optional)::
|
2013-10-30 22:20:08 +00:00
|
|
|
|
|
|
|
sudo yum install qemu-guest-agent qemu-guest-agent-win32
|
2015-09-18 18:13:21 +00:00
|
|
|
|
2013-10-30 22:20:08 +00:00
|
|
|
|
|
|
|
Building QEMU
|
|
|
|
-------------
|
|
|
|
|
|
|
|
To build QEMU from source, use the following procedure::
|
|
|
|
|
|
|
|
cd {your-development-directory}
|
|
|
|
git clone git://git.qemu.org/qemu.git
|
|
|
|
cd qemu
|
|
|
|
./configure --enable-rbd
|
|
|
|
make; make install
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Install libvirt
|
|
|
|
===============
|
|
|
|
|
|
|
|
To use ``libvirt`` with Ceph, you must have a running Ceph Storage Cluster, and
|
|
|
|
you must have installed and configured QEMU. See `Using libvirt with Ceph Block
|
|
|
|
Device`_ for usage.
|
|
|
|
|
|
|
|
|
|
|
|
Debian Packages
|
|
|
|
---------------
|
|
|
|
|
|
|
|
``libvirt`` packages are incorporated into Ubuntu 12.04 Precise Pangolin and
|
|
|
|
later versions of Ubuntu. To install ``libvirt`` on these distributions,
|
2015-09-18 18:13:21 +00:00
|
|
|
execute the following::
|
2013-10-30 22:20:08 +00:00
|
|
|
|
|
|
|
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 Ceph
|
|
|
|
Storage Cluster and you must also install a version of QEMU with ``rbd`` format
|
2013-10-31 21:47:25 +00:00
|
|
|
support. See `Install QEMU`_ for details.
|
2013-10-30 22:20:08 +00:00
|
|
|
|
|
|
|
|
2015-09-18 18:13:21 +00:00
|
|
|
``libvirt`` packages are incorporated into the recent CentOS/RHEL distributions.
|
|
|
|
To install ``libvirt``, execute the following::
|
2013-10-30 22:20:08 +00:00
|
|
|
|
|
|
|
sudo yum install libvirt
|
|
|
|
|
|
|
|
|
|
|
|
Building ``libvirt``
|
|
|
|
--------------------
|
|
|
|
|
|
|
|
To build ``libvirt`` from source, clone the ``libvirt`` repository and use
|
|
|
|
`AutoGen`_ to generate the build. Then, execute ``make`` and ``make install`` to
|
|
|
|
complete the installation. For example::
|
|
|
|
|
|
|
|
git clone git://libvirt.org/libvirt.git
|
|
|
|
cd libvirt
|
|
|
|
./autogen.sh
|
|
|
|
make
|
2015-09-18 18:13:21 +00:00
|
|
|
sudo make install
|
2013-10-30 22:20:08 +00:00
|
|
|
|
|
|
|
See `libvirt Installation`_ for details.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. _libvirt Installation: http://www.libvirt.org/compiling.html
|
|
|
|
.. _AutoGen: http://www.gnu.org/software/autogen/
|
|
|
|
.. _QEMU and Block Devices: ../../rbd/qemu-rbd
|
2015-09-18 18:13:21 +00:00
|
|
|
.. _Using libvirt with Ceph Block Device: ../../rbd/libvirt
|