guestfish in 3 simple steps

libguestfs is a very handy library for manipulating image files. guestfis is a utility that uses libguestfs that allows you to mount an image file and make changes inside the image. One of the coolest features of libguestfs is that it does not require root prevelages to run or access an image file. The below example shows how to use guest fish to mount an make a change to a machine image.

1) install guestfish

# yum install guestfish

2) connect to the  image

guestfish –rw -a ~/Downloads/rhel-server-x86_64-kvm-6.4_20130130.0-4.qcow2

3) edit image

><fs> run
><fs> list-filesystems
><fs> mount /dev/vda1 /
><fs> vi /etc/fstab
 make any changes you need to
 ><fs> umount /
><fs> exit
 

Additional info:

Download machine images:

http://openstack.redhat.com/Image_resources

Documentation

http://libguestfs.org/guestfish.1.html

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s