Virt-Manager: Launch VM Stored on Ceph
Introduction
This document provides essential steps for verifying the installation of Ceph client packages, converting and moving virtual machine disk images to a Ceph cluster, and launching these images from Virt-Manager. By following this guide, you will ensure a seamless process of managing VM disk files within your Ceph environment and leveraging the powerful features of Ceph’s RBD pools for efficient storage and retrieval.
Verify Ceph Client Package is Installed
To verify that the ceph-common
is installed run the which
command on a command from that package.
which rbd
Output
/usr/bin/rbd
If the ceph-common
is not installed then refer to Install Client Ceph Packages for getting that package added to your linux environment.
Move/Convert VM Disk Image to Ceph Cluster
If you have a existing qcow file or some other vm disk file that needs to be added onto the Ceph Cluster, follow the below procedure in order to store the disk image on an RBD pool.
Note Ceph recommends using the raw
format for VM disk files.
qemu-img convert <file> rbd:<pool_name>/<new_image_name>
Example
qemu-img convert -f qcow2 -O raw windows_server_2022_2023_12_06.qcow2 rbd:rbd/windows2022-img
Launch Image Stored on Ceph Cluster
Once an image exists on the Ceph Cluster an end user will be able to launch it from Virt-Manager. Refer to Attaching RBD Storage Pool to Virt-Manager for steps to access the Ceph pool from Virt-Manager.
- Launch virt-managerbash
sudo virt-manager
- Click Create a new virtual machine
- Select Import existing disk image
- Click Forward
- Click Browse…
- Click rbd
- Select windows2022-img
- Click Choose Volume
- Enter Microsoft Windows Server 2022 in “Choose the operating system you are installing” field.
- Click Forward
- Click Forward
- Click Finish