123456789101112131415161718192021222324252627282930313233343536373839 |
- #!/bin/bash
- set -x -e
- cd $(dirname $0)/..
- : RANCHER_ISO=${RANCHER_ISO:="./dist/artifacts/rancheros.iso"}
- if [[ -z $RANCHER_ISO ]]; then
- echo "Need an ISO..." 1>&2
- exit 1
- fi
- if [ ! -e ${RANCHER_ISO} ]; then
- echo "Could not find ISO ${RANCHER_ISO}..." 1>&2
- echo "have you run build.sh yet?" 1>&2
- exit 1
- fi
- GITSHA=$(git rev-parse --short HEAD)
- VM="RancherOS-${GITSHA}"
- sudo chown -R `whoami` ./dist
- 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
|