TMD Vision

Avatar

Configuring VirtualBox on a remote server

At TwoMenDesign we are testing and evaluating the VirtualBox virtual machine from Sun. This VM is the youngest one around but nevertheless has a lot to offer.

Creating a virtual machine on a remote Linux server is really easy. I assume that you’ve already installed VirtualBox, or if you haven’t please look here for a tutorial for your Linux distribution. Once you’re set-up it is very straightforward how to create configuration for a virtual machine. The only thing you need is an ISO image of your operating system of choice you want to install into your virtual machine. It may be Linux, Windows or one of the other supported guest OS’s.

Connect to your server either at a local terminal or remote through telnet or ssh. (However you can do this through telnet please don’t. It is not secure!).

To create a new virtual machine enter:

VBoxManage createvm -name “Debian vm” -register

This will create a new ‘.VirtualBox’ directory on your current path containing all configuration files for the new VM.
To modify the settings of the virtual machine enter:

VBoxManage modifyvm “Debian vm” -memory “256MB” -acpi on -boot1 dvd -nic1 nat

This will modify the virtual machine and set its memory, turn ACPI on, use dvd as the boot device and add a network adapter using NAT.
The virtual machine will need a virtual hard disk for its file. The following command creates a virtual disk with a size of 10GB.

VBoxManage createhd -filename “VirtualDisk1.vdi” -size 10000 -register

Add this disk to your virtual machine. In this case you set it up as the first disk (hda).

VBoxManage modifyvm “Debian vm” -hda “VirtualDisk1.vdi”

Now it is time to register your ISO with VirtualBox and add it to the VM. The following commands will do that.

VBoxManage openmedium dvd /home/virtual/myimage.iso

VBoxManage modifyvm “Debian vm” -dvd /home/virtual/myimage.iso

You have now completed the setup of your virtual machine. Start the virtual machine with:

VBoxHeadless -startvm “Debian vm”

You should see a copyright notice of VirtualBox. If you see something else please make sure you’ve entered the right information.
If everything worked fine you can connext with any RDP viewer to your new virtual machine. The RDP port used is visible beneath the copyright information.

On Windows systems you can use the windows Remote Desktop application and on Linux try the following command:

rdesktop -a 16 -N your.server.com

Offcourse your firewall should not block the connection. If everything worked well you should see the installation of your operating system.

If you have any questions please don’t hesitate to ask. For a complete list of commands please see the VirtualBox documentation.

Laatste 5 berichten door Jeroen

Share and Enjoy:
  • del.icio.us
  • Twitter
  • Google Bookmarks
  • RSS
  • Facebook
  • eKudos
  • email
  • NuJIJ
blog comments powered by Disqus

TwoMenDesign

Bezoek ook eens TwoMenDesign.nl