[Libguestfs] factorization would be nice