Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 23 Next »

This page describes setting up a local connection to an already-created Linux VM. 

A virtual machine ("VM") is software that runs an operating system within a computer. For MRI analyses, we run Linux software on a windows computer. We install the virtual machine software (VMware), and that software runs Linux. The shorthand is "LinuxVM."

These pages are principally designed for the system administrator who will be creating the LinuxVM. If you are a user, you would typically start off with a large set of files that compose the LinuxVM.

Technical Note: For text files to be used in Linux, open as "t" to avoid the DOS double-charater CR+LF at the end of each line (CR = carriage return /r, LF = line feed /n). (http://www.mathworks.com/support/solutions/en/data/1-15HVX/index.html?product=SL&solution=1-15HVX link]
e.g., id = fopen(newfile.bat,'wt+');
The Linux command dos2unix will remove CR characters.

See bottom of page for updating.

Setting up Windows with LinuxVM

VMware

#Get and install "VMware Player" (free)#Enable "Virtualization Technology"#In the BIOS, you must make sure the option to run "Intel Vistualization Technology" (or similar in AMD) is enabled; here are some instructions:www.microsoft.com/windows/virtual-pc/support/configure-bios.aspx Microsoft Virtual PC pageYou will also need a 64-bit machine running 64-bit Windows.

Virtual Machine

Get the copy of the virtual machine (VM) you will use (or create your own using "VMware Workstation"). You will need the MRI software (FSL and FreeSurfer), the account name and password, and sshd service. There is a copy ("clone") on the Share drive:
LinuxCloneVM

Copy this to a local folder; I suggest C:\LinuxVM. You will need ~300GB. 

Download and install VMware Player (free).

Open VMware Player, and open the saved VM; select the copy option.

To test:
Start ("Play") the virtual machine
In the Centos 6+ version (since October 2013), the password is "data" (there is only one user, which you click). 

Note: since the machine is host-only, having the password visible does not matter since the machine cannot "see" or be seen by the internet.

You'll usually need to start a terminal (see black rectangle icon on top toolbar).
Type fsl to get FSL (Linux is case sensitive, unlike Windows)

Shared folder

Choose a shared folder; I use one on the network, but something simple is good (e.g., "V:\LinuxShare\"). Avoid spaces in any Linux path.

Edit the VM settings, choose the Options tab, Shared Folders
Always enabled
"Add..." the folder

This will now show up in Linux (at least in CentOS) under /mnt/hgfs.

In Windows, change the folder permissions so that all users can modify, read and write.

Troubleshooting high disk usage

In 2015, the LinuxVM's started going crazy accessing the disk constantly, and killing the whole system. Here are some changes suggested:

Open the .vmx (configuration) file for the affected virtual machine while it is powered off. Add the following lines to the file using a text editor. For more information, see  Editing the .vmx file of a VMware Workstation and VMware Player virtual machine (2057902)
MemTrimRate = "0"
mainMem.useNamedFile = "FALSE"
sched.mem.pshare.enable = "FALSE"
prefvmx.useRecommendedLockedMemSize = "TRUE"

Updating

To update:

  1. Start the Virtual Network Editor, find or create a new network adapter that is NAT.
  2. Change the VM's network settings to use this adapter (under Custom)
  3. Start/restart the VM
  4. Under System, Administration, Network, "Edit" the "Wired connection 1", set to DHCP instead of static address
  5. Set the DNS servers: 10.4.14.10, 10.6.14.10 (as of 2016-03)
  6. Apply
  7. Under System, Administration, Server Settings, Services, go to Network and restart
  8. Test internet connect with Firefox (Applications => Internet)
  9. To Add or Remove, go to Applications, Add/Remove Software
  10. To update Centos:
    1. su
    2. yum clean all
    3. yum update, then reboot
  11. Alternatively, go to Applications, System Tools, Software Updater (but this does not update the version, say 6.6 to 6.7)
  12. Change back to static IP (System, Administration, Network, "Edit" the Wired connection 1 device)
  13. Change the VM settings back to the Host-Only virtiaul network adapter, restart

Note: you can do a version check with 

cat /etc/redhat-release

These pages describe how to create a new Linux VM.

  • No labels

0 Comments

You are not logged in. Any changes you make will be marked as anonymous. You may want to Log In if you already have an account.