Posts Tagged ‘ vbox ’

was wondering how to run a vm on a termi…

was wondering how to run a vm on a terminal server (no gui), and remotely access that vm through rdp on a remote box. the first thing u do is installing the virtualbox on that server using ssh from the remote box. then u have to create a vm (ofcourse) to connect. i will use winxp as a vm guest. my host is kubuntu (does’t matter). and i will use krdc to connect to that vm.
i am gonna a create a winxp vm with 256mb ram and 6gb of hdd capacity. here wat i will do in the server to creat the the vm:

VBoxManage createvm -name “Win XP” -register
VBoxManage modifyvm “Win XP” -memory “256MB” -acpi on -boot1 dvd -nic1 nat
VBoxManage createvdi -filename “WinXP.vdi” -size 6000 -register
VBoxManage modifyvm “WIn XP” -hda “WinXP.vdi”
VBoxManage registerimage dvd /home/WinXP.iso
VBoxManage modifyvm “WinXP” -dvd /home/WinXP.iso

definitely u need to have the winxp iso file stored on that server. now lets start the vm, but remember the terminal server has no gui, i am still in the ssh mode connected with this server. so u will use a great tool of virtualbox called “VBoxHeadless” which enable us to run any vm through virtualbox with vrdp enables at 3389 port.

VBoxHeadless -startvm “Win XP”

u will see something like this in the terminal…

VirtualBox Headless Interface 3.0.12
(C) 2008-2009 Sun Microsystems, Inc.
All rights reserved.

Listening on port 3389

as u can see the vrdp of that vm in listening on port 3389 (default port for rdp). u can change this port too. for this and many other options plz see the manual or man/help pages.
now lets connect to this vm. remember one thing u will not give guest ip address and port for connecting to the vm, but the host ip address and the port on which the vm is running and vrdp is listening. u can also use rdesktop (a cmd line tool) in linux. so in krdc, i used (the ip of that terminal server) with no port mention, cause by default the port for rdp is 3389 and any rdp client knows that.

finally, i managed to connect and explore the winxp with out hampering the terminal server for gui.

%d bloggers like this: