By the power of soy!

Expanding a guest disk image using libvirt and libguestfs

I have a guest which has a 10G root disk as /dev/vda, and I would like to expand the root disk from 10G to 15G to offer more room to the /var filesystem.

The typical method would be the following:

  1. shutdown the guest
  2. find the backing store on the host (in this case it's a LVM logical volume)
  3. copy the LV for backup (lvcreate --name LVNew --size=10G; dd if=LVOld of=LVNew;)
  4. expand the LV (lvresize --size=+5G LVOld;)
  5. use kpartx on the host (or start the guest) and use parted to expand the guest disk parition
  6. expand the guest physical volumes (pvresize /dev/vda2), logical volumes (lvresize), and filesystems (resize2fs)

But this can be both automated and generalized with libvirt and libguestfs-tools. These tools provide a common vocabulary across many different storage back-ends such as LVM, iSCSI, file, NFS, etc. Let's see how that works.

The state of virtualization on Fedora moves fast. The following is based on a Fedora 13 host running libvirt-0.8.2-1.fc13.x86_64 and libguestfs-tools-1.6.2-1.fc13.4.x86_64.

Vegan Unturkey Thanksgiving 2010

After discovering the unturkey recipe a few years ago, we created one for our vegan friends thanksgiving dinner and took notes in 2007 and 2008.

Here is how the 2010 bake went.

Thanks to for the recipes!


  • Gather the Ingredients
  • Gind Up Spice Mix
  • Mix the Gluten
  • Pre-Bake the Gluten
  • Make the Stuffing
  • Boil the Gluten
  • Stuff and Wrap
  • Bake


Bridged Guest Configuration on Fedora 12 with Netcf

A revolutionary new feature of Fedora 12 is "Network Interface Management" via a library called netcf. With this library as the facilitator, it becomes possible for any tool, not just NetworkManager, to reliably and methodically configure network interfaces. The original impetus for this feature was to enable tools like oVirt and libvirt to manipulate the networks on the hosts which underlie virtual machines, and that's what I'll discuss below.

Build a Bicycle Trailer from Electrical Conduit Tubing

I recently took a trailer building class from the UC Davis Craft Center. We built a bicycle trailer out of 1/2" electical coinduit pipe. Based off the "flatsy" trailer from Community Bike Cart Design. Each of us did things a little bit differently, here is how I built mine.


Tahoe Rim to Flume Trail Shuttle

I had an awesome (and painful) day riding the Tahoe Rim Trail from Tahoe Meadows down Marlette Lake where we had lunch. Then up the Flume Trail and finally down Tunnel Creek to our shuttle truck on Saturday. About 5 hours and 25 miles. Thanks to Myke, Nate, Steve, and Sean for making it an awesome day!


Manual Migration of LVM-based Guest Between Hosts

How to manually migrate a virtual machine from one host to another. The process is roughly: copy the guest config to the destination, create LVs on the destination, dd the LVs across ssh, instantiate and start the guest on the destination.

As I described in a previous post, I dedicate an LV in the host for each guest. The guest then uses LVM to manage the space. In this case the guest is contained in two logical volumes on the host.

Migrate Windows iTunes to Mac with Music Stored on SMB Share

How to migrate iTunes from one platform to another and retain links to your songs, even when they are stored remote to the iTunes client, and their path has changed.

Windows laptop with iTunes 8.x. All (most) music is stored on a Samba server mounted at M:\media\mp3, rather than where iTunes wants you to put it. In Linux it's called freedom, in Mac OS it's called swimming against the stream.

Mac laptop with iTunes 8.x and All (most) music is stored on a Samba server mounted at /Volumes/media/mp3


Chroot BIND named deprecated in Fedora 11

If you've tried to fire up a chroot named on Fedora 11 you may have noticed it complains about missing configuration files such as named.dnssec.keys.

There is a bug that implies you should use SELINUX instead of chroot. But if you aren't ready for SELINUX, you can still run a chroot name server. Here is how.


Expand LUN on Solaris

After expanding a volume on the SAN, I needed Solaris 10 to now see that the disk has grown and make use of the added space.

Device slice c8t600A0B80002A39FC000004DE47E92C69d0 was 200G with
a filesystem on slice 6. On the SAN, I expanded the volume to 225G. Here is how to expand the disk or partition inside of Solaris.

The steps are:

  1. Detect larger disk size and relabel disk.
  2. Grow the filesystem to fill the disk.


Vegan Irish Cream Liqueur

I've never had the original, so I can confidently say this is "Better than Bailey's Irish Cream".

  • 1 can coconut milk (14 oz)
  • 2 Tbs Brown Sugar
  • 2 Tbs Chocolate Syrup
  • 2 tsp Vanilla Extract
  • 3/4 cup (Irish) Whisky


Subscribe to RSS


Subscribe to Syndicate