Skip to content

Instantly share code, notes, and snippets.

@hamjl
Forked from EmmanuelKasper/kvm-autostable
Last active August 29, 2015 14:08
Show Gist options
  • Save hamjl/b918f89e28dfe3899829 to your computer and use it in GitHub Desktop.
Save hamjl/b918f89e28dfe3899829 to your computer and use it in GitHub Desktop.
#!/bin/sh
# You can optionally connect to the VM with
# virt-viewer -c qemu:///system Debian7
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"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment