Last active
September 12, 2019 14:03
-
-
Save sierra-tango-echo/c412da3953eb9a4c3dbadc47e4c598e7 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=node1 | |
CONSOLE=0 | |
VMPATH=/tmp/stevevm/${NAME}/ | |
mkdir -p $VMPATH | |
VBoxManage createvm --name ${NAME} --ostype RedHat_64 --register --basefolder $VMPATH | |
VBoxManage modifyvm ${NAME} --cpus 1 --memory 4096 --vrde on --vrdeport 5001 | |
VBoxManage modifyvm ${NAME} --nic1 intnet --boot1 net | |
VBoxManage storagectl ${NAME} --name "SATA" --add sata --portcount 1 | |
VBoxManage createhd --filename $VMPATH/disk.vdi --size 8000 --format VDI | |
VBoxManage storageattach ${NAME} --storagectl SATA --port 1 --type hdd --medium $VMPATH/disk.vdi | |
if [ "${CONSOLE}" -gt 0 ]; then | |
VBoxManage modifyvm ${NAME} --uart1 0x3F8 4 --uartmode1 server $VMPATH/${NAME}pipe | |
fi | |
VBoxManage startvm ${NAME} --type headless | |
echo "VM started - connect to console with minicom -D unix#/$VMPATH/${NAME}pipe" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment