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