Note this method although should work fine, is not official supported.
Virtualbox provides a free, simple and easy to use solution for virtualising your PiNet server.
Virtualisation is basically running a second virtual computer inside (and at the same time as) your normal computer.
Each virtual install is completely separate from anything else, as the virtual hard drive is just a single file, you can delete the entire virtual operating system extremely easily.
Virtualisation should not be confused with multithreading or hyper-threading. These only run 1 operating system but allow you to run more than 1 program at a time.
Do note though, you need a slightly more powerful computer than if just installing Ubuntu directly to the internal hard drive (as it has to run your normally operating system and Ubuntu at the same time).
A duel core or quad core computer from the past 4-5 years with at least 4GB of ram is highly recommended.
If you run into issues with virtualisation (crashes or failing to load), you may want to check as hardware CPU virtualisation may have to be turned on in your BIOS. On Intel based processors this is called
Intel Virtualisation Technology or
Intel-VT and on AMD processors it is called
Linuxfor the type and
Ubuntu (32 bit)or
Ubuntu (64 bit)for Version depending on which version you downloaded earlier. Then hit continue.
Create virtual hard drive nowand click
VID (VirtualBox Disk Image)and click
Dynamically allocatedand click
When setting the size, this is difficult to change later. By selecting
Dynamically allocated in the last step, it means the size you select will not immediately be used. It will only be used if it is needed by the virtual machine.
I would suggest a virtual hard drive size of at least 20GB. If this is going to be your main PiNet server (as opposed to just using it to try it out), I would suggest at least 30GB if not more.
A fully installed Ubuntu and PiNet server uses around 13GB on its own. All extra space is for extra programs and students work.
Once you have decided your size, select
There is a number of things you may want to change with the virtual machine.
To open the settings panel, right click the virtual machine in VirtualBox and select
You can change the number of CPU cores the virtual machine has access to. By default virtualbox will only assign a single processor. If the computer you are using has many processor cores, it would be worth assigning more to the virtual machine.
It is not recommended assigning any more than 50% of your CPU cores to the virtual machine unless you know what you are doing.
Processorsubtab. Here you can drag the slider to select how many processor cores you wish to assign to the virtual machine.
VirtualBox has a number of ways to create a virtual network card for the server. Each of them has their uses but also their issues.
To use PiNet, you must change the network adapter from the default.
Attached tooption as
It can be a good idea to install the Virtualbox guest additions. These are additional software modules/drivers to improve compatibility with Virtualbox.
Once you install them, a few additional features are added, including support for bidirectional copy and paste support between the virtual machine and the host operating system, more importantly it adds the missing screen resolution detection modules for Ubuntu 14.04, allowing you to resize the screen.
To install them, launch the Ubuntu virtual machine, open a terminal and enter
sudo apt-get install -y virtualbox-guest-dkms virtualbox-guest-utils virtualbox-guest-x11
Once it is complete, you will want to reboot Ubuntu to apply them.
##Virtualbox extension pack
A majority of hardware will just work out of the box without any issues with Virtualbox, but some obscure or random hardware may not due to licensing issues. Because of the open source licence virtualbox is provided with, closed source (aka source code for driver is kept secret) hardware drivers are not included in the standard installation.
Fortunately, these are still available, just only as compile binaries under a different licence. If you are having issues with a piece of hardware (a network card for example), you may want to install these. They can be found on the Virtualbox download page.