#!/bin/bash source oraclesettings.bsh vmrun start "$vm_file" echo $save_path mkdir -p $save_path echo $machine_ip echo "Due to the complexity of Oracle, the db needs to be created with dbca and our responce file" #echo "Starting the VM" vmrun start "$vm_file" sleep 60 echo "Start Oracle" ssh -i id_rsa -t oracle@$machine_ip "~/StartOracle.bsh" sleep 10 echo "Dropping and creating the DB" ssh -i id_rsa -t oracle@$machine_ip "~/DropCreateDB.bsh" sleep 60 echo "Pausing the vm" vmrun stop "$vm_file" soft sleep 30 ts=`date "+%Y-%m-%d-%H:%M:%S"` mkdir -p $save_path/pass-loaded/$ts echo "Copy the vm contents" cp -Rf "$vm_folder" $save_path/pass-clean/$ts echo "#################"