Virtual Box Mint on Mac | larrytalkstech

Install Linux On VirtualBox With Mac Host

Why use a virtual machine?

There are many reasons to use a virtual computer, to name a few:  Software development (configure, and see how software runs on different OS’s), secure LAN networking and/or web surfing, experimenting with different OS’s, keep using legacy software, or reuse or re-purpose old hardware.   My reasons fall into the later category.  I have a multi-processor Intel powered MacPro, built-to-order in late 2007.  Our friends in Cupertino limited the life span of this computer, a little over a year after it was built, by stopping OS X upgrades on my Mac Pro past version 10.7.5.  My options were to keep using the machine the way it is (which, until now, I have been), stop using it altogether (not a chance), do some system hacking and install a later version of OS X, or install a new operating system.  Installing a later version of OS X is doable, and so is installing another OS, like Linux.  The problem with both options points to EFI (Extensible Firmware Interface).  EFI is, in a simple definition, Mac’s version of a PC’s Bios.  It is, at least to me, tricky to work with, and not very forgiving.  Also, I did not want to give up Photoshop, Scrivener, and many other of my Mac programs if I made the “switch” to Linux.  Another option presented itself.  Why not use a virtual machine (VM)?  With a virtual machine, I can have the best of both worlds.  The virtual machine runs in a “window”, like a software program, – when you mouse-click in the VM window, you are using Linux (or whatever OS has been installed), and when you click on the OS X desktop, you are back to using the native operating system.  Besides, the software is easy to install, setup, and maintain.  What’s not to like?  My software of choice for this project was VirtualBox, and the operating system I use is LXDE Mint Linux (a Debian based Linux Mint distribution).

Why VirtualBox?

VirtualBox comes from under Oracle’s umbrella.  It is solid, well engineered, and stable.  It has all the features I need.  Competitor’s of VirtualBox (VMware’s Fusion, and Parallels) do have more “bells and whistles” in their software, and both are more integrated into the host machine’s operating system.  All of this comes at a price however; about $80 (US) each, while VirtualBox is FREE!!!

What You Need To Get Started

  1. A Windows, Mac, or Linux based Computer with a minimum of 4 Gigs of RAM and 128 Megs of video memory will be needed on the “host” machine.  Fifty or more gigs of hard drive space would not hurt either.  Yes, VirtualBox can make do with fewer system requirements, but I feel most users will want the experience of using a “Guest” operating system as if it were smoothly functioning on a real computer.  Admittedly, these are only my recommendations for a baseline of resources needed.  A lot depends on other variables as well; such as, the number of processors used and processor speed, and your purpose for installing the software in the first place.  For example:  If you are using the VM for 3D graphic development, then you will want as much RAM, video memory, processor(s) and processor speed, and hard drive space as you can leverage.  On the other hand, if you just want to surf the net, write a few letters, you can get away with fewer system resources.
  2. You will need to download and install the VirtualBox software.  The software install will follow the method normally used on your computer.  You can download the latest version of VirtualBox by clicking HERE.   If you are using Linux as a guest operating system, you will also need to download and install the latest “Guest Additions update for Linux Guests” found at the same URL.  Like the VirtualBox software, you will go through a “normal” install process.  If you have a Mac, with an operating system prior to 10.8.0, you can get a legacy build of both Virtual Box and the Guest Additions software by clicking HERE.
  3. Download a virtual-machine-image for VirtualBox, or an operating system “.iso” file.  The difference between to two downloads:

A virtual machine image is an operating system already configured for your VirtualBox software.  The upside here is in installation.  You simply decompress the file after downloading it, and point VirtualBox (we’ll discuss how to point Virtual Box to the file later) to the newly decompressed file.  The downsides:  The files do not always work, there is usually some limitations to the functionality of the software, and there is the possibility you may be downloading some malware installed within the image.  You can download virtual images HERE.

An “.iso file” is the same file you would use to install the operating system on a “real” computer.  They can usually be obtained from the “Download” section of the Linux distribution’s website. These files are typically built as “live” images that give you the opportunity to install the entire operating system from the “.iso” to your hard drive, or network-install images, where you download an “.iso” that has only the basic core of the operating system, and the remaining components are downloaded from the internet.  Once the real program install process begins, there is no perceived difference to the user in terms of function.  I use network-install images because your first download is very small, and because I have a very fast internet connection, there is really no need to have all the program’s install-files stored locally.  Either way, the major advantage of using the “.iso” file is that you are controlling what features are being installed, you end up with a fully functioning program just like it was actually installed on a blank hard drive on your computer, and you are less likely to find any malware surprises.  Like the virtual machine images, to begin the operating system install process, you will point VirtualBox to the place where the  “.iso” file is stored on your hard drive.

Preparing the Virtual Machine For The Operating System

At this point, we will assume that VirtualBox is installed, and an OpenSuse 42.1 “.iso” image has been downloaded and saved to the computer’s hard drive.  Note: Because in this example we are using my Mac with OS X 10.7.5, we will be using a legacy version of VirtualBox (Version 4.3.0).  Recent versions of VirtualBox have more changes “under the hood”, and follow an identical or in some cases similar steps to install the operating system.  As result, the instructions and graphics below should still be applicable.

Find VirtualBox in your Applications file, or Launch Pad, and open it.  It should look like the example in Figure 1.  Where you see the Red Arrow, click the “New” button.

Virtual Home Page | larrytalkstech.com

Figure 1

A “Welcome” screen appears (Figure 2).  Click on the “Continue” button in the lower right corner.

Virtual Machine Wizard | larrytalkstech.com

Figure 2

Type in the “Name” you want to use for your virtual machine.  Typically, this is the OS software you are using.  From the “Name”, VirtualBox will determine the “Operating System”, and offer a  “Version”.  This last auto-insertion may or not be correct in regards to 64 bit software.  If you do not see the software name and 64 bit after the name, the software will be 32 bit.  If you need to change the “Version”, use the drop-down box and select a 64 bit version of your software (Figure 3).

Figure 3

Figure 3

Virtual machines like memory.  Set it as large as possible, remembering to leave some for the host machine.  Note:  In this example (Figure 4), I have 16 Gigs of RAM, but can only access nearly 4 gigs for my virtual machine.  I am still researching this issue (I would like to allocate 8 gigs to my virtual machine).  At this point, research shows this is not an uncommon problem with the legacy version of VirtualBox I am using.  On the other hand, if you only have 4 Gigs of RAM available, you will get nearly 3 Gigs available for use in the VM.  In any event, click “Continue” and go ahead to the next window.

Virtual Box Select Memory | larrytalkstech.com

Figure 4

Now it’s time to create a virtual hard disk.  Be sure to select “Boot Hard Disk” and “Create new hard disk” options (Figure 5), then click “Continue”.

Virtual Box Hard Disk | larrydalkstech.com

Figure 5

Welcome to yet another Wizard (Figure 6).  Click “Continue”.

Virtual Box Create Virtual Hard Drive | larrytalkstech.com

Figure 6

Select the type of Hard Disk Storage you want (Figure 7).  Dynamic expanding storage, means that if you set an amount of 50 Gigs for storage, the virtual machine will take up whatever space it needs up to the a maximum of 50 Gigs.  So, if you only use 25 Gigs, that will be all that you will see as being used.  With Fixed-Sized Storage once the virtual hard disk is created, the space you requested is immediately allocated.  Press “Continue” when done.

Virtual Box Select Storage Type | larrytalkstech.com

Figure 7

Here (Figure 8), you select the place where the hard disk data will be stored.  Usually, the default is fine.  Next, set the size of the hard drive.  Now press “Continue”.

VirtualBox Disk Location and Size | larrytalkstech.com

Figure 8

Here (Figure 9), you will see the first of two Summary pages.  This one summarized what is about to happen.  Press “Done”.

Virtual Box Hard Drive Summary Page | larrytalkstech.com

Figure 9

And……this one (Figure 10), showing a summary of what has been created.  Press “Done”.

VirtualBox Summary for Hard Disk | larrytalkstech.com

Figure 10

Now that we have the virtual hard drive in place, it is time to setup some more virtual machine systems.  We find ourselves back at the VirtualBox Manager.  As shown by the Red Arrow, click on the “Settings” icon (Figure 11).

Virtual Box Manager | larrytalkstech.com

Figure 11

On the next window, bypass the “General” settings, and click the “System” icon.  Under the “Motherboard” tag, “Base Memory” should be the same as you set it in Figure 4.  If not, use to slider to match your original selection.  Check the boot order, if for example you don’t have or find Floppy Drive, then uncheck it.  You can also use the arrow keys next to the device window, to change the actual order of devices the virtual machine will use to find the “boot” software.  “Extended Features”, shown in Figure 12 in their default mode for the current OpenSuse install, are fine, – I have never seen a need to change them.

VirtualBox Motherboard Settings | larrytalkstech.com

Figure 12

As shown in Figure 13, click the “Processor” tab.

VirtualBox System Processor Settings | larrytalkstech.com

Figure 13

Modern computers typically have more than 1 processor (Note: if you have a processor with dual cores, you actually have 2 processors).  Adjust the slide to match number of processors of your system.

VirtualBox Processor Adjustment | larrytalkstech.com

Figure 14

Click the “Display” icon (Figure 15).  Adjust the “Video Memory” slide to maximize available video memory.  Should you use more than one monitor, move the “Monitor Count” slide, to reflect the number of monitors connect to your computer.  The best option under “Extended Features” will depend on you particular install.  Try both (one at a time).

VirtualBox video memory adjustment | larrytalkstech.com

Figure 15

As shown in Figure 16, click the “Storage” icon.  See the “Empty” setting in the “Storage Tree”, under  the “IDE Controller”, that will soon become our virtual CD/DVD player.

VirtualBox Storage Settings | larrytalkstech.com

Figure 16

UPDATE 8/20/2016:  Frequently, I began to see an error message telling me the Host memory was low.  I had too many tools telling me this was not the case.  The message was coming from VirtualBox. At the least, there was some memory management issues with the software, and probably some resource management issues as well.  After some experimenting with the Settings’ variables, I found that using two processors of my total of four, and trimming RAM memory back to 2 Gigs, became the Settings “Sweet Spot” for my virtual machine.  As a side benefit, my internet speed increased dramatically.

Under “Attributes” in Figure 17, click the drop-down box arrows, next to “Name”, and select “IDE Secondary”.  When this is done, the attribute changes from “Name” to “CD/DVD Drive”.  Earlier in the article, we discussed pointing VirtualBox to your downloaded “.iso” or virtual machine image file, you do this by clicking on the disc icon.  After the click, a typical drop-down box of your system files appear.  Find the “.iso” or “virtual machine image” file and click it.  Close the files system drop-down box.

VirtualBox Storage Attributes | larrytalkstech.com

Figure 17

In the “Storage Tree” section, under “IDE Controller”, you will now see your file loaded in the Virtual CD/DVD drive.  Under “Attributes”, in the “Information” section, you will see the specifics of your loaded file (Figure 18).  Click “OK”.

VirtualBox CD/DVD Storage Setup |larrytalkstech.com

Figure 18

You are now back to Virtual Box Manager (Figure 19).  Your virtual machine is now ready to accept the operating system.  What’s left is to click on your virtual machine in the left side of the window.  Then click the “Start” icon.  At this point, your downloaded operating system will load, exactly like it would in a “real” computer, with a blank hard drive.  The install will be the same as it would if you were installing the operating system on a “real” computer.

Remember to eject the install software from your virtual CD/DVD player, after installing the operating system.  Otherwise, as in a “real” computer, when you restart the operating system, it will boot back into your downloaded software.  There are several ways to do this, depending on your install.  The easy way, with the operating system “on”, click “Devices” in the very top menu bar of the window.  Select “CD/DVD drive”, and on the next window, at the bottom, select “Remove disk from virtual drive”.

VirtualBox Manager OS Install | larrytalkstech.com

Figure 19

Issues

I had three issues to resolve once I got my virtual machines running:

  1. Access to my LAN was a problem.  The LAN had an easy resolution, under “Settings > Network”, change the Ethernet 0 adapter to Bridged.
  2. The Video resolution defaulted to VGA levels of resolution, at least on my Mac, the cure depended on how the “Guest Additions” reacted to whatever guest operating system was installed.  In the very top tool bar of the VirtualBox window, under Machines, when you click “Auto Resize Guest Display”, after the click, you should be able to drag windows to make them larger or smaller, and the resolution will adjust according to whatever size you made the window.  On Linux, for some reason, the option is not available on all distributions.  It is available on Mint LMDE, and here it works great.
  3. Finally, as  mentioned earlier, I am still stalled at memory allocation.  That being said, at 4 Gigs, my virtual machines run fine, I would just like them to have 4 more Gigs (8 Gigs total) so I can easily use heavier memory requiring programs.

 

 

 

 

 

 

2 Comments

  • Jason Chafin says:

    Great post! I run the same type of set-up, except I use VirtualBox on my Ubuntu machine so that I can run Windoze and Adobe products. Very handy!

    • prometheus says:

      Thanks, Jason. VirtualBox is very handy software indeed. I can’t imagine the complexity involved in coding this software. The VB team did an amazing job.

      Larry

Leave a Reply