Introduction: Installing a Virtual Machine and Ubuntu on Windows 7

Hey folks, this is Zack with your hot-off-the-press instructable.  I'm doing this so that I can use my awesome laptop for sending commands to BeagleBoard.  At the end are some cool links.

This instructable will guide you in the installation of a virtual machine and the installation of a second operating system, in this case--Ubuntu (Linux).

This is a very basic tutorial and is made for folks who aren't comfortable yet with VM's.  There's a lot of hand-holding...which is what I needed the first time I did this.

First, a very very brief description of a virtual machine.  A virtual machine is a program which simulates a completely independent computer with its own inputs, networking, memory, hard and optical drives, and so forth.  It uses the hardware and parts of the system resources of your current machine.  This is handy if you want to have a single computer for doing all the wonderful things windows is good for AND for doing hardware development or other advanced things that Windows is not good for.

The steps:
1) Install a virtual machine
2) Install an operating system on the virtual machine
3) Execute commands on the operating system on the virtual machine

What you will need:
1) A computer
2) An internet connection
3) A little patience
4) Windows 7 (though this process can be done on most OS's, this tutorial is for W7.  XP, 8 and mac may follow)

This process is totally free.  No bucks required.

Step 1: Installing Virtual Box in Windows 7

Steps to install Virtual Box in Windows 7:

1) Go https://www.virtualbox.org/wiki/Downloads
2) Download Virtual Box (latest version) for Windows hosts x86/amd64
3) "Save As"
4) When done downloading, run the .exe
5) "Run" if Windows pops up a security warning
6) Continue with the installation of VirtualBox with the defaults

This will open VirtualBox at the end of the installation.  Please proceed to step 2.

Step 2: Configuring a New Virtual Machine

After installation, VirtualBox will take you through a step by step to create a new virtual machine.  Create Virtual Machine dialog box will pop up automatically but if not, click on "new" in the top left.

1) Enter the name and operating system.  In this case we're going with Linux and Ubuntu.
2) Memory size is next.  Default is fine for what we're doing.  512MB is plenty.  Too much/too little can be problematic.
3) Create a virtual hard drive.  This is where your files will be stored inside your VM. 
4) Choose VDI unless you have other VMs
5) Doesn't matter.  If you have plenty of HD space on your computer, consider fixed.
6) Choose the amount of storage space. 8GB is fine for most users.  Linux will take up some of this so leave about 5GB for that.
7) There will be a quick pop up about optical disks, ignore this for now.

Done.  The next step will guide you through the installation of Ubuntu.

Step 3: Installing Ubuntu on the Virtual Machine

Now that you have a Virtual Machine, you're mostly there.  If you "start" it at this moment you will be greeted by a horrible failure message.  That's because there isn't any operating system.  We can fix this.

1) Download the latest version of Ubuntu from http://www.ubuntu.com/download/desktop.  It is optional to donate to the cause.  I wholeheartedly recommend it.
2) Open VirtualBox if you haven't already.
3) Click on your newly created VM and go to "settings"
4) From here click the "storage" subcategory.
5) In the storage tree, click on the disk icon that should say "empty."  If it doesn't then click on it anyway.
6) Click on the small disk with the down arrow to the right of the field under "attributes" on the right side of the storage window.
7) Locate the .iso you just downloaded from the Ubuntu website.
8) "Ok" the settings window to return to the main window of VirtualBox.
9) Click "Start"

At this point, we've added the .iso, which is a disk image that will act like a boot cd or dvd once the VM is running.  There will be a ton of pop-up information about the use of mouse, keyboard, networking and other system hardware and resources.  Most are good to read but do not require any action.

From here, the VM will act just like any computer.
1) Go through the installation process of Ubuntu.  It is not necessary to update if you have the latest version.
2) Follow the pictures if you get lost here, but this is practically a victory lap.
3) Shutdown the VM.
4) Open the settings menu on VirtualBox and make sure the IDE storage is "empty" again.  This keeps the VM from wanting to install Ubuntu instead of running it.

Enjoy the Ubuntu goodness.  If you find it running too slowly for your liking try created a new VM with more Memory.  I only use Ubuntu for the terminal function so that's all I need.

Step 4: Outtro

Some links you may be interested in:

https://forums.virtualbox.org/index.php
other help with VM questions

http://www.techshop.ws/
where some amazing things are happening in the makersphere

http://www.psychocats.net/ubuntu/virtualbox
a really great how-to that covers this information in a very similar way

Comments

author
Rigo247 (author)2016-12-22

I followed the previous steps, however I had the following message upon starting the VM and after running the Ubuntu .ios: "This kernel requires an x86-64 CPU, but only detected an i686 CPU. Unable to boot - please use a kernel appropriate for your CPU". Do you have any suggestions on how I can fix this. I selected the Ubuntu (32Bit) option as Operative System through the VM. I am using version 5.1.12 r112440 (Qt5.6.2) of Oracle VM Virtual Box.

author
DanielA507 (author)Rigo2472017-08-04

Same problem. I have Intel 64 and I downloaded Ubuntu 17.04 and 16.04.3 and both for 64 architecture and both of them failed.

author
LiemV (author)Rigo2472017-01-19

So basically I got this error. What you need to do is instead of selecting it as a 32-bit option, you want to select Linux Ubuntu 64-bit. Should work.

author
pixusn (author)Rigo2472017-01-09

I never got this error.

author
pixusn (author)Rigo2472017-01-09

Did you download Ubuntu on 32bit or 64bit? Because if it was on 32bit you have to select in the VM 32bit. If it is a 64bit Ubuntu, create a new virtual machine and select 64bit Ubuntu. If this doesn't work, select Other Linux... (64-bit) and follow the procedure.

author
allencurryatqcom (author)2016-09-12

Made myself crazy installing Mint Cinnamon as dual boot with Win 7. After about 12 hours of fiddling, decided to remove dual boot. Found this, removed the dual boot with BSD*, installed Virtual Machine, reinstalled Mint in VM. Bingo, absolutely no more pain. Wish I'd found this days ago. Nice post.

* http://linuxbsdos.com/2015/10/30/how-to-uninstall-linux-or-delete-linux-partitions-from-windows/

author
suikeroom (author)2016-07-04

sorry - when I try to boot an iso file, be this ubuntu 16.04/i386 (for whatever reason on my i7 Intel the AMD/EMT iso does not work) or being this Lubuntu 14.xx I get a message that I have no PAE. Setting the forcepae option in the startup menu of Ubuntu does not solve this -- is there something in the virtualbox which prevents this?

any workable suggestions how to solve this - otherwise all this here is useless.

author
OgbuM (author)suikeroom2016-08-18

1.Shutdown your system, 2.on it back and start pressing ESC keykey b4 it boots,3. Choose bios enable virtual technology 4. Now run virtual box when u choose Linux d system will automatically choose 32bit for u scroll down and choose 64bit(no matter d type of system u r using),. 4. Create goto settings click on d CD empty then d small CD at ur right hand side choose .ISO file OK then start daz all

author
ToorS1 (author)2016-08-05

I've installed windows 7 on my laptop after buying license from: http://cheaproduct.com

I want to activate it to get free upgrade from windows 7 professional to windows 10 home.

I'm now confused, How to activate and upgrade to windows 10.

Please mention within details.

author
BRAINDISIS (author)2016-06-18

Thank you for the tutorial, but I'm stuck here:

5) In the storage tree, click on the disk icon that should say "empty." If it doesn't then click on it anyway.
6) Click on the small disk with the down arrow to the right of the field under "attributes" on the right side of the storage window.
7) Locate the .iso you just downloaded from the Ubuntu website.

In this last step, first of all, clicking the icon will bring a menu but you don't specify what to click in the menu. Sorry for this, but it's not clear for somebody who does this for the first time which option is right. The Linux VM disk image is already there, and if I select the Ubuntu ISO it gives me an error:

Failed to open the disk image file C:\Users\Outsider\Desktop\ubuntu-16.04-desktop-amd64.iso.


The medium 'C:\Users\Outsider\Desktop\ubuntu-16.04-desktop-amd64.iso' can't be used as the requested device type.

Result Code: E_FAIL (0x80004005)Component: MediumWrapInterface: IMedium {4afe423b-43e0-e9d0-82e8-ceb307940dda}Callee: IVirtualBox {0169423f-46b4-cde9-91af-1e9d5b6cd945}Callee RC: VBOX_E_OBJECT_NOT_FOUND (0x80BB0001)

Now the iso is added to that menu but it doesn't start anyway.

I also tried to boot up from the iso as it's seen by VirtualBox already, but it doesn't work either.

author
spkart (author)2016-06-14

Simple and Awesome tutorial, Thank you

author
NatashaB7 made it! (author)2016-05-31

Great tutorial, thank you. This was my first instructable project :)

ubuntuVirtualBox.jpg
author
sbhekie (author)2016-03-29

Hi Guys, I have already installed linux on my virtual box box, it seems as if it is installed correctly, however if Am trying to switch on the machine, it requires me to enter/type in my password, I did type the correct password that I created but if I click on login then it takes me back to the login page again prompting me to type the password again. I have trying this for several times, I have removed the machine and installed it again still am encountering the same error. would you please asssit?

author
voodos (author)2016-03-16

Right on!! This worked great! you have no idea how many times I tried to load Linux debian on my windows machine and make dual boot. Uggg not pretty at all. This was a great option and it work great. Thank you

author
TaylorB42 (author)2016-03-09

Activate windows click here: www.acyberkey.com

you can find the keys you want in a low price that you have never imagined.

author
TaylorB42 (author)2016-03-09

Activate windows click here: www.acyberkey.com

you can find the keys you want in a low price that you have never imagined.

author
TewodrosH (author)2016-01-27

10x men its great tutorial its understood and easy thanks again !!!

author
Wgqra27J (author)2016-01-19

There are many options of windows 7 product keys for windows 7 in: www.cdekey.com, hope can do you guys a help.

author
BlueLines_ made it! (author)2015-12-14

Thank you very much! :) Great tutorial! Worked perfectly in Win 7 (32bits)

ScreenShot019.jpgScreenShot020.jpg
author
RezartaB (author)2015-11-02

Thank you!

author
hbaya (author)2015-10-12

OK. I completed all the steps successfully. Now what. How do I access the Ubuntu Linux system I have installed? I want to go on to the next steps for the LAMP install but I do not know what to do next.?

author
SayantiB (author)2015-10-07

I am trying to install Ubuntu on Windows 7 ( both 32 bit), but I am getting an error while starting the Guest OS.

Last line of the log said

'C:\Windows\system32\PSAPI.DLL'

13ec.d74: supR3HardNtChildWaitFor[2]: Quitting: ExitCode=0x1 (rcNtWait=0x0, rcNt1=0x0, rcNt2=0x103, rcNt3=0x103, 11044 ms, the end);

15a4.8c4: supR3HardNtChildWaitFor[1]: Quitting: ExitCode=0x1 (rcNtWait=0x0, rcNt1=0x0, rcNt2=0x103, rcNt3=0x103, 11729 ms, the end);

Please help

author
addsdfdf (author)2015-10-07

I'm positive this wasn't helpful

author
John MichaelR (author)2015-07-14

author
ReyK2 (author)2015-07-05

Thank you for your sharing, it is great, i would like to share my experience with you too, i got a key in a web, it is genuine and good-working, especially it only cost me a little money, recommended you, wish you good luck. www.aakeys.com

author
samarth1201 (author)2015-06-14

thanks a lot it gave me chance to explore the things in unix i really want to thank you

author
samarth1201 (author)2015-06-14

author
LitalS (author)2015-06-07

thanks a lot!!

author
leah.rosenbaum.5 (author)2015-05-05

THANK YOU SO MUCH!! This worked perfectly the first time on my Win7 32-bit PC! Steps are very clear and screenshots are perfect. This is exactly what I needed and a huge help!

author
mukundav (author)2015-04-07

Thank you so much.

author
anamika.sighanya.92 (author)2015-01-17

hey.. i installed vb from above link. then i installed ubuntu (32 bit) for windows 7. when i changed the settings and attached the file ubuntu iso to it.. and started the vb ,instead of coming ubuntu as shown in the above images, i encountered the problem as this:

please resolve my problem asap.. i urgently need ubuntu.

thank you

Doc1.docx
author

hey i am not able to download the doc but if you can upload the images again might be able to help

author
ChristopherW9 (author)2015-04-04

author
Samiraj (author)2015-01-17

I'm facing a problem while attaching the image file :( it shows this msg :- Failed to open the optical disk file C:\Users\l\Downloads\ubuntu-14.04.1-desktop-i386.iso.


Could not get the storage format of the medium 'C:\Users\l\Downloads\ubuntu-14.04.1-desktop-i386.iso' (VERR_NOT_SUPPORTED).

Result Code: VBOX_E_IPRT_ERROR (0x80BB0005)Component: MediumInterface: IMedium {05f2bbb6-a3a6-4fb9-9b49-6d0dda7142ac}Callee: IVirtualBox {fafa4e17-1ee2-4905-a10e-fe7c18bf5554}Callee RC: VBOX_E_OBJECT_NOT_FOUND (0x80BB0001)

kindly help me in this regard !!!

author
IllMindOfKrizzl (author)Samiraj2015-01-22

I'm having this same problem. Let me know if you are able to solve it, and I will let the same with you. Thanks.

author
Samiraj (author)IllMindOfKrizzl2015-01-23

sure !

author
anamika.sighanya.92 (author)2015-01-17

hey.. i installed vb from above link. then i installed ubuntu (32 bit) for windows 7. when i changed the settings and attached the file ubuntu iso to it.. and started the vb ,instead of coming ubuntu as shown in the above images, i encountered the problem as this:

please resolve my problem asap.. i urgently need ubuntu.

thank you

Doc1.docx
author
anamika.sighanya.92 (author)2015-01-17

hey.. i installed vb from above link. then i installed ubuntu (32 bit) for windows 7. when i changed the settings and attached the file ubuntu iso to it.. and started the vb ,instead of coming ubuntu as shown in the above images, i encountered the problem as this:

please resolve my problem asap.. i urgently need ubuntu.

thank you

Doc1.docx
author
MistressJada (author)2014-12-31

Thank you, this will help me learn server management.

author
JamesL12 (author)2014-11-04

Thanks :D

author
vinothCkumar (author)2014-10-09

6th step issue is resolved by restarting the VB

author
vinothCkumar (author)2014-10-09

6th steps is disabled for me. Not able to click on the discdrive icon under the attributes. Please suggest

author
prabhatk (author)2014-09-23

To set screen size on Ubuntu ; sudo apt-get install virtualbox-guest-dkms

http://askubuntu.com/questions/452108/cannot-change-screen-size-from-640x480-after-14-04-installation-on-virtualbox-os