More and more I have been running Virtualbox virtual servers upon my main Ubuntu 10.04 server. I used to create the virtual server upon my Macbook Pro 13″, then export the image, and reimport the image upon the linux headless server. Recently I found it was much easier to create the VirtualBox server upon a headless linux server. Certainly creating the virtual server upon a guy based tool is a lot easier, but it does not save time when you need to export and import the image across to the linux server.
The following steps below will show you howto setup a VirtualBox virtual headless server.
We now create and register the virtual server with the command VBoxManage.
We allocated the amount of memory the virtual server will have, the sequence of boot, e.g. dvd first, and which either net adapter does the virtual machine attach itself too. The memory we have allocated is 1024mb and the ethernet it uses is eth4.
We now create the hard disk or virtual disk for the virtual server. We allocated 100gb of hard disk space, and store the virtual hard disk file in /home/vbox
We state that the virtual server uses a ide controller. We can use ahci also, but ide is safe to use.
We state that the virtual server uses the ide controller and attach the vital server hard disk to the ide controller.
We need also attach the dvd driver to the ide storage controller. Also we attach the iso image to the dvd drive, so that when we boot the virtual server for the first time, it boots the virtual dvd driver and uses the iso image.
We now allow remote desktop software to connect to the virtual server.
We now set the port, we can connect to the virtual server on with the remote desktop software. We can connect to the virtual server on port 3392. You can use Microsoft Remote Desktop Connection to connect.
Once this is all done we can now startup the headless virtual server.
You can shutdown the virtual server with the following command.
You can pause and restart the virtual server, but within the means of this document, I will not explain them, as they are commands not really needed.