Skip to content
Snippets Groups Projects
Commit dd0057ff authored by Jeffrey Tolar's avatar Jeffrey Tolar
Browse files

Create OVA

parent 9abbb592
No related branches found
No related tags found
No related merge requests found
......@@ -268,3 +268,47 @@ trap - EXIT
rm -f $DISK.vmdk
VBoxManage convertfromraw $DISK $DISK.vmdk --format VMDK
uuid=$(uuidgen)
ostype=ArchLinux
[[ $ARCH == "x86_64" ]] && ostype=${ostype}_64
vmName="CS-2xx-$ARCH"
if VBoxManage list vms | grep -q -F "\"$vmName\""; then
VBoxManage storagectl "$vmName" \
--name IDE \
--remove
VBoxManage unregistervm "$vmName" --delete
fi
VBoxManage createvm --name "$vmName" --register --ostype $ostype --uuid "$uuid"
VBoxManage modifyvm "$uuid" \
--description "CS 2xx Course Virtual Machine" \
--memory 512 \
--vram 12 \
--biosbootmenu disabled \
--rtcuseutc on \
--nic1 nat \
--clipboard bidirectional \
--draganddrop bidirectional
VBoxManage storagectl "$uuid" \
--name IDE \
--add ide \
--bootable on
VBoxManage closemedium "$(realpath $DISK.vmdk)"
VBoxManage storageattach "$uuid" \
--storagectl IDE \
--port 0 \
--device 0 \
--type hdd \
--medium "$(realpath $DISK.vmdk)" \
--setuuid ""
VBoxManage export "$uuid" \
--output $ARCH.ova \
--options nomacs
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment