This is a static archive of the old Zorin Forum.

The information below may be outdated. Visit the new Zorin Forum here ›

If you have registered on the old forum, you will need to create an account on the new forum.

[STICKY] How to install and setup VirtualBox

madvinegar

Wed Jul 04, 2012 10:18:31 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:
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:
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.

Wolfman

Wed Jul 04, 2012 7:22:31 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

madvinegar

Wed Aug 22, 2012 8:36:07 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:
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.

Uzi

Thu Jul 18, 2013 6:30:39 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. :(

madvinegar

Thu Jul 18, 2013 6:36:02 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(!)

Wolfman

Thu Jul 18, 2013 6:37:45 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

madvinegar

Thu Jul 18, 2013 6:52:45 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).

Uzi

Thu Jul 18, 2013 7:32:17 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:

madvinegar

Thu Jul 18, 2013 8:45:36 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/

Uzi

Thu Jul 18, 2013 10:41:26 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

SoftHeart

Mon Sep 09, 2013 5:02:47 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. :(


=======================================================================================
I found a way to get it to work, but it has to be done (best I can tell,) before you install your OS. (May just disconnect the virtual drive, and re-connect after you change this one setting!)
Follow with me now, 1st; open "Oracle VirtualBox" 2nd; Click "File" and then "Preference" 3rd; click "Network" and 4th; click the little ICON (on far right) that looks like a PCI card, (hold mouse over it, it should display a box in a few seconds that reads: "Add Host-only network (INS)".... At this point, you can install your OS like normal. (Or I suppose, you can re-connect the *.vdi, I would assume.)

These people at Zorin have been so helpful, I have decided to completely remove my dependency on "MS Win", it's like a smokers patch for me right now, but I am determined to get off the "MS habit" as fast as possible! THANK YOU ZORIN!

:ugeek:

SoftHeart

Tue Sep 17, 2013 12:43:19 pm

swarfendor437 wrote:HI SoftHeart, and welcome to Zorin! Thanks for the compliments and for the tutorial! 60 blue jewels to you sir (or madam!) :D


"Why, Thank you!" (And yes it's, "Sir".) Not sure what the 60 Jewels is for, but I like shiny! ;) :D

Swarfendor437

Wed Sep 18, 2013 10:04:22 pm

SoftHeart wrote:
swarfendor437 wrote:HI SoftHeart, and welcome to Zorin! Thanks for the compliments and for the tutorial! 60 blue jewels to you sir (or madam!) :D


"Why, Thank you!" (And yes it's, "Sir".) Not sure what the 60 Jewels is for, but I like shiny! ;) :D


It's a little 'thank you' for your helpful input! We don't have 'buntu beans (would be nice to have some Zorin jewels or a 'Karma' ranking system for contributors!

BubbaBlues

Mon Dec 16, 2013 4:04:59 am

It would be perfect if only I could use both of my DVD drives. But it will only allow the use of one drive. So it looks like I'm back to dual booting. ;)

Pierre

Mon Dec 16, 2013 5:42:20 am

you can use both - it has to added in, under the settings tab.
- add new device ..
- right next <under> to where the existing DvD drive, is.

BubbaBlues

Tue Dec 17, 2013 3:57:16 am

Thanks, I couldn't find it but now I have it. You da man!

Swarfendor437

Wed Dec 18, 2013 10:59:37 pm

60 blue jewels to PIerre! :D