Corporate Home Open Source Home
Syndicate content
Eucalyptus

Resizing images

Submitted by spride on Fri, 03/12/2010 - 06:42.

Another way to resize an existing image is to do the following:
$ sudo fsck.ext3 -f IMAGE
$ sudo resize2fs IMAGE SIZE

Where "IMAGE" is the name of the IMAGE file and "SIZE" is the new size of the file (make sure to add "G" on the end for GBs).

Example: To resize the image ubuntu-9.04-i386.img to be 8GB, do this:
$ sudo fsck.ext3 -f ubuntu-9.04-i386.img
$ sudo resize2fs ubuntu-9.04-i386.img 8G

Now, you can "euca-upload-image" the new image to Eucalyptus, and run it. If your Eucalyptus config has a 20G image maximum then "df -h" would show something like:
/dev/sda1 8G /
/dev/sda2 11G /mnt