Tip: use prepared images in guestfish

In guestfish ≥ 1.3.6 you can save yourself a few keystrokes when testing by using a preformatted disk image on the command line:

$ guestfish -N fs:ext4

starts guestfish with an ext4 formatted filesystem in a 100 MB partitioned block device. Specify a different size for the block device by doing:

$ guestfish -N fs:ext4:1G

To start with just an empty block device, you can now do:

$ guestfish -N disk

There are various other prepared disk images available for you to use. For more information, see the git commit here.

3 Comments

Filed under Uncategorized

3 responses to “Tip: use prepared images in guestfish

  1. daleamon

    I’m trying to get up the learning curve far enough to see if this is the tool that I am looking for.

    I want to create a blank virtual disk of a specific size; create a series of partitions, say 10G linux and 2G swap; and rsync a root tree backup into it; then set up the mbr to do a grub1 or 2 (as the case may be) boot from it… then start it up as a kvm/qemu VM. Am I barking up the wrong tool? Doesn’t look terribly easy from what I can see so far. What I was hoping for was a simple rescue disk for VM’s that would let me do cfdisk, mkfs, mkswap, rsync, grub install… I looked at virt-rescue but it simply died when I attempted to virt-rescue -a myblankimage.

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s