- About XNAT
- News & Events
- XNAT Marketplace
- Contact Us
VirtualBox is a powerful, open-source virtualization tool. It is available free of cost for Windows, OS X, Linux, and Solaris. VirtualBox offers features such as mouse intergration and folder sharing.
VirtualBox can create and run a virtual machine using a VMDK file, which is the format of the XNAT virtual machine. Just follow the steps below:
Click on the “New” button in the main VirtualBox screen, so that the “Create New Virtual Machine” Wizard appears. Click “Next.”
Give the VM a name, such as xnat-demo. For Operating System, select Linux, and for Version, select Ubuntu (please do not select Ubuntu 64 even if you are using a 64-bit computer, we will run a 32-bit guest). Click “Next.”
Set up the memory (512 MB should work for the demo). Click “Next.”
Click “Use existing hard disk” then click the icon to the right.
Browse to the location where you extracted the VMDK file and choose it.
The VMDK should appear in the list. Click "Next".
The Virtual Machine is now ready, click “Create.”
From the main window, with xnat-demo selected, click the “Start” button.
The password can be found in the README file that accompanied the VMDK.
You can launch Firefox, XNAT should be running and configured with sample data at. The XNAT administrator's username is “admin” and its password is “admin”.
By default, VirtualBox uses a network configuration, in which the guest operating system (the XNAT VM) is not directly on the network, but rather shares the the host operating system's IP address. This configuration is much simpler than other possible options, but it comes at the expense of making it harder to expose a server port on the VM to the rest of the network.
However, VirtualBox makes it easy to route traffic from a port on the host to a port on the guest. Assuming that we named our Virtual Machine "xnat-demo", we can run the following commands at the host's command line which takes traffic from the host's port 8080 and directs it to the guest's port 8080.
VBoxManage modifyvm "xnat-demo" --natpf1 "ForwardXNATWebapp,tcp,,8080,,8080"
Alternatively, you can set up the port forwarding rule via the VirtualBox GUI (under Network-->Advanced–>Port Forwarding):
After implementing this,will be directed to the VM's port 8080 (where Tomcat is listening for requests).