VMESA Virtual Machine on Virtualbox
This VM was designed for first time users who run Windows as a native OS, as well as OSX and Linux users who are unfamiliar with basic OS concepts. It exists specifically as an alternative to MESA docker. Docker does not necessarily play well with virtualbox installations and may negatively impact your existing VM’s. You should choose one option or the other, but not both, and make sure you clean up after removing one before trying the other.
Install virtual box:
Download the installer for your system here: https://www.virtualbox.org/wiki/Downloads
Install the .dmg file the usual way
Install the .exe the usual way
https://www.virtualbox.org/wiki/Linux_Downloads and choose the package appropriate for your system (or closest to) or install via your system’s package manager
Install virtual box extensions pack:
https://www.virtualbox.org/wiki/Downloads (same page as the above links) Once you have virtualbox installed, simply double click on this file to add it to your installation.
Add the VMESA virtual machine to your virtualbox:
In the virtualbox main screen from the main menu choose Machine>Add and then navigate to the VMESA.vbox file (or simply double-click the .vbox file). That’s it!
To use VMESA:
In the virtualbox main screen highlight the VMESA VM and double-click or select “start” from the main menu.
This is debian with the LXDE desktop (the leanest of the gui desktops). This VM has a 50gb, dynamically-allocated hdd, which means the drive size will increase as you need it- up to 50gb. If you enable the shared drive settings below you should be able to move your MESA files after each session and keep the virtual drive small. If you find yourself using it so much that you fill up the virtual drive, then it may be time to install linux for real!
MESA 10398 is installed and the environment variables are already set. The mesa folder is in the home folder. To test your new installation open a terminal (or press F1) and navigate to the ~/work (/home/vmesa/work) folder, and type ./rn >enter. The MESA sample model should run and you should have pgplot visualization windows open up.
For a dropdown terminal press F1.
The default notepad is leafpad, located on the desktop. Feel free to install another with apt.
It is important to change these settings if you want any reasonable speed from your VMESA install:
To add more memory to the VM (up to 90% of the actual host system value):
(With the VM off) In the virtualbox main screen highlight the VMESA VM and select System>Motherboard tab and increase the memory using the slider bar. A good rule of thumb is 1/2-3/4 the total host system memory, assuming you will not be doing much else on the host machine during use.
To add additional processors/threads (up to the actual system value):
(With the VM off) In the virtualbox main screen highlight the VMESA VM and select System>Processor tab and adjust the number of processors with the slider bar. Note that you probably don’t want to use all of your processors, a good rule of thumb is threads divided by 2, or the total number of physical cores***. Then, inside the VMESA VM use the leafpad note pad to open the file .bashrc in the home folder (~/ or /home/vmesa, it’s a hidden file) edit the line: export OMP_NUM_THREADS=1 and change the number of threads to equal the number of processors you chose above with the slider bar -1 (minus one, otherwise you won’t be able to do *anything* else).
*** To find out the number of physical cores on your machine:
OSX: Apple symbol (upper left corner)>About this Mac>System Report. Or from the command line type: getconf _NPROCESSORS_ONLNNote that on all recent intel processors the number of threads is the number of physical cores x 2.
Windows 7/10: Hit Windows+R to open the run box. Type “msinfo32” into the open field and then hit enter. This should open the system information panel, which will include information about your processor.
ubuntu: in the main app menu type or find the icon for “details”. The information will be listed in the processor (eg: Intel® Core™ i7-3632QM CPU @ 2.20GHz × 8) where 8 is the number of threads. Note that on all recent intel processors the number of threads is the number of physical cores x 2.
Benchmarks: on 4 cores, 16gb on a linux local host: 126.74 seconds on 4 cores, 16gb on VMESA: 121.21 seconds
To share a hard drive (copy files to your host machine from within the client VM):
(With the VM off) In the virtualbox main screen highlight the VMESA VM and select Shared Folders. There should be a graphic of a folder with a plus sign, select this and a menu should open with a list of folders. Folder Path is the folder on the host machine that you want to share, folder name is the name the folder will appear under in the file manager of the VMESA VM.
To share a usb drive with the VM:
(With the VM off) Make sure the usb device is plugged into the machine. In the virtualbox main screen highlight the VMESA VM and select USB. There should be a graphic of a USB device with a plus sign, select this and a menu should open with a list of devices. Choose yours. This should be done will the VM is OFF.