[pisa-src] r2510 - in trunk/tools/testbed/pisa-testbed_vms: config plugins/actions/vbox plugins/classes/vbox plugins/classes/vbox/clean plugins/classes/vbox/create plugins/classes/vbox/start plugins/classes/v...

  • From: Samuel Richter <samuel.richter@xxxxxxxxxxxxxx>
  • To: pisa-src@xxxxxxxxxxxxx
  • Date: Mon, 04 Apr 2011 15:14:07 +0200

Author: richter
Date: Mon Apr  4 15:14:07 2011
New Revision: 2510

Log:
make vbox a class, not an action and add it to virtual testbed config

Added:
   trunk/tools/testbed/pisa-testbed_vms/plugins/classes/vbox/
   trunk/tools/testbed/pisa-testbed_vms/plugins/classes/vbox/clean
   trunk/tools/testbed/pisa-testbed_vms/plugins/classes/vbox/create
   trunk/tools/testbed/pisa-testbed_vms/plugins/classes/vbox/start
   trunk/tools/testbed/pisa-testbed_vms/plugins/classes/vbox/stop
Deleted:
   trunk/tools/testbed/pisa-testbed_vms/plugins/actions/vbox/
Modified:
   trunk/tools/testbed/pisa-testbed_vms/config

Modified: trunk/tools/testbed/pisa-testbed_vms/config
==============================================================================
--- trunk/tools/testbed/pisa-testbed_vms/config Mon Apr  4 15:12:23 2011        
(r2509)
+++ trunk/tools/testbed/pisa-testbed_vms/config Mon Apr  4 15:14:07 2011        
(r2510)
@@ -12,7 +12,7 @@
 ROUTERA="default"
 ROUTERB="default"
 CLIENT="default"
-DEFAULT="ubuntu_live hipl pisa"
+DEFAULT="ubuntu_live vbox hipl pisa"
 
 PISA_PATH=$HOME/src/pisa
 HIPL_PATH=$HOME/src/hipl

Added: trunk/tools/testbed/pisa-testbed_vms/plugins/classes/vbox/clean
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ trunk/tools/testbed/pisa-testbed_vms/plugins/classes/vbox/clean     Mon Apr 
 4 15:14:07 2011        (r2510)
@@ -0,0 +1,10 @@
+#!/bin/sh
+set +e
+
+VBoxManage -q storageattach "$FULL_NAME" --storagectl "IDE Controller" --port 
0 --device 1 --medium none
+VBoxManage -q storageattach "$FULL_NAME" --storagectl "IDE Controller" --port 
0 --device 0 --medium none
+VBoxManage -q closemedium dvd "$VBOX_ISO"
+VBoxManage -q closemedium dvd "$BIN_PATH/${FULL_NAME}.iso"
+VBoxManage -q unregistervm "$FULL_NAME" --delete
+
+set -e

Added: trunk/tools/testbed/pisa-testbed_vms/plugins/classes/vbox/create
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ trunk/tools/testbed/pisa-testbed_vms/plugins/classes/vbox/create    Mon Apr 
 4 15:14:07 2011        (r2510)
@@ -0,0 +1,20 @@
+#!/bin/sh
+set +e
+
+VBoxManage -q createvm --name $FULL_NAME --register
+VBoxManage -q modifyvm $FULL_NAME --memory 384
+VBoxManage -q storagectl $FULL_NAME --name "SATA Controller" --add sata
+VBoxManage -q storagectl $FULL_NAME --name "IDE Controller" --add ide
+[ $VBOX_ETH0 ] && VBoxManage -q modifyvm $FULL_NAME --nic1 intnet --intnet1 
$VBOX_ETH0
+[ $VBOX_ETH1 ] && VBoxManage -q modifyvm $FULL_NAME --nic2 intnet --intnet2 
$VBOX_ETH1
+VBoxManage -q modifyvm $FULL_NAME --nic3 nat
+VBoxManage -q modifyvm $FULL_NAME --natnet3 "10.1.${IP:-254}/24"
+
+VBoxManage -q modifyvm $FULL_NAME --natpf3 
"guestssh,tcp,,$SSH_PORT,10.1.${IP:-254}.15,22"
+
+VBoxManage -q openmedium dvd $VBOX_ISO
+VBoxManage -q storageattach $FULL_NAME --storagectl "IDE Controller" --port 0 
--device 0 --type dvddrive --medium $VBOX_ISO
+VBoxManage -q openmedium dvd "$BIN_PATH/${FULL_NAME}.iso"
+VBoxManage -q storageattach $FULL_NAME --storagectl "IDE Controller" --port 0 
--device 1 --type dvddrive --medium "$BIN_PATH/${FULL_NAME}.iso"
+
+set -e

Added: trunk/tools/testbed/pisa-testbed_vms/plugins/classes/vbox/start
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ trunk/tools/testbed/pisa-testbed_vms/plugins/classes/vbox/start     Mon Apr 
 4 15:14:07 2011        (r2510)
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+VBoxManage -q startvm $FULL_NAME --type headless || true

Added: trunk/tools/testbed/pisa-testbed_vms/plugins/classes/vbox/stop
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ trunk/tools/testbed/pisa-testbed_vms/plugins/classes/vbox/stop      Mon Apr 
 4 15:14:07 2011        (r2510)
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+VBoxManage -q controlvm $FULL_NAME poweroff || true
-- 
This is the pisa developer mailing list. Please also subscribe to the main pisa 
list at:
//www.freelists.org/list/pisa

Other related posts:

  • » [pisa-src] r2510 - in trunk/tools/testbed/pisa-testbed_vms: config plugins/actions/vbox plugins/classes/vbox plugins/classes/vbox/clean plugins/classes/vbox/create plugins/classes/vbox/start plugins/classes/v... - Samuel Richter