# HG changeset patch # User dyle@opensecurity.d03.arc.local # Date 1390496607 0 # Node ID 9e8fffdb8f47d1bb83e840c7355ac1706428a3ca # Parent 1f4ba6a6ecf50fc8895b13d1a0eca23f158b0111 turned initial_vm from a bash into a DOS file diff -r 1f4ba6a6ecf5 -r 9e8fffdb8f47 OpenSecurity/install/initial_vm --- a/OpenSecurity/install/initial_vm Thu Jan 23 16:31:33 2014 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,49 +0,0 @@ -#!/bin/sh - -# ensure environment is ready -echo 'checking environment' -cd '/cygdrive/c/Documents and Settings/' -cd "${USER}" -mkdir 'VirtualBox VMs' &> /dev/null -cd 'VirtualBox VMs' -if [ "$?" != "0" ]; then - echo "failed to setup user's \"VirtualBox VMs\" folder" - echo "sorry." - exit 1 -fi - -# get recent initial VM and create disk image -echo 'download initial OpenSecurity VM' -cd "/cygdrive/c/Documents\ and\ Settings/${USER}/VirtualBox\ VMs/" -#wget http://service.x-net.at/opensecurity/OsecVM_initialized.ova -VBoxManage.exe import OsecVM_initialized.ova --vsys 0 --vmname SecurityDVM --unit 12 --disk SecurityDVM.vmdk - -# launch the SecurityVM the first time to let the user do initial updates -VBoxManage.exe startvm SecurityDVM - -cat << EOF -# Start VirtualBox and update the machine -# -# login with -# user: root -# pass: osecvm -# -# issue these commands as root -# -# # apt-get update -# # apt-get upgrade -# # apt-get dist-upgrade -# -# then shutdown the machine with -# -# # shutdown -h now -# -# press a key when done to proceed -EOF -read -n 1 -s - -# Turn the VM disk image immutable and attach it -VBoxManage.exe storageattach SecurityDVM --storagectl SATA --port 0 --medium none -VBoxManage.exe modifyhd SecurityDVM.vmdk settype immutable -VBoxManage.exe storageattach SecurityDVM --storagectl SATA --port 0 --device 0 --type hdd --mtype normal --medium SecurityDVM.vmdk - diff -r 1f4ba6a6ecf5 -r 9e8fffdb8f47 OpenSecurity/install/initial_vm.bat --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/OpenSecurity/install/initial_vm.bat Thu Jan 23 17:03:27 2014 +0000 @@ -0,0 +1,37 @@ +@echo off + +rem ensure environment is ready +C: +cd "C:\Documents and Settings\%USERNAME%\VirtualBox VMs" + +rem get recent initial VM and create disk image +echo "download initial OpenSecurity VM" +rem wget http://service.x-net.at/opensecurity/OsecVM_initialized.ova +VBoxManage.exe import OsecVM_initialized.ova --vsys 0 --vmname SecurityDVM --unit 12 --disk SecurityDVM.vmdk + +# launch the SecurityVM the first time to let the user do initial updates +VBoxManage.exe startvm SecurityDVM + +echo "# Start VirtualBox and update the machine " +echo "# " +echo "# login with " +echo "# user: root " +echo "# pass: osecvm " +echo "# " +echo "# issue these commands as root " +echo "# " +echo "# # apt-get update " +echo "# # apt-get upgrade " +echo "# # apt-get dist-upgrade " +echo "# " +echo "# then shutdown the machine with " +echo "# " +echo "# # shutdown -h now " +echo "# " +echo "# press a key when done to proceed " +pause + +rem Turn the VM disk image immutable and attach it +VBoxManage.exe storageattach SecurityDVM --storagectl SATA --port 0 --medium none +VBoxManage.exe modifyhd SecurityDVM.vmdk settype immutable +VBoxManage.exe storageattach SecurityDVM --storagectl SATA --port 0 --device 0 --type hdd --mtype normal --medium SecurityDVM.vmdk