If LVM is not used when creating domU operating system, you might need to resize you image file. It's not easier than LVM but hopefully there's a solution.
- First create an extra image with the desired size (here 1GB) that will be added to the current image
$ dd if=/dev/zero of=extra.img bs=1M count=1024 1024+0 records in 1024+0 records out 1073741824 bytes (1.1 GB) copied, 5.09034 seconds, 211 MB/s
- Make sure domU is not running. Then just add extra.img to your domU image file (here domU.img). Yes just as simple :D
$ cat domU.img extra.img > domU.resize.img
- You also need to enlarge your filesystem. I've test it with ext3 but not with ReiserFS - it seems ReiserFS needs resize_reiserfs instead of resize2fs -.
$ ef2fsck -f domU.resize.img$ resize2fs domU.resize.img
- Finally modify your domU config file or move domU.resize.img over domU.img.

Comments
Typo
e2fsck -f domU.resize.imgThibaultThanks!
Post new comment