3 rem ensure environment is ready
5 rem This gets up VirtualBox VBoxSVC.exe COM Server right
6 rem and thus helps us not to run in any timing problems
7 rem due to a lazy VBox COM Server ... o.O
8 VBoxManage list vms > %TEMP%\VMS.txt
11 rem Now, VBox should feel good within the Windows OS space
12 rem switch into the User's VBox setup folders
14 cd "C:\Users\%USERNAME%
15 mkdir "VirtualBox VMs"
18 rem get recent initial VM and create disk image
19 echo "download initial OpenSecurity VM"
20 rem wget http://service.x-net.at/opensecurity/OsecVM_initialized.ova
22 rem I've already downloaded ... this is for convenience --> delete this line
23 rem This is just for testing. Enbale the real "wget http://service...." line above
24 rem to get the real VM image from X-Net
25 copy C:\Users\dyle\Documents\OpenSecurity\setup\OsecVM_initialized.ova .
28 VBoxManage.exe import OsecVM_initialized.ova --vsys 0 --vmname SecurityDVM --unit 12 --disk SecurityDVM\SecurityDVM.vmdk
30 rem launch the SecurityVM the first time to let the user do initial updates
31 VBoxManage.exe startvm SecurityDVM
33 echo # Start VirtualBox and update the machine
39 echo # issue these commands as root
41 echo # # apt-get update
42 echo # # apt-get upgrade
43 echo # # apt-get dist-upgrade
45 echo # then shutdown the machine with
47 echo # # shutdown -h now
49 echo # press a key when done to proceed
52 rem Turn the VM disk image immutable and attach it
53 echo sealing disk image ...
54 VBoxManage.exe storageattach SecurityDVM --storagectl SATA --port 0 --medium none
55 VBoxManage.exe modifyhd SecurityDVM\SecurityDVM.vmdk --type immutable
56 VBoxManage.exe storageattach SecurityDVM --storagectl SATA --port 0 --device 0 --type hdd --mtype normal --medium SecurityDVM\SecurityDVM.vmdk
57 echo done. OpenSecurity is ready to serve