Convert VirtualBox .vdi image to qcow2

We needed to convert .vdi image created on VirtialBox hiperviser to qcow2 format for use with KVM. Below are steps that we took to get it done. 1. Convert vdi to raw disk image VBoxManage clonehd –format RAW vmimage.vdi vmimage.img 2. On KVM host we can now convert it to qcow2 qemu-img convert -f raw…

Expand KVM based image with lvm partition

Lets take a quick look at how to expand kvm raw image with lvm partition running CentOS7 guest. We will need to download gparted for this to re-size image. It cam be downloaded from here. We will be expanding our image by 10G.

Scripting libvirt with php on CentOS or Redhat 7

Libvirt is virtualization API used to interact with different hypervisorrs. In this article we will look into scripting with php using libvirt api. This is very basic overview and designed for very basic scripting needs. This particular configuration was tested against KVM on CentOS 7. In order to script libvirt with php we will need…

Manually migrate LVM based vm from one KVM hosts to another

We have a KVM based VM on LVM volume that we need to migrate to different host. This is not hot-live migration and will be done offline. Lets looks at steps required to get it done. There may be many different ways to do it and this is just one of them.