Running FLUKA on non-Unix/Linux systems
Currently, installation of FLUKA is only supported on UNIX and Linux systems. However it can be run under other operating systems by using a Linux virtual machine. FLUPIX is an optical disk image with all the required tools for FLUKA analysis, including the Flair graphical interface. It can be run (only) through the VirtualBox virtual machine. While the FLUPIX webpage gives instructions on how to configure the virtual machine, this page provides a more detailed "click-by-click" walkthrough of how to set up VirtualBox for FLUPIX, for those who desire more detail.
Download files
Download and install VirtualBox following the instructions for your operating system. Once VirtualBox is installed, download the following files from the FLUKA downloads webpage:
- flupix-version.iso (where version denotes the FLUKA/Flair version included in the disk image)
- flupix-vdi.zip
If you don't have a FLUKA registration, the files for the version of FLUKA used by the eRHIC group are available via the EIC AFS region at /afs/rhic.bnl.gov/eic/PACKAGES/fluka/flupix. Unzip flupix-vdi.zip in the HardDisks directory of your VirtualBox installation. The location of this directory depends on your operating system:
Windows XP | C:\Documents And Settings\<user>\.VirtualBox\HardDisks |
Windows Vista | C:\Users\<user>\.VirtualBox\HardDisks |
Mac OS X | /Users/<user>/Library/VirtualBox/HardDisks |
Linux | /home/<user>/.VirtualBox/HardDisks |
This will yield two files: flupix.vdi and swap.vdi.
Create a Linux virtual machine
We now need to create the Linux virtual machine in which to run FLUKA. To do so:
- Open VirtualBox and click the "New" button (top left). This starts the "New Virtual Machine Wizard". Click "Continue" to proceed to the "VM Name and OS Type" window.
- Provide a name for the virtual machine e.g. "Linux for FLUKA". In the "Operating System" drop-down menu select Linux and in the "Version" menu select Linux 2.6 (not Linux 2.6 (64 bit)). Click "Continue" to proceed to the "Memory" window.
- Specify how much memory (RAM) to provide for the virtual machine. At a minimum FLUPIX needs 512 MB, and 768 MB is recommended. Remember to leave enough memory for your host (physical) computer's operating system to run! For example, if you are running on a Windows Vista machine with 1 GB of RAM, don't use more than 512 MB for the Linux virtual machine, as Vista needs 512 MB itself. Click "Continue" once more to proceed to the "Virtual Hard Disk" window.
- Uncheck the "Boot Hard Disk" box and press continue. You will receive a warning message saying you didn't attach a hard disk and do you wish to continue. We will add the disks later, so click "Continue" to proceed to the "Summary" page.
- Check that the settings match what we specified above, then click "Done" to create the virtual machine setup.
Configure the virtual machine
The Linux virtual machine will now appear in the left panel of VirtualBox with the name you gave it (e.g. "Linux for FLUKA"); select it. The right panel shows the configuration of the machine. To edit the configuration so we can use it with FLUPIX:
- Click on the "Settings" button at the top of the VirtualBox window. This opens a window with a number of tabs, from which we can specify the settings. Select the "Storage" tab.
- In the white window on the left there is an entry for "IDE Controller", to the right of which are two icons: "Add CD/DVD Device" on the left and "Add Hard Disk" on the right. Click "Add CD/DVD Device" and select "Choose disk" at the prompt. Navigate to where you saved the flupix-version.iso file and select it.
- Now click "Add Hard Disk", select "Choose existing disk" at the prompt and navigate to where you saved flupix.vdi and select it.
- Repeat the above step for for swap.vdi in place of flupix.vdi.
- Select each of the three added devices in turn and look at the "Hard Disk" drop-down menu on the right of the window. They should appear in the menu as follows:
flupix-version.iso | IDE Primary Master |
flupix.vdi | IDE Primary Slave |
swap.vdi | IDE Secondary Master |
If any of them are not as listed above, select the correct entry from the drop-down menu.
- There may also be an disk named "Empty" listed by default. If so, right click on it and select "Remove Attachment".
- In the "Network" tab, select "Adaptor 1" and check the box "Enable Network Adaptor". From the "Attached to" drop-down menu select "NAT". Click on "Advanced" and from the "Adaptor Type" menu choose "Intel PRO/1000 MT Desktop".
In order to transfer files between the virtual machine and our physical machine, we can set up a folder that is shared between the two. Files can be saved to and accessed from this folder in both machines. To do so:
- Create a folder on your physical machine.
- In the VirtualBox "Settings" window, choose the "Shared Folders" tab.
- Click on the "Add Shared Folder" button at the right and select the folder you wish to share via the "Folder Path" menu. If you wish, you can specify an alternative name for the folder in the "Folder Name" box. This is the name with which the folder appears in the Linux virtual machine; the name of the folder on the physical machine is not affected. By default the name is the same as that on the physical machine.
- Check the "Auto-mount" box and click "OK".
When we run the virtual machine, the shared folder will appear under the /media directory with the name we provided, prefixed by "sf_". e.g. if we shared the folder /path/to/flukaWork/ it will appear on the virtual machine as /media/sf_flukaWork/. Once you are done configuring all the settings click "OK" to confirm them.
Launch the virtual machine
We are now ready to start the virtual machine. Select the virtual machine in the panel on the left panel of the VirtualBox window and click the "Start" button at the top. The first time you launch it, you will be directed to the "First Start Wizard":
- Press "Continue" to proceed to the "Select Installation Media" window. In the "Media Source" drop-down menu choose flupix-version.iso. Click "Continue", then "Continue" again on the "Summary" page.
- During starting up, you may receive messages about "Auto capture keyboard" and "mouse pointer integration"; read them if you like, and press "OK".
- Additionally you may encounter a warning message about the amount of available video memory. If so, increase the video memory in the "Display" tab of the Settings window. 64 MB seems sufficient.
The Linux virtual machine will load and you will be presented with a window showing a Linux desktop. You can now launch Flair by clicking the "cauldron" icon on the menu bar at the bottom. Copy files you create in the virtual machine to the shared folder to access them on your physical computer. You can exit by closing the window and selecting either "Save the machine state" (equivalent to sleep on a physical compute) or "Send the shutdown signal" (normal shutdown). Avoid choosing "Power off the machine" as this is equivalent to just pulling the plug from a physical computer! Do not shut down using the "Logout" button of the virtual machine itself, or any changes you have made (e.g. files created or modified) will be lost.
Tested on: Mac OS X 10.6.7