Created
March 26, 2015 14:10
-
-
Save ibuildthecloud/29c7b22ec55bf61ac3a4 to your computer and use it in GitHub Desktop.
Build RancherOS VirtualBox VM w/ Autoformat
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 | |
set -x -e | |
RANCHER_ISO=machine-rancheros.iso | |
curl -L https://github.com/rancherio/os/releases/download/v0.2.1/machine-rancheros.iso > $RANCHER_ISO | |
VM="RancherOS-${RANDOM}" | |
VBoxManage createhd --format vmdk --filename ./dist/artifacts/$VM.vmdk --size 40000 | |
VBoxManage createvm --name $VM --ostype "Linux_64" --register | |
VBoxManage storagectl $VM --name "SATA" --add sata --portcount 2 | |
VBoxManage storageattach $VM --storagectl "SATA" --port 0 --type hdd --medium ./dist/artifacts/$VM.vmdk | |
VBoxManage storageattach $VM --storagectl "SATA" --port 1 --type dvddrive --medium ${RANCHER_ISO} | |
VBoxManage modifyvm $VM --memory 1024 --acpi on --boot1 disk --boot2 dvd | |
VBoxManage modifyvm $VM --rtcuseutc on | |
VBoxManage modifyvm $VM --usb off | |
VBoxManage modifyvm $VM --audio none | |
VBoxManage modifyvm $VM --nic1 nat | |
VBoxManage modifyvm $VM --nictype1 virtio | |
VBoxManage startvm $VM |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment