Skip to content

Instantly share code, notes, and snippets.

@EmmanuelKasper
Created July 3, 2013 15:38
Show Gist options
  • Save EmmanuelKasper/5919508 to your computer and use it in GitHub Desktop.
Save EmmanuelKasper/5919508 to your computer and use it in GitHub Desktop.
Automatic Debian7 installation on qemu, using libvirt, the debian installer and a preseed file, inside a terminal (ie you can start it on a remote server)
#!/bin/sh
export OS=Debian7
virt-install \
--connect qemu:///system \
--name ${OS} \
--ram 512 \
--vcpus 1 \
--file ${OS}.img \
--file-size=4 \
--location http://http.debian.net/debian/dists/stable/main/installer-amd64/ \
--virt-type qemu \
--os-variant debianwheezy \
--network=user \
--extra-args "auto=true hostname=${OS} domain= url=http://subsole.org/static/misc/debian-preseed.cfg text console=ttyS0,9600n8p"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment