libguestfs can be used to do the diffing. Create the initial disk, do stuff in VM, use libguestfs to do diff. I almost built a hacky omnibus packaging tool this way. I say almost because it turns out to be just as simple to just compile stuff from source and install in &#x2F;opt and then package those files.