Tag Archive | virtualbox

Remote Mininet VM with Virtualbox in Debian Host

Mininet before version 2.0 did not come with an easy way to reach the Internet through the mininet VM. Mininet 2.0 VM comes by default with connection to the network of the host, overriding this problem.

I am now going to describe how to invoke mininet to a remote Debian host through ssh and rdesktop using VirtualBox in a headless mode. Virtualbox is assumed to be installed.

-Get Mininet image (>2.0)

# Download Mininet 2.0 ubuntu image
wget https://github.com/downloads/mininet/mininet/mininet-2.0.0-113012-amd64-ovf.zip
# Extract
unzip mininet-2.0.0-113012-amd64-ovf.zip

-Prepare Virtualbox and import VM

# Get and install vbox extension pack for vrde support (remote desktop)
# Get a version corresponding to your vbox version
wget http://download.virtualbox.org/virtualbox/4.2.12/Oracle_VM_VirtualBox_Extension_Pack-4.2.12-84980.vbox-extpack
vboxmanage extpack install Oracle_VM_VirtualBox_Extension_Pack-4.2.12-84980.vbox-extpack
# Import vm, the name of the vm will be "vm"
vboxmanage import mininet-vm.ovf
# Turn vrde on 
vboxmanage modifyvm vm --vrde on
# Set authentication using hosts credentials
vboxmanage modifyvm --vrdeauthtype external
# Start vm with vrde running in port 5001
vboxheadless --startvm vm --vrde config

-Connect through with rdesktop through Linux client

# Connect to the vm with host IP (1.2.3.4), username and password
rdesktop -a 16 -u user -p password -N 1.2.3.4:5001

To connect with the windows client mstsc.exe a .rdp should be created which should contain the username and password (help).

-Enable ssh

# Enable ssh to port 8082
vboxanage modifyvm vm --natpf1 "ssh,tcp,,8082,,22"

Now mininet is ready for remote use through remote desktop or ssh ;-).

Advertisements