Wednesday, February 23, 2011

My journey with libguestfs

When I work with Virtual Machines (VMs) many times I define/create a template hard disk (HD). This template could be later attached to a VM and then modified for attending specific needs. For instance, I have created an Ubuntu-based VM with just the OpenSSH service, ready to go. On top of it, I  can deploy different services and applications, such as:
  • web servers
  • monitoring tools
  • hacking tools
  • and so on
One of the hardest part of all this process, regards with modifying files inside the filesystem. One option is attach the hard disk to one VM, boot the VM up, log into the running VM and modify the required files. Very handy, uh?

I found the 'libguestfs' project. It provides a set of tools that allows you to view and modify files inside VMs. Check the project home page for more details and features.

I'm installing it on my Fedora 13 box. Since I would love to do some hacks in Java, executed the following command 'yum install libguestfs-java-devel'. Around 19 packages were necessary for installing the aforementioned package, so I accepted and voila!.

Next entry, I will talk about how to hack some virtual hard disks!

No comments: