Archives September 2011

How to resize a VMDK using Qemu tools

It is possible to resize a VMware .VMDK file without using the VMware tools.

The QEMU disk image utility comes with qemu-img a tool which allows you to convert virtual disk formats.

To resize a VMDK using qemu-img

# First convert the vmdk to raw format
# NB. Make sure you reference the actual disk image and not the .vmdk descriptor file
qemu-img convert linux-flat.vmdk linux.raw

# Extend the vmdk using dd. 
# Here we are extending the disk to 16G using dd. The resulting file will be sparse
dd if=./linux.raw of=./linux-16G.raw BS=1M seek=16384 oflag=append ...

— Andrew

Daily archives

Site theme originally by