Created
February 28, 2016 20:29
-
-
Save OrangeCrush/a73384a55baed1cf83a2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# TODO Figure out how to get an unattended install | |
# | |
VM_NAME=$1 | |
virsh destroy $VM_NAME | |
virsh undefine $VM_NAME | |
virt-install \ | |
--network bridge:br0 \ | |
--virt-type kvm \ | |
--name $VM_NAME \ | |
--ram=2048 \ | |
--vcpus=2 \ | |
--disk path=/vm-images/${VM_NAME}.img,size=10 \ | |
--graphics none \ | |
--location=http://archive.ubuntu.com/ubuntu/dists/trusty-updates/main/installer-amd64 \ | |
--mac=RANDOM \ | |
--extra-args="console=tty0 console=ttyS0,115200" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment