This is the documentation for the deprecated product VMmanager 5. It is no longer updated and may be irrelevant. Documentation for the current version of VMmanager can be found in the VMmanager 6 section.
The virtual disk of a virtual machine is the HDD image. Virtual disks are stored in a local or network storage. RBD is a network storage which is a distributed file system designed to provide excellent reliability. For more information please refer to the article Network storages.
Installation
-
Install Ceph:
rpm --import 'https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc' rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm yum install snappy leveldb gdisk python-argparse gperftools-libs rpm -Uvh http://ceph.com/rpm-cuttlefish/el6/noarch/ceph-release-1-0.el6.noarch.rpm yum install ceph -
Install the plug-in YUM Priorities (for QEMU installation from the Ceph repository):
yum install yum-plugin-priorities -
Enable the plug-in the configuration file /etc/yum/pluginconf.d/priorities.conf:
[main] enabled = 1 -
Create the file /etc/yum.repos.d/ceph-qemu.repo with the following contents:
[ceph-qemu] name=Ceph Packages for QEMU baseurl=http://ceph.com/packages/ceph-extras/rpm/rhel6/$basearch enabled=1 priority=2 gpgcheck=1 type=rpm-md gpgkey=https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc [ceph-qemu-noarch] name=Ceph QEMU noarch baseurl=http://ceph.com/packages/ceph-extras/rpm/rhel6/noarch enabled=1 priority=2 gpgcheck=1 type=rpm-md gpgkey=https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc [ceph-qemu-source] name=Ceph QEMU Sources baseurl=http://ceph.com/packages/ceph-extras/rpm/rhel6/SRPMS enabled=1 priority=2 gpgcheck=1 type=rpm-md gpgkey=https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc -
Install QEMU from Ceph:
yum update yum install qemu-img qemu-kvm qemu-kvm-tools
How VMmanager works with RBD-storage
When creating the RBD-storage VMmanager is trying to find the ceph cluster monitor specified on the cluster creation form using the key that is normally located in /usr/local/mgr5/etc/ssh_id_rsa. Then VMmanager performs the following operations:
-
Adds the storage with the same name as in VMmanager:
ceph osd pool create <Имя_хранилища> 128 128 -
Checks/adds a ceph user-client (the client name is specified by the CephAuthUserName parameter in the vmmgr.conf configuration file, the default value is vmmgr):
ceph auth get-or-create client.<имя_клиента> mon 'allow r' osd 'allow class-read object_prefix rbd_children, allow rwx pool=<имя_хранилища>' - Creates a "secret" in libvirt and adds the above key.
- Defines a list of cluster monitors and specifies it into the rbdmonitor table of the database.
When adding a new hard drive image in the RBD-storage, VMmanager connects via ssh to the first monitor of the cluster and executes the command
qemu-img create -f rbd rbd:<имя_хранилища>/<Имя_образа> 2GExecute the command when deleting the disk:
rbd -p <имя_хранилища> rm <Имя_образа>
En
Es