Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parameterized HDD, Swap, Memory #21

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions setup
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@

. ./vars.sh

if [ ! -d "boxes" ]; then
mkdir boxes
fi

VBoxManage createvm --name ${NAME} --ostype ${TYPE} --register

VBoxManage modifyvm ${NAME} \
--vram 12 \
--accelerate3d off \
--memory 613 \
--memory ${MEMORY_SIZE} \
--usb off \
--audio none \
--boot1 disk --boot2 dvd --boot3 none --boot4 none \
Expand All @@ -24,9 +28,9 @@ VBoxManage modifyvm ${NAME} \
--bioslogodisplaytime 0 \
--biosbootmenu disabled

VBoxManage createhd --filename "${HDD}" --size 8192
VBoxManage createhd --filename "${HDD}" --size ${HDD_SIZE}
# Swap is recommended to be double the size of RAM.
VBoxManage createhd --filename "${HDD_SWAP}" --size 1226
VBoxManage createhd --filename "${HDD_SWAP}" --size ${HDD_SWAP_SIZE}

VBoxManage storagectl ${NAME} \
--name SATA --add sata --portcount 2 --bootable on
Expand Down
5 changes: 4 additions & 1 deletion vars.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
NAME=centos65-x86_64
TYPE=RedHat_64
INSTALLER="./isos/CentOS-6.5-x86_64-minimal.iso"
GUESTADDITIONS="./isos/VBoxGuestAdditions-4.3.6.iso"
GUESTADDITIONS="./isos/VBoxGuestAdditions_4.3.6.iso"
MEMORY_SIZE=613
HDD="${HOME}/VirtualBox VMs/${NAME}/main.vdi"
HDD_SIZE=8192
HDD_SWAP="${HOME}/VirtualBox VMs/${NAME}/swap.vdi"
HDD_SWAP_SIZE=$((MEMORY_SIZE*2))
NATNET=10.0.2.0/24