1.1 --- a/OpenSecurity/install/initial_vm Thu Jan 23 16:31:33 2014 +0000
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,49 +0,0 @@
1.4 -#!/bin/sh
1.5 -
1.6 -# ensure environment is ready
1.7 -echo 'checking environment'
1.8 -cd '/cygdrive/c/Documents and Settings/'
1.9 -cd "${USER}"
1.10 -mkdir 'VirtualBox VMs' &> /dev/null
1.11 -cd 'VirtualBox VMs'
1.12 -if [ "$?" != "0" ]; then
1.13 - echo "failed to setup user's \"VirtualBox VMs\" folder"
1.14 - echo "sorry."
1.15 - exit 1
1.16 -fi
1.17 -
1.18 -# get recent initial VM and create disk image
1.19 -echo 'download initial OpenSecurity VM'
1.20 -cd "/cygdrive/c/Documents\ and\ Settings/${USER}/VirtualBox\ VMs/"
1.21 -#wget http://service.x-net.at/opensecurity/OsecVM_initialized.ova
1.22 -VBoxManage.exe import OsecVM_initialized.ova --vsys 0 --vmname SecurityDVM --unit 12 --disk SecurityDVM.vmdk
1.23 -
1.24 -# launch the SecurityVM the first time to let the user do initial updates
1.25 -VBoxManage.exe startvm SecurityDVM
1.26 -
1.27 -cat << EOF
1.28 -# Start VirtualBox and update the machine
1.29 -#
1.30 -# login with
1.31 -# user: root
1.32 -# pass: osecvm
1.33 -#
1.34 -# issue these commands as root
1.35 -#
1.36 -# # apt-get update
1.37 -# # apt-get upgrade
1.38 -# # apt-get dist-upgrade
1.39 -#
1.40 -# then shutdown the machine with
1.41 -#
1.42 -# # shutdown -h now
1.43 -#
1.44 -# press a key when done to proceed
1.45 -EOF
1.46 -read -n 1 -s
1.47 -
1.48 -# Turn the VM disk image immutable and attach it
1.49 -VBoxManage.exe storageattach SecurityDVM --storagectl SATA --port 0 --medium none
1.50 -VBoxManage.exe modifyhd SecurityDVM.vmdk settype immutable
1.51 -VBoxManage.exe storageattach SecurityDVM --storagectl SATA --port 0 --device 0 --type hdd --mtype normal --medium SecurityDVM.vmdk
1.52 -
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2.2 +++ b/OpenSecurity/install/initial_vm.bat Thu Jan 23 17:03:27 2014 +0000
2.3 @@ -0,0 +1,37 @@
2.4 +@echo off
2.5 +
2.6 +rem ensure environment is ready
2.7 +C:
2.8 +cd "C:\Documents and Settings\%USERNAME%\VirtualBox VMs"
2.9 +
2.10 +rem get recent initial VM and create disk image
2.11 +echo "download initial OpenSecurity VM"
2.12 +rem wget http://service.x-net.at/opensecurity/OsecVM_initialized.ova
2.13 +VBoxManage.exe import OsecVM_initialized.ova --vsys 0 --vmname SecurityDVM --unit 12 --disk SecurityDVM.vmdk
2.14 +
2.15 +# launch the SecurityVM the first time to let the user do initial updates
2.16 +VBoxManage.exe startvm SecurityDVM
2.17 +
2.18 +echo "# Start VirtualBox and update the machine "
2.19 +echo "# "
2.20 +echo "# login with "
2.21 +echo "# user: root "
2.22 +echo "# pass: osecvm "
2.23 +echo "# "
2.24 +echo "# issue these commands as root "
2.25 +echo "# "
2.26 +echo "# # apt-get update "
2.27 +echo "# # apt-get upgrade "
2.28 +echo "# # apt-get dist-upgrade "
2.29 +echo "# "
2.30 +echo "# then shutdown the machine with "
2.31 +echo "# "
2.32 +echo "# # shutdown -h now "
2.33 +echo "# "
2.34 +echo "# press a key when done to proceed "
2.35 +pause
2.36 +
2.37 +rem Turn the VM disk image immutable and attach it
2.38 +VBoxManage.exe storageattach SecurityDVM --storagectl SATA --port 0 --medium none
2.39 +VBoxManage.exe modifyhd SecurityDVM.vmdk settype immutable
2.40 +VBoxManage.exe storageattach SecurityDVM --storagectl SATA --port 0 --device 0 --type hdd --mtype normal --medium SecurityDVM.vmdk