til: Using virt-customize to modify VM images
This week I was working on a QEMU-based integration test suite and needed to customize the base QCoW2 images shipped by the Ubuntu project for use in my test harness.
Previously I would have treated this in a similar manner to EC2 and AMIs: launching a VM, SSH’ing into it and applying tweaks, and cloning it to create our desired VM image.
Unsurprisingly there is a better way in the form of virt-customize which can modify disk images by installing packages, editing files, and other settings in place.


