Cloudmin currently only supports management of virtual disk images for Xen and KVM systems, as other virtualization types use a directory on the host filesystem to store files instead of images.
Each open source Xen system has one or more files or devices on the host system (like
/xen/mysystem.img mapped to devices on the virtual system (like
/dev/sda1). The disks on the host can be regular files, LVM logical volumes, or actual disk partitions. In the virtual system, these are typically mapped to partitions, but can be an entire disk.
When Cloudmin creates a new Xen system, it will also build at least one virtual disk whose contents are a copy of the selected system image. If you select to enable swap as well, another disk will be created for the swap file. These will be mapped to
/dev/sda2 on the virtual system respectively.
For KVM, files or devices on the host system (like
/kvm/mysystem.img) are mapped to entire disks on the virtual system (like
/dev/hda). This disk image then contains one or more partitions, which can be mounted as filesystems on the virtual machine, or used for LVM or RAID.
When Cloudmin creates a new KVM system, it will create a disk image typically with a single partition. This is then mounted as the root filesystem on the virtual machine. In some cases, there may be an additional partition that is used for the
Citrix Xen virtual systems also use whole-disk images, on which Cloudmin creates partitions. However, the underlying storage is managed entirely by the Citrix Xen API, so you never need to select a filename or LVM volume group for a new disk.
The most common operation to perform on a disk image is expanding it when the filesystem is full. The steps to do this are :
This process is identical for disk images stored in regular files or logical volumes. In both cases, the size increase will fail if the underlying host filesystem or volume group does not have enough free space.
This same procedure can be used to shrink a disk, assuming that the filesystem on is not using more space than the new disk size. However, Citrix Xen does not support the shrinking of disk images.
For KVM and Citrix Xen whole-disk images, expansion of a disk is only possible if there is a single partition or if the final partition contains the filesystem being expanded.
Cloudmin attempts to work out what filesystem is on a virtual disk by looking at the
/etc/fstab file on the virtual system. It then uses this information to properly expand the filesystem.
However, if the filesystem type cannot be worked out then Cloudmin will warn you about possible data loss before resizing a disk. After expanding a disk you will need to login to the virtual system and possibly expand partitions and filesystems on the disk, or create a new partition in the empty space. Disks used for RAID, LVM or by un-supported operating systems like Windows or BSD cannot have their filesystems expanded by Cloudmin.
Because expanding the size of a disk typically requires a virtual system be shut down, you may want to schedule this for a time when the system is not being heavily used, like 3 AM. This can be done as follows :
When the selected time arrives, the system will be shut down if needed, the selected disk resized, and then the system started up again. Only one scheduled change can be created at a time for each disk on each system. Once created, a change can be cancelled before it takes effect on the same page.
You might want to add a disk to a system for use as virtual memory, or to move some files onto. The steps to do this are :
A reboot of the virtual system will be needed before the new disk is available.
If a virtual system no longer needs a disk, you can remove it as follows. All data on the disk will be lost though! Removal of the disk for the system's root filesystem is not possible.
OpenVZ virtual systems can limit disk usage in a different way - instead of using fixed-size virtual disks, each system can have an optional limit on the amount of disk space its filesystem can consume. This can be set on the Create New System page in the Resource limit options section, or modified later on the Resource Limits page.
Account plans can be used to define a total disk limit for system owners, which applies to the sum of all disks on all systems belonging to the owner. For example, if an owner has a limit of 10GB of disk he could create a virtual system with two 3GB disks, and other with 1 2GB disk.
For OpenVZ systems, the disk space limit is counted towards the owner's total disk space. If an owner has a disk limit, he will not be allowed to create an OpenVZ system without a limit.