Bug#710273: Use of libvirt to build debian images
it is also possible to do the provisioning of KVM images using
virt-install, the debian installer, and a preseed file
it has the advantage of enabling the fullpower of a debian presseed
file, but maybe you lose the flexibility of a customer script
(for instance I don't know if the Debian Installer allows you to instead
a different bootloader than grub)
This is the command I use to create my KVM images (tested on Debian 7.1)
export OS=Debian7
virt-install \
--connect qemu:///system \
--name ${OS} \
--ram 512 \
--vcpus 1 \
--file /tmp/${OS}.img \
--file-size=4 \
--location
http://http.debian.net/debian/dists/stable/main/installer-amd64/ \
--virt-type kvm \
--os-variant debianwheezy \
--network bridge=br0 \
--extra-args "auto=true hostname=${OS} domain=
url=http://subsole.org/static/misc/debian-preseed.cfg text"
You can optionally connect to the VM with
virt-viewer -c qemu:///system Debian7
and watch the show !
Reply to: