[STICKY] How to install and setup VirtualBox

[STICKY] How to install and setup VirtualBox

Postby madvinegar » Wed Jul 04, 2012 11:18 am

I decided to write this quick guide for various reasons, including:

1) To let people know that there is an alternative to dual boot (I really dislike dual boots).
2) To let people know that there is a very nice way to keep fully using their windows programs (like MS Office) without having to settle with “wine” (which most of the times does not satisfy our needs).
3) To convince my good friend Wolfman to try out virtual box (as he has never used it before). :D


The first thing I would like to say is that it is better to install and use VirtualBox in machines (PCs/Laptops) that have enough RAM. The reason for that is because you assign the amount of ram you want to the OS to be installed (called as Guest), but this ram is deprived by your already installed OS (Called as Host) – ofcourse only for as long as you use your guest OS.

In my below guide I will explain how to install win7 using virtual box in linux.

Step 1.
Download and install Oracle Virtual box.

Go here https://www.virtualbox.org/wiki/Downloads and download the latest release for Linux Hosts.
It is a .deb file so as soon as it is downloaded you double-click it, the software center opens and you click on install.

Step 2.
Create the file(s) for the installation of the new OS.

Open your oracle virtual box program and click on “new”.
Then follow the series of questions of your choise so as to setup the file that will host the new OS.
My specific choices are:
- Choose a VM name: i.e. Win7
- Choose operating system: i.e. Windows 7, 32 bit.
- Choose the amount of memory to be occupied by host: i.e. 1024mb
- Virtual hard disk: Create new. Type: “vdi”
- I prefer to set it as a fixed-size file (not dynamically allocated). Fixed size is faster.
- Choose how much space this fixed size file will be using. i.e. 16GB.

After all the above click on “create” and wait till the file is created.

Step 3.
Install your host OS.

After the fixed-size file is created, open virtual box and you will see that there is an entry in the list called “win7”. Click on “start” right above it.
You will be asked which media should be read for the installation of the Host OS. You either choose DVD (if you have win7 installation files on DVD) in which case you select the DVD drive of your machine - or ISO (if you have it in ISO), in which case you navigate to the file where the iso is.
If all has been done properly, your host OS installation will commence and you will follow the instructions to install it like it was your main os.

Step 4.
Extras.

This is a very important step. There are some things that you need to do to get the full power of virtual box, i.e. all drivers to be installed, USB ports to be recognized etc.
1) Give rights to your vbox user.
To do that you must install “users & groups”. Open terminal and write
Code: Select all
sudo apt-get install gnome-system-tools

Then open users&groups, click on manage, scroll down to find “vboxusers”, double-click it and in the window that will open put a tick next to your username. Save and exit.
2) Install guest additions.
Open vbox, go to menu>devices and choose the last option which says “guest additions”. Let it be installed.
3) Install the extension pack
Go here: https://www.virtualbox.org/wiki/Downloads and download the VM VirtualBox Extension Pack. Make sure that you download the correct version.
After it is downloaded, go to your downloads file, double-click it and let it be installed.
4)Go to the settings of Vbox, from the list on the left select “USB” and tick both boxes (enable USB controller + enable USB2.0 ehci controller). Save and exit.

Step 5.
How to exchange files between guest and host.

Open Vbox, go to menu>devices and select “shared folders”. In the new window select “add” and navigate to the file that you want to be shared (i.e. your “Documents” file). From the boxes below also select and tick “make permanent”. Save and exit.
Then load your host OS (i.e. windows). When it is loaded go to “windows network” (this can be located if you open the win-nautilus in the list on the left side) and expand it. Among the files listed you will see a file called something like “\\vboxshared\Documents”. Click on it and you will see inside the contents of your Linux Document folder.
You can use this file as a portal to exchange files from guest to host (or the other way around), or you can add as many shared folders as you like.

Note1:
You will terminate your guest OS as you normally do, i.e. by going to start>shutdown. Do not just close vbox.

Note2:
Your guest OS network should work out of the box as it gets internet from the Host OS. If you exprience any problems you can go to the vbox settings>network and try alternative options like "wireless" etc. to see what works best.

Note3:
Vbox is kernel dependent. This means that you may experience a problem in opening vbox when your kernel is updated. More specifically you may get an error message titled as:
Kernel driver not installed (rc=-1908)
The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv. Please reinstall the kernel module by executing
'/etc/init.d/vboxdrv setup'
as root. Users of Ubuntu, Fedora or Mandriva should install the DKMS package first. This package keeps track of Linux kernel changes and recompiles the vboxdrv kernel module if necessary.


Not to worry, open terminal and write:
Code: Select all
sudo apt-get install dkms
sudo /etc/init.d/vboxdrv setup


For your info, I have also installed MS office and everything works just fine. Vbox serves exactly my needs as I was needing windows just for 1-2 programs like MS publisher, for which there is no alternative in Linux. I have also installed and played 1-2 windows games, but not something too powerful as the ram I have alocated to the host OS is just 1GB.
Hope the above guide is helpful.
Zorin-OS 6 Ultimate 32bit - Kernel 3.2.0-29
Genuine Intel CPU T2250 1.73GHz ‖ RAM 3086 MiB ‖ Hewlett-Packard G5040ea
Intel Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller 1280x800
Realtek RTL-8139/8139C/8139C
Broadcom BCM4311 802.11b/g
User avatar
madvinegar
 
Posts: 2410
Joined: Wed Oct 19, 2011 12:18 pm

Re: [STICKY] How to install and setup VirtualBox

Postby Wolfman » Wed Jul 04, 2012 8:22 pm

Quote:

"3) To convince my good friend Wolfman to try out virtual box (as he has never used it before)."

And he never will!! :D :D :D :D :D

Regards Wolfman :D
Regards Wolfman :D

Kindness is something that the blind can see and the deaf can hear :)

Preparation and planning prevent poor performance! :)

Free Ubuntu User Manual: https://ubuntu-manual.org/
User avatar
Wolfman
 
Posts: 6264
Joined: Sat Jul 02, 2011 1:03 pm

Re: [STICKY] How to install and setup VirtualBox

Postby madvinegar » Wed Aug 22, 2012 9:36 pm

An update to the above guide.
In case you need to update to the new version of the Oracle Virtual Box (4.1.20), and you get a message that you first need to remove the previous version (presently is 4.1.18), do the following:

Open terminal and write:
Code: Select all
sudo apt-get remove virtualbox* --purge


Then you visit again the website of Oracle and you download the .deb file of latest version. https://www.virtualbox.org/wiki/Downloads

After you install and open the new version, you will be asked to download and install also the new version of the extension pack.
Finally, after you load the guest OS, install the new version of guest additions.
Zorin-OS 6 Ultimate 32bit - Kernel 3.2.0-29
Genuine Intel CPU T2250 1.73GHz ‖ RAM 3086 MiB ‖ Hewlett-Packard G5040ea
Intel Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller 1280x800
Realtek RTL-8139/8139C/8139C
Broadcom BCM4311 802.11b/g
User avatar
madvinegar
 
Posts: 2410
Joined: Wed Oct 19, 2011 12:18 pm

Re: [STICKY] How to install and setup VirtualBox

Postby Uzi » Thu Jul 18, 2013 7:30 am

How complicated is Virtualbox :o

Got it set up with XP and got it to access my hard drives but I cannot get it to connect to the internet. I followed the instructions above. I have Guest Additions and I downloaded the Extension pack. I have my name ticked in vboxusers & I have the USB ticked but I have nothing - zero - nada in my Network connections. I have set Network to NAT and tried Bridged Adapter. Nothing.

Any ideas? If I cant get this set up then Virtualbox is a non starter. :(
User avatar
Uzi
 
Posts: 166
Joined: Wed Jun 05, 2013 12:22 pm

Re: [STICKY] How to install and setup VirtualBox

Postby madvinegar » Thu Jul 18, 2013 7:36 am

All I can say is that you must try the options in the network settings of VB.
In a laptop I have, I had to set it to bridged adapter and > "wireless" in order to establish connection(!)
Zorin-OS 6 Ultimate 32bit - Kernel 3.2.0-29
Genuine Intel CPU T2250 1.73GHz ‖ RAM 3086 MiB ‖ Hewlett-Packard G5040ea
Intel Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller 1280x800
Realtek RTL-8139/8139C/8139C
Broadcom BCM4311 802.11b/g
User avatar
madvinegar
 
Posts: 2410
Joined: Wed Oct 19, 2011 12:18 pm

Re: [STICKY] How to install and setup VirtualBox

Postby Wolfman » Thu Jul 18, 2013 7:37 am

Uzi wrote:How complicated is Virtualbox :o

Got it set up with XP and got it to access my hard drives but I cannot get it to connect to the internet. I followed the instructions above. I have Guest Additions and I downloaded the Extension pack. I have my name ticked in vboxusers & I have the USB ticked but I have nothing - zero - nada in my Network connections. I have set Network to NAT and tried Bridged Adapter. Nothing.

Any ideas? If I cant get this set up then Virtualbox is a non starter. :(

Hi Uzi,

I found these:

https://help.ubuntu.com/community/VirtualBox/Networking

For WiFi:

http://savvyadmin.com/virtualbox-wirele ... with-dhcp/

Regards Wolfman :D
Regards Wolfman :D

Kindness is something that the blind can see and the deaf can hear :)

Preparation and planning prevent poor performance! :)

Free Ubuntu User Manual: https://ubuntu-manual.org/
User avatar
Wolfman
 
Posts: 6264
Joined: Sat Jul 02, 2011 1:03 pm

Re: [STICKY] How to install and setup VirtualBox

Postby madvinegar » Thu Jul 18, 2013 7:52 am

It is very difficult to make your guest OS use the internal wireless card of your host OS. For this kind of work you usually have to buy a USB wireless card.

The usual way of getting internet on your Guest OS is via NAT from the Host OS (and it is recognised as ethernet connection from the guest os).
Zorin-OS 6 Ultimate 32bit - Kernel 3.2.0-29
Genuine Intel CPU T2250 1.73GHz ‖ RAM 3086 MiB ‖ Hewlett-Packard G5040ea
Intel Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller 1280x800
Realtek RTL-8139/8139C/8139C
Broadcom BCM4311 802.11b/g
User avatar
madvinegar
 
Posts: 2410
Joined: Wed Oct 19, 2011 12:18 pm

Re: [STICKY] How to install and setup VirtualBox

Postby Uzi » Thu Jul 18, 2013 8:32 am

madvinegar wrote:It is very difficult to make your guest OS use the internal wireless card of your host OS. For this kind of work you usually have to buy a USB wireless card.

The usual way of getting internet on your Guest OS is via NAT from the Host OS (and it is recognised as ethernet connection from the guest os).


I am not using wireless. I have a broadband cable connection. All the YouTube vids show it is an easy set up but nothing I do works. There is no connection showing in Network Connections. Cant believe it is this hard. Surely it is a basic need for any use of Virtualbox.

Looks like a non starter for me :evil:
User avatar
Uzi
 
Posts: 166
Joined: Wed Jun 05, 2013 12:22 pm

Re: [STICKY] How to install and setup VirtualBox

Postby madvinegar » Thu Jul 18, 2013 9:45 am

My last reply was mainly reffering to the 2nd link that WM provided.

Have you tried as I suggested bridged adapter and > "wireless" ?


Edit: Uzi, I think for XP you may need to install a driver.
So, leave the default VB network settings (NAT etc), and follow the instructions of this link: http://www.alvinpoh.com/how-to-solve-th ... irtualbox/
Zorin-OS 6 Ultimate 32bit - Kernel 3.2.0-29
Genuine Intel CPU T2250 1.73GHz ‖ RAM 3086 MiB ‖ Hewlett-Packard G5040ea
Intel Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller 1280x800
Realtek RTL-8139/8139C/8139C
Broadcom BCM4311 802.11b/g
User avatar
madvinegar
 
Posts: 2410
Joined: Wed Oct 19, 2011 12:18 pm

Re: [STICKY] How to install and setup VirtualBox

Postby Uzi » Thu Jul 18, 2013 11:41 am

Guys,

As with Zorin install issues, I went back & installed XP again. Now I am not sure what happened, whether it was because of having the add ons installed 1st ie steps 1 - 4 BEFORE installing or something else but all went smooth & I have an internet connection from the get go. Nothing to mess about with.

So it looks like I will get my ideal setup after all ......... Zorin for 99.99% of my needs & XP for the couple of things I need that Zorin doesn't have without having to close 1 & boot the other......BLISS 8-)

As usual, thanks for the help & advice. You sure help me to focus in on what I need to do. Couldn't do it without you

Image

Uzi
User avatar
Uzi
 
Posts: 166
Joined: Wed Jun 05, 2013 12:22 pm
Next

Return to How-tos and Tutorials

Who is online

Users browsing this forum: No registered users and 2 guests