Last active
August 29, 2015 14:24
-
-
Save erkl/c68e85e9ed9e6ab17d05 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
# ... | |
name="linux" | |
base="$HOME/.vm" | |
disk="$base/$name/$name.vdi" | |
# Create and register the virtual machine. | |
VBoxManage createvm --name "$name" --basefolder "$base" --register | |
# ... | |
VBoxManage modifyvm "$name" --ostype Linux_64 | |
VBoxManage modifyvm "$name" --cpus 1 | |
VBoxManage modifyvm "$name" --memory 4096 | |
VBoxManage modifyvm "$name" --firmware bios | |
VBoxManage modifyvm "$name" --boot1 dvd | |
VBoxManage modifyvm "$name" --boot2 disk | |
VBoxManage modifyvm "$name" --nic1 bridged | |
VBoxManage modifyvm "$name" --nictype1 82540EM | |
VBoxManage modifyvm "$name" --audio none | |
# ... | |
VBoxManage createhd --filename "$disk" --size 8192 | |
VBoxManage storagectl "$name" --name "IDE Controller" --add ide | |
VBoxManage storageattach "$name" --storagectl "IDE Controller" --port 0 --device 0 --type hdd --medium "$disk" | |
# ... | |
url="http://mirror.rackspace.com/archlinux/iso/2015.07.01/archlinux-2015.07.01-dual.iso" | |
iso="/tmp/archlinux-2015.07.01-dual.iso" | |
# ... | |
curl -o "$iso" "$url" | |
VBoxManage storageattach "$name" --storagectl "IDE Controller" --device 0 --port 1 --type dvddrive --medium "$iso" | |
# ... | |
# VBoxManage modifyvm "$name" --dvd none |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment