Changes between Version 15 and Version 16 of virtual-machines

Show
Ignore:
Timestamp:
03/05/13 17:07:06 (6 years ago)
Author:
vjo (IP: 152.54.6.80)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • virtual-machines

    v15 v16  
    1111 * [http://docs.openstack.org/trunk/openstack-compute/admin/content/creating-a-linux-image.html OpenStack instructions on creating images] 
    1212 * [http://open.eucalyptus.com/wiki/creating-images-iso-kvm Eucalyptus instructions on creating images] 
     13 
     14== Resizing an existing image filesystem == 
     15Often, a stock image will provide an adequate starting point for an experimenter, but will lack sufficient "free space" to be useful. 
     16An experimenter can, however, resize the filesystem component of an image by first performing these commands: 
     17{{{ 
     18$ dd if=/dev/zero of=$NEW_IMAGE_FILE bs=1M count=$DESIRED_SIZE_OF_NEW_IMAGE_IN_MB 
     19$ dd if=$OLD_IMAGE_FILE of=$NEW_IMAGE_FILE conv=notrunc 
     20}}} 
     21and then following these commands with the appropriate filesystem resize command; for the Linux ext2, ext3, or ext4 filesystem, 
     22this command would be: 
     23{{{ 
     24$ resize2fs $NEW_IMAGE_FILE 
     25}}} 
     26 
     27It is recommended, but not required, that you run fsck on the image after completing this process: 
     28{{{ 
     29$ e2fsck -f $NEW_IMAGE_FILE 
     30}}} 
     31 
     32Note - the above procedure works well for '''increasing''' the size of an image; shrinking an image is slightly more complex,  
     33in that it requires running the filesystem resize command upon the image '''before''' transitioning it into a smaller file. 
    1334 
    1435== !ImageProxy ==