Thursday, February 26, 2015

Setting up a virtual machine to run a linux operating system

I need linux so I can start learning how to use bgc, a program for analyzing genomic clines.  As I don't have any spare computers around to install linux on (and it seemed easier than dual-booting one of my main working computers), I decided to try a virtual machine.

First, download Oracle's free VirtualBox and your operating system of choice.  From the many flavors of linux, I started with Ubuntu as it seemed least intimidating and likely to do be sufficient for my purpose of running the one program.

Install VirtualBox first.  Once you've set up your first machine (I let it do all the default settings), copy the Ubuntu .iso file into your VM's folder.  Mine was stored at C:/Users/Username/VirtualBox VMs/yourvirtualmachinesname/ and I placed the .iso file in that folder.

Run your VM.  It'll ask you from what optical drive you want to boot.  Set the CD/DVD optical drive to the .iso file.  If you get a fatal boot error because you didn't do this the first time, just set the drive, then restart, and it should boot as if you had an operating system disk in a real computer.  It took a while to get to the install screen.  I let it run in the background and worked on other stuff.  Same for the Install Ubuntu wizard.  Periodically check and answer its questions.  It took a while (started 1pm, finished around 4pm), just like a real operating system install.

I found Ubuntu ran pretty slow in the VM on my aging tiny laptop, and XUbuntu was suggested to me as a less graphics-intensive alternative.  That's what I'm using now (just create a new VM in VirtualBox and follow the same steps) and that install also took less time (maybe an hour or two with me ignoring it as I did other tasks).  Stay tuned as I learn how to install some prerequisites for bgc (GNU Scientific Library and HDF5).

No comments:

Post a Comment

Comments and suggestions welcome.