VBoxHeadless - Running Virtual Machines With VirtualBox 3.1.x On A Headless CentOS 5.4 Server
VBoxHeadless - Running Virtual Machines With VirtualBox 3.1.x On A Headless CentOS 5.4 Server
1 Preliminary Note
I have tested this on a CentOS 5.4 server (host system) with the IP
address 192.168.0.100 where I'm logged in as a normal user (user name admin in this
example) instead of as root.
If you only have a root account, but no normal user account, create one as follows
(user admin, group admin)...
# groupadd admin
# useradd -d /home/admin -m -g admin -s /bin/bash admin
# passwd admin
2 Installing VirtualBox
To install VirtualBox 3.1.x on our CentOS 5.4 server, we need root privileges, therefore we run
$ su
# wget -q http://download.virtualbox.org/virtualbox/debian/sun_vbox.asc
# rpm --import sun_vbox.asc
# rm -f sun_vbox.asc
Now we must add the user that will run VirtualBox (admin in this example) to
the vboxusers group:
Type
# exit
to leave the root account and become a normal user (admin) again.
3.1 Creating A VM
To create a VM on the command line, we can use the VBoxManage command. See
$ VBoxManage --help
$ VBoxHeadless --help
and at http://www.virtualbox.org/manual/UserManual.html.
4.1 Windows XP
You can use the built-in Remote Desktop Connection utility to connect to the VM:
$ su
# exit
Then type in the following command:
$ rdesktop -a 16 192.168.0.100
(192.168.0.100 is the host IP address, not the one of the guest - replace it with your own IP
address or hostname; -a 16 means 16 bit colour depth.)
And voilà, you should be connected to the VM:
5 Links
VirtualBox: http://www.virtualbox.org/
CentOS: http://www.centos.org/