In this session, discussion and demo are on performing vStorage management on Linux KVM hypervisors. Here we are providing the commands which we have used for the practical session. Follow the Video tutorial for the more clean understanding of KVM Disk management.
Click here to see the Video tutorial
Many Organizations uses Linux KVM as their Virtualization Hypervisor. As a system engineer managing the Linux KVM VMs, there are tasks admins perform very often:
Allocate the new disks to the KVM guests.
Resize the existing allocated disks.
Detach and delete the existing allocated disks.
For the disk creation, we are going to use “qemu-img” utility. I have seen many admins use “dd” to create new disks/images, but I recommend “qemu-img” over “dd”. Couple of benefits
Creates sparse file.
Images can be modified (ex can be resized).
This utility can handle all type of image formats supported by QEMU.
Please Note – It’s recommendation to the power of the guest when modifying the existing image, which is already allocated /used by a guest VM. If you perform modification operation when VM is using the disk (VM online) can damage the data.