1.1 --- a/OpenSecurity/install/initial_vm.bat Thu Jan 23 17:03:27 2014 +0000
1.2 +++ b/OpenSecurity/install/initial_vm.bat Mon Jan 27 15:12:33 2014 +0000
1.3 @@ -1,37 +1,58 @@
1.4 @echo off
1.5
1.6 rem ensure environment is ready
1.7 +
1.8 +rem This gets up VirtualBox VBoxSVC.exe COM Server right
1.9 +rem and thus helps us not to run in any timing problems
1.10 +rem due to a lazy VBox COM Server ... o.O
1.11 +VBoxManage list vms > %TEMP%\VMS.txt
1.12 +del %TEMP%\VMS.txt
1.13 +
1.14 +rem Now, VBox should feel good within the Windows OS space
1.15 +rem switch into the User's VBox setup folders
1.16 C:
1.17 -cd "C:\Documents and Settings\%USERNAME%\VirtualBox VMs"
1.18 +cd "C:\Users\%USERNAME%
1.19 +mkdir "VirtualBox VMs"
1.20 +cd "VirtualBox VMs"
1.21
1.22 rem get recent initial VM and create disk image
1.23 echo "download initial OpenSecurity VM"
1.24 rem wget http://service.x-net.at/opensecurity/OsecVM_initialized.ova
1.25 -VBoxManage.exe import OsecVM_initialized.ova --vsys 0 --vmname SecurityDVM --unit 12 --disk SecurityDVM.vmdk
1.26
1.27 -# launch the SecurityVM the first time to let the user do initial updates
1.28 +rem I've already downloaded ... this is for convenience --> delete this line
1.29 +rem This is just for testing. Enbale the real "wget http://service...." line above
1.30 +rem to get the real VM image from X-Net
1.31 +copy C:\Users\dyle\Documents\OpenSecurity\setup\OsecVM_initialized.ova .
1.32 +
1.33 +rem import the VM
1.34 +VBoxManage.exe import OsecVM_initialized.ova --vsys 0 --vmname SecurityDVM --unit 12 --disk SecurityDVM\SecurityDVM.vmdk
1.35 +
1.36 +rem launch the SecurityVM the first time to let the user do initial updates
1.37 VBoxManage.exe startvm SecurityDVM
1.38
1.39 -echo "# Start VirtualBox and update the machine "
1.40 -echo "# "
1.41 -echo "# login with "
1.42 -echo "# user: root "
1.43 -echo "# pass: osecvm "
1.44 -echo "# "
1.45 -echo "# issue these commands as root "
1.46 -echo "# "
1.47 -echo "# # apt-get update "
1.48 -echo "# # apt-get upgrade "
1.49 -echo "# # apt-get dist-upgrade "
1.50 -echo "# "
1.51 -echo "# then shutdown the machine with "
1.52 -echo "# "
1.53 -echo "# # shutdown -h now "
1.54 -echo "# "
1.55 -echo "# press a key when done to proceed "
1.56 +echo # Start VirtualBox and update the machine
1.57 +echo #
1.58 +echo # login with
1.59 +echo # user: root
1.60 +echo # pass: osecvm
1.61 +echo #
1.62 +echo # issue these commands as root
1.63 +echo #
1.64 +echo # # apt-get update
1.65 +echo # # apt-get upgrade
1.66 +echo # # apt-get dist-upgrade
1.67 +echo #
1.68 +echo # then shutdown the machine with
1.69 +echo #
1.70 +echo # # shutdown -h now
1.71 +echo #
1.72 +echo # press a key when done to proceed
1.73 pause
1.74
1.75 rem Turn the VM disk image immutable and attach it
1.76 +echo sealing disk image ...
1.77 VBoxManage.exe storageattach SecurityDVM --storagectl SATA --port 0 --medium none
1.78 -VBoxManage.exe modifyhd SecurityDVM.vmdk settype immutable
1.79 -VBoxManage.exe storageattach SecurityDVM --storagectl SATA --port 0 --device 0 --type hdd --mtype normal --medium SecurityDVM.vmdk
1.80 +VBoxManage.exe modifyhd SecurityDVM\SecurityDVM.vmdk --type immutable
1.81 +VBoxManage.exe storageattach SecurityDVM --storagectl SATA --port 0 --device 0 --type hdd --mtype normal --medium SecurityDVM\SecurityDVM.vmdk
1.82 +echo done. OpenSecurity is ready to serve
1.83 +