Teleporting Script and Observations

This is for discussing general topics about how to use VirtualBox.
Post Reply
tp47565
Posts: 2
Joined: 1. Dec 2009, 02:17
Primary OS: MS Windows Vista
VBox Version: OSE other
Guest OSses: Solaris10, OpenSolaris, Windows 7, Ubuntu

Teleporting Script and Observations

Post by tp47565 »

I knocked this up this morning. See my Observations on Teleporting in the script. Looks like I will need to wait for a bit until it's stable for me. Would love to hear others successes or failures.
#!/bin/sh

#######################################################
#
# Very Simple teleport demo script
#
# Version 1.0  1st December 2009
#
# Notes: Only ever tested on a laptop using "localhost"
#        I assume you have setup both VMs on both hosts
#
#        On Windows remenber to open the $PORT on the firewall
#	 even if just using "localhost" like me
#
#        No error checking this is a Very Simple Script!!
#
# Feedback etc:- trevor.pretty@eagle.co.nz
#
# Observations: YMMV
#               Using Vista as the host OS: VirtualBox version 3.1.0r55467 
#               There is no easy way to stop a VM that is in teleport mode
#		Opensolaris 2009.06 just did not work
#               Solaris 10 u8 is unstable and ramdomly reboots after teleporting
#		Windows 7 blue screens after telporting
#		Ubuntu 9.04 I could not get mouse focus once teleported but seems stable
#
#######################################################

echo ""
echo "+++++++++++++++"
echo " Teleport Demo"
echo "+++++++++++++++"
echo ""	

cd /cygdrive/c/Program\ Files/Sun/VirtualBox

#PRIMARY_VM="Solaris_10"
#FAILOVER_VM="Solaris10-HA"
#PRIMARY_VM="Ubuntu"
#FAILOVER_VM="Ubuntu-HA"
PRIMARY_VM="Windows7"
FAILOVER_VM="Windows7-HA"
LOCAL_HOST="localhost"	
REMOTE_HOST="localhost"		
PORT="6000"			


echo ""
echo "Staring $PRIMARY_VM Virtual machine"
echo ""

./VBoxManage modifyvm $PRIMARY_VM  --teleporter off ## Just in case it's on
./VBoxManage modifyvm $FAILOVER_VM --teleporter on  --teleporterport $PORT
./VBoxManage startvm  $PRIMARY_VM

echo ""
echo "Please wait for machine to start. Then press [enter]"
echo ""
read DUMMY < /dev/tty

echo ""
echo "Staring teleport host and then teleporting"
echo ""

./VBoxManage startvm   $FAILOVER_VM
#/usr/bin/sleep 10
./VBoxManage controlvm $PRIMARY_VM  teleport --host $REMOTE_HOST --port $PORT

echo ""
echo "Staring VirualBox main GUI to show current state"
echo ""
./VirtualBox &

echo ""
echo "Now lets teleport back. when ready press [enter] "
echo ""
read DUMMY < /dev/tty


./VBoxManage modifyvm $PRIMARY_VM --teleporter on --teleporterport $PORT
./VBoxManage startvm  $PRIMARY_VM
#/usr/bin/sleep 10
./VBoxManage controlvm $FAILOVER_VM teleport --host $LOCAL_HOST --port $PORT
tp47565
Posts: 2
Joined: 1. Dec 2009, 02:17
Primary OS: MS Windows Vista
VBox Version: OSE other
Guest OSses: Solaris10, OpenSolaris, Windows 7, Ubuntu

Re: Teleporting Script and Observations

Post by tp47565 »

I've since discovered that if you disable mouse integration (use the icon in the bottom right) before you teleport Ubuntu then it seems this guest works flawlessly.

Still no real luck with Windows 7, OpenSolaris or Solaris 10.
Post Reply