Differences between revisions 11 and 12
Revision 11 as of 2009-02-11 08:28:30
Size: 1925
Editor: OndrejCertik
Comment:
Revision 12 as of 2009-02-11 08:44:05
Size: 2432
Editor: OndrejCertik
Comment:
Deletions are marked like this. Additions are marked like this.
Line 40: Line 40:
rdesktop localhost $ rdesktop localhost
}}}

Install the system. After installing it, remove the cd (iso image) by
{{{
$ VBoxManage modifyvm ubuntu -dvd none
Line 45: Line 50:
VBoxManage controlvm ubuntu poweroff $ VBoxManage controlvm ubuntu poweroff
Line 50: Line 55:
VBoxManage controlvm ubuntu savestate $ VBoxManage controlvm ubuntu savestate
Line 58: Line 63:
VBoxManage setextradata ubuntu "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guestssh/Protocol" TCP
VBoxManage setextradata ubuntu "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guestssh/GuestPort" 22
VBoxManage setextradata ubuntu "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guestssh/HostPort" 2222
$ VBoxManage setextradata ubuntu "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guestssh/Protocol" TCP
$ VBoxManage setextradata ubuntu "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guestssh/GuestPort" 22
$ VBoxManage setextradata ubuntu "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guestssh/HostPort" 2222
Line 64: Line 69:
ssh -p 2222 localhost $ ssh -p 2222 localhost
Line 66: Line 71:
To forward the port 8000 for the Sage notebook, use:
{{{
$ VBoxManage setextradata ubuntu "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guest8000/Protocol" TCP
$ VBoxManage setextradata ubuntu "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guest8000/GuestPort" 8000
$ VBoxManage setextradata ubuntu "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guest8000/HostPort" 8000
}}}

You need a recent virtualbox, or the (proprietary) server version of it (which is free as in beer). In any case, the steps below work for me on Ubuntu intrepid:

/etc/apt/sources.list:

deb http://download.virtualbox.org/virtualbox/debian intrepid non-free

Execute:

$ wajig install virtualbox-2.1

Answer yes to install the kernel module, it should just work. Create the virtual image:

$ VBoxManage createvm -name ubuntu -register
$ VBoxManage modifyvm ubuntu -memory "2048MB" -acpi on -boot1 dvd -nic1 nat
$ VBoxManage createvdi -filename ~/.VirtualBox/Machines/ubuntu/ubuntu.vdi -size 20000 -register
$ VBoxManage modifyvm ubuntu -hdb ~/.VirtualBox/Machines/ubuntu/ubuntu.vdi
$ VBoxManage registerimage dvd ~/ext/debian-40r6-i386-netinst.iso
$ VBoxManage modifyvm ubuntu -dvd ~/ext/debian-40r6-i386-netinst.iso

Start the image

$ VBoxHeadless -startvm ubuntu
VirtualBox Headless Interface 2.1.2
(C) 2008-2009 Sun Microsystems, Inc.
All rights reserved.

Listening on port 3389

Connect to the image (requires X) on the same machine:

rdesktop localhost

Or you can login remotely by forwarding the 3389 port:

$ ssh -L 3389:localhost:3389 server

And from your desktop computer

$ rdesktop localhost

Install the system. After installing it, remove the cd (iso image) by

$ VBoxManage modifyvm ubuntu -dvd none

Stop the image (do not save changes)

$ VBoxManage controlvm ubuntu poweroff

Stop the image (save changes)

$ VBoxManage controlvm ubuntu savestate

Networking

In order to be able to login using ssh, do:

$ VBoxManage setextradata ubuntu "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guestssh/Protocol" TCP
$ VBoxManage setextradata ubuntu "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guestssh/GuestPort" 22
$ VBoxManage setextradata ubuntu "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guestssh/HostPort" 2222

Then you can login on the server using:

$ ssh -p 2222 localhost

To forward the port 8000 for the Sage notebook, use:

$ VBoxManage setextradata ubuntu "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guest8000/Protocol" TCP
$ VBoxManage setextradata ubuntu "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guest8000/GuestPort" 8000
$ VBoxManage setextradata ubuntu "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guest8000/HostPort" 8000

SageVirtualBox (last edited 2012-02-14 22:35:28 by ltw)