New in libguestfs 1.13.19 is a tool called virt-sysprep which makes it easier to clone virtual machines.
The new tool isn’t a complete clone tool, but you can easily combine it with other tools like dd, the old virt-clone, virt-resize and virt-sparsify to clone virtual machines.
1. You should clarify it is for Linux VMs. The name is misleading.
2. Wouldn’t it make more sense to use the OS built-in mechanism to re-init itself? For example, in Fedora it’ll be removing /etc/sysconfig/firstboot .
1. We are intending that it’ll work for Windows VMs. In fact, Chris wrote some code to install and run sysprep already (see here).
2. Or in Fedora:
touch /.unconfigured
which is supposed to do that.The libguestfs git repository is down, please fix it:
http://git.annexia.org/?p=libguestfs.git;a=summary
git://git.annexia.org/git/libguestfs.git
It’s working now. In any case there is a mirror here:
http://fedorapeople.org/gitweb?p=rjones/public_git/libguestfs.git;a=summary
It’s not clear to me in the description if virt-sysprep rewrites /etc/fstab but if not you may want to add that (some distros like Ubuntu use disk UUID via blkid).
Thanks — noted in the TODO list.