Fix some bugs when testing opensds ansible
[stor4nfv.git] / src / ceph / doc / install / install-vm-cloud.rst
1 =========================================
2  Install Virtualization for Block Device
3 =========================================
4
5 If you intend to use Ceph Block Devices and the Ceph Storage Cluster as a
6 backend for Virtual Machines (VMs) or  :term:`Cloud Platforms` the QEMU/KVM and
7 ``libvirt`` packages are important for enabling VMs and cloud platforms.
8 Examples of VMs include: QEMU/KVM, XEN, VMWare, LXC, VirtualBox, etc. Examples
9 of Cloud Platforms include OpenStack, CloudStack, OpenNebula, etc.
10
11
12 .. ditaa::  +---------------------------------------------------+
13             |                     libvirt                       |
14             +------------------------+--------------------------+
15                                      |
16                                      | configures
17                                      v
18             +---------------------------------------------------+
19             |                       QEMU                        |
20             +---------------------------------------------------+
21             |                      librbd                       |
22             +------------------------+-+------------------------+
23             |          OSDs          | |        Monitors        |
24             +------------------------+ +------------------------+
25
26
27 Install QEMU
28 ============
29
30 QEMU KVM can interact with Ceph Block Devices via ``librbd``, which is an
31 important feature for using Ceph with cloud platforms. Once you install QEMU,
32 see `QEMU and Block Devices`_ for usage.
33
34
35 Debian Packages
36 ---------------
37
38 QEMU packages are incorporated into Ubuntu 12.04 Precise Pangolin and later
39 versions. To  install QEMU, execute the following::
40
41         sudo apt-get install qemu
42
43
44 RPM Packages
45 ------------
46
47 To install QEMU, execute the following:
48
49
50 #. Update your repositories. ::
51
52         sudo yum update
53
54 #. Install QEMU for Ceph. ::
55
56         sudo yum install qemu-kvm qemu-kvm-tools qemu-img
57
58 #. Install additional QEMU packages (optional)::
59
60         sudo yum install qemu-guest-agent qemu-guest-agent-win32
61
62
63 Building QEMU
64 -------------
65
66 To build QEMU from source, use the following procedure::
67
68         cd {your-development-directory}
69         git clone git://git.qemu.org/qemu.git
70         cd qemu
71         ./configure --enable-rbd
72         make; make install
73
74
75
76 Install libvirt
77 ===============
78
79 To use ``libvirt`` with Ceph, you must have a running Ceph Storage Cluster, and
80 you must have installed and configured QEMU. See `Using libvirt with Ceph Block
81 Device`_ for usage.
82
83
84 Debian Packages
85 ---------------
86
87 ``libvirt`` packages are incorporated into Ubuntu 12.04 Precise Pangolin and
88 later versions of Ubuntu. To install ``libvirt`` on these distributions,
89 execute the following::
90
91         sudo apt-get update && sudo apt-get install libvirt-bin
92
93
94 RPM Packages
95 ------------
96
97 To use ``libvirt`` with a Ceph Storage Cluster, you must  have a running Ceph
98 Storage Cluster and you must also install a version of QEMU with ``rbd`` format
99 support.  See `Install QEMU`_ for details.
100
101
102 ``libvirt`` packages are incorporated into the recent CentOS/RHEL distributions.
103 To install ``libvirt``, execute the following::
104
105         sudo yum install libvirt
106
107
108 Building ``libvirt``
109 --------------------
110
111 To build ``libvirt`` from source, clone the ``libvirt`` repository and use
112 `AutoGen`_ to generate the build. Then, execute ``make`` and ``make install`` to
113 complete the installation. For example::
114
115         git clone git://libvirt.org/libvirt.git
116         cd libvirt
117         ./autogen.sh
118         make
119         sudo make install
120
121 See `libvirt Installation`_ for details.
122
123
124
125 .. _libvirt Installation: http://www.libvirt.org/compiling.html
126 .. _AutoGen: http://www.gnu.org/software/autogen/
127 .. _QEMU and Block Devices: ../../rbd/qemu-rbd
128 .. _Using libvirt with Ceph Block Device: ../../rbd/libvirt