Home > Uncategorized > resizing xen images

resizing xen images

August 23rd, 2008

I recently ran into a scenario where I needed to resize one of my Xen disk images. In this case, I wanted to add an extra 5GB.

I shut down the guest and run the following commands.

# use dd to create a 5GB file
dd if=/dev/zero of=temp bs=1024 count=5000000</code>

# append the temp file to the existing image
cat temp >> disk.img

# resize the file system
resize2fs -f disk.img

Start up the guest, and volia, we’ve got some free space!

Tags:
Comments are closed.