Wednesday, 14 May 2014

How to resize a virtual disk in KVM ?

How to resize a virtual disk in KVM ?

Ans - 
1. First shutdown the VM.
2. Now resize the image on the host machine.

#ls -lhs GFS2-clone.img
6.9G -rwxr-xr-x. 1 qemu qemu 90G May 14 22:44 GFS2-clone.img

# qemu-img resize /home/prbeher1/GFS2-clone.img +10GB

Image resized.
#ls -lhs GFS2-clone.img
6.9G -rwxr-xr-x. 1 qemu qemu 100G May 14 22:44 GFS2-clone.img

Now power on the VM and login.

#fdisk /dev/vda








No comments:

Prasanta Kumar Behera. Mob- 8147470101