OpenSecurity/install/initial_vm.bat
author dyle@opensecurity.d03.arc.local
Thu, 23 Jan 2014 17:03:27 +0000
changeset 51 9e8fffdb8f47
parent 50 OpenSecurity/install/initial_vm@1f4ba6a6ecf5
child 52 1238895dc6b6
permissions -rw-r--r--
turned initial_vm from a bash into a DOS file
     1 @echo off
     2 
     3 rem ensure environment is ready
     4 C:
     5 cd "C:\Documents and Settings\%USERNAME%\VirtualBox VMs"
     6 
     7 rem get recent initial VM and create disk image
     8 echo "download initial OpenSecurity VM"
     9 rem wget http://service.x-net.at/opensecurity/OsecVM_initialized.ova
    10 VBoxManage.exe import OsecVM_initialized.ova --vsys 0 --vmname SecurityDVM --unit 12 --disk SecurityDVM.vmdk
    11 
    12 # launch the SecurityVM the first time to let the user do initial updates
    13 VBoxManage.exe startvm SecurityDVM
    14 
    15 echo "# Start VirtualBox and update the machine	"
    16 echo "#                                         "
    17 echo "# login with                              "
    18 echo "#   user: root                            "
    19 echo "#   pass: osecvm                          "
    20 echo "#                                         "
    21 echo "# issue these commands as root            "
    22 echo "#                                         "
    23 echo "#       # apt-get update                  "
    24 echo "#       # apt-get upgrade                 "
    25 echo "#       # apt-get dist-upgrade            "
    26 echo "#                                         "
    27 echo "# then shutdown the machine with          "
    28 echo "#                                         "
    29 echo "#       # shutdown -h now                 "
    30 echo "#                                         "
    31 echo "# press a key when done to proceed        "
    32 pause
    33 
    34 rem Turn the VM disk image immutable and attach it
    35 VBoxManage.exe storageattach SecurityDVM --storagectl SATA --port 0 --medium none
    36 VBoxManage.exe modifyhd SecurityDVM.vmdk settype immutable
    37 VBoxManage.exe storageattach SecurityDVM --storagectl SATA --port 0 --device 0 --type hdd --mtype normal --medium SecurityDVM.vmdk