Installing Nmag using the VMware PlayerContents
IntroductionVMware is a company that provides a software that emulates a virtual computer. Let's assume for simplicity that we have an existing machine with MS Windows. This is called the host machine. One needs to install the vmware software (see Installing the VMware Player) on this host machine. Once the software is installed, it can be started like any other application. Once this virtual machine software is running, it will simulate a PC environment so that one can have a second (virtual) machine running in that window. The 'virtual' hard drive of that virtual machine is realised through a (few) big files gathered in a particular directory on the hard drive of the (Windows, say,) host machine. It is of course required to provide an operating system for the virtual machine, which could be, for example, Linux. One would then have the normal MS Windows Operating system running on the host machine, and a Linux operating system in the VMware window. (In fact, the window can be blown up to appear as a full-screen, by pressing CTRL+ALT+Return, or clicking of the maximise icon of the window.) The performance penalty of running any software in the virtual machine (rather than on a real machine of similar specification) is usually less than 10%. In other words, a simulation that takes 10 minutes in the virtual machine, is not going to be faster than 9 minutes if run natively. However, 3d graphics may not be hardware accelerated in the virtual machine; and the virtual machine will only see a part of the physical RAM of the host machine (this can be adjusted in the vmware settings when the virtual machine is shut down). The nice thing about having this virtual machine is that one can continue to use one's email, word processing, web browsing and all other applications in one's usual operating system (Windows in our example), and simultaneously have a simulation environment for micromagnetic simulations (which provides all the necessary pre and postprocessing tools, based on the Linux operating system here). In terms of performance, the host machine should have at least 2 GB of RAM (the more the better). The virtual machine is set to use 1.5 GB RAM and 1 processor core. It currently needs about 7GB of disk space on the host machine. Installing the VMware PlayerVMware provides a multitude of different products that allow different degrees of virtualisation. Some of them are free and some have to be paid for. We try to point to exactly the right product here, and to keep things simple although VMWare is frequently changing the names of their products. If your host runs MS Windows or Linux, then you can download the free VMware Player:
If your computer is an IntelMac, there is unfortunately no version of the free VMware Player for your machine. However, if you happen to own VMware's Fusion product (or are happy to pay for it), then install VMware fusion and use this as (a more powerful) VMware player. If you computer is a PowerPC Mac, then you cannot use the Virtual Machine method. At this stage, we have installed the VMware Player. Next, we need to obtain the 'virtual machine' that we want to execute. Downloading and starting the Nmag virtual machine
When you do this the first time, the VMware Player may warn that the machine is already in use. If so, select Take ownership. It may ask you whether this virtual machine has been moved or copied. The right answer is copied. Once you have done this, the virtual machine will boot. When the kernel boot menu appears (the first line starts "GNU GRUB"), do nothing, or press return. Wait until the graphical login turns up. Using the Nmag virtual machineThe Nmag virtual machine is an Ubuntu64Bit 11.10 installation which should provide all the software required to run micromagnetic simulations with Nmag. After booting, a login screen appears. There is only one user registered. The username is nmag and the password is nmag. (The root account has the same password; should you ever need it.) At this point, you have a complete environment to start simulations, and the guided tour in the manual is a good starting point to explore nmag:
If you want to see the examples that are discussed in the manual directly, you can go to /home/nmag/Desktop/nmag-examples-drafts. Each subdirectory in there corresponds to one example. Note that there are sometimes additional files in the directory that are used for automatic creation of plots in the manual, and for automatic testing (you may want to ignore those). Some file may be out of date, but overall this is a useful resource to run some existing scripts quickly. Often, there is a makefile or Makefile in a example directory, which summarises the commands that can be run to create a mesh, convert it, important it, run a simulation etc. First steps
Using VMware playerThe help function of the VMware Player provides a useful summary of how to use it. Note that you can switch to full-screen mode when pressing CTRL+ALT+RETURN, and that you return from full-screen mode by either pressing CTRL+ALT, or moving the mouse to the top of the screen (to get the VMPlayer menu). Frequently Asked Questions
How can I exchange data between the virtual machine and the host?If you want to share data with your host, then
How can I change the keyboard in the Nmag virtual machine?Open a terminal (CTRL+ALT+T), then type setxkbmap followed by the right code for the country. Typcial codes are de for German, gb for Great Britain, dvorak for the Dvorak layout and us for an american keyboard layout. Alternatively, click on the System Settings icon on the left, then keyboard layout and then + to add a new layout. Can I also use other VMware products with the Nmag Virtual machine?Yes, as far as we know. For example, if you have the VMware Work station or VMware Server, then these can run the Nmag virtual machine as well. (It may, in fact, be easier to exchange data between the host and the virtual machine with these more powerful products, as you can add more shared locations.) Can I use other virtual machine products, such as VirtualBox?Yes, although you will not be able to use the image we provide for download. This will only work with VMWare. We use VMWare for historical reasons (it has been around for some time), but we are not aware of any problems with other virtual machine tools. If you go this way, we suggest Ubuntu Linux as the client operating system as Nmag installs most easily in this. I know Ubuntu or Debian Linux -- can I modify this system?Of course. Once you become root, you can use aptitude, apt-get and all other tools to configure your debian system. This is, after all, a normal installation (even though it is executed within a virtual machine). How can I learn more about Linux or this distribution?Follow the Ubuntu tutorials. Additional softwareWe have installed additional software on the virtual machine, including
The relevant ubuntu packages are gmsh netgen mayavi2 emacs grace gnuplot python-scipy python-matplotlib python-sympy nano vim |