Friday, May 27, 2011

Step by Step Instructions for building a Linux VM

As a continuation of a previous post, I wanted to give some detailed instructions on how to get a VM up and running.  While i'm at it, if you haven't tried Ubuntu yet, this will be a good way to get you immersed into it.
These instructions assume you've got vmware player already installed on your computer.

First thing you need to do is get a copy of the OS installation iso file.  An iso file is simply a file like a word document or excel spreadsheet.  The difference is that an iso contains the details of an entire CD or DVD.  You could use the iso to actually burn a copy of the cd.  Or you could use something like Daemon tools to virtually insert the CD into a virtual drive (another post another time).  Go to http://www.ubuntu.com/desktop/get-ubuntu/download to get a copy of Ubuntu.  It's the easiest version of Linux, especially if you're used to Windows.

Once you've got the ISO file downloaded, go make a 'Virtual Machines' folder somewhere on your hard drive.  I put this in my user profile directory alongside my documents, music, and video folders.  Put the ISO file in that folder.

Launch VMware player and click 'Create a New Virtual Machine'.  A wizard will be launched with three options.  If you had a copy of ubuntu on disc, you could just insert it into your drive and pick the first option.  But, VMware can just use the iso file we downloaded.  So, pick the second option and browse out to the iso file in the 'virtual machines' directory.

It should say something like "VMware will use easy install".  Click Next.

You're then prompted for your name, username, and password.  VMware's going to setup your account for you, so go ahead and put in the information.

The next step will prompt you for a VM name and location.  Pick a name.  Then browse out to the 'Virtual Machines' folder.  VMware should append the vm name to the location.

You'll next be prompted for hard drive size.  This is up to you.  You can allocate as much hard drive space as your computer's hard drive has free.  Unless you're going to use this for your primary desktop, you will never need more than 20GB.

The next screen will give you a summary of what you just told VMware to build.  Click Customize Hardware.

If you want to give your VM more memory, use the slider.

You probably don't need a floppy drive so you can remove that.

Make sure the network adapter is set to bridged.  This makes networking transparent.  As far as the VM (and everything else on your network) is concerned, your VM will be plugged into the same network as your computer.

You could also remove the sound card and/or printer if you won't need them.

Hit ok then finish.  You'll see the VM powering on and Ubuntu will begin to install.  At this point you're essentially done.  Instead of you having to setup Linux, VMware is going to do that for you.  It'll setup a user account for you, install the VMware tools (under the hood stuff, but you'd notice if they weren't there).
Once easy install is done, your desktop is ready.  You can start customizing it however you want.  Just be warned, if you hit the X to close out the VMware player window, the VM will be suspended.  Obviously during the install this will probably hose everything.

Also, if you want to connect USB devices to your VM, plug them into your pc.  Then look at the status bar in VMware player.  You'll see an icon for each device.  Right click the device you want to connect and hit connect.  Just a warning, a device cannot be connected to both your computer and the VM at the same time.

No comments:

Post a Comment