Install Windows or Linux into VirtualBox

Last modified: Oct 15, 2013 10:06 AM
0 17229 Last modified Oct 15, 2013 10:06 AM

Hello and welcome to my user tip



I love OS X, it's a great operating system and I work in it all the time.


However many people and businesses use Windows and in order to keep one's options open for employment etc., it's vital that one at least has a working ability with it in case they need to use it, like when away from their Mac for instance.


It's a great life skill to be capable in the all major computer operating systems.


I am choosing the free VirtualBox for this as to appeal to the most users, regardless of budget as those in educational phase are rather hard up for funds, however if one chooses they can use commercial versions of VMFusion or Parallels Desktop which has more features and more support. But I'm not covering those here.

First off, if your reading this and deciding which way to go, virtual machine software or Apple's (free) BootCamp, I advise you read this, you can actually do both depending upon your hardware performance need and capability of your machine.


Windows in BootCamp or Virtual Machine?



Selecting a Windows disk


You need a retail copy of Windows, most original equipment manufactures (OEM) disks for PC's contain specialized drivers and software, checks the hardware and won't run on anything else. So your old PC disks cannot be used, however there are some OEM disks that do work, but I'm not going there.


For nearly everyone, they will have to buy a copy of Windows in the store or online.



What version of Windows?


Windows XP is nearly obsolete and will no longer be getting updates. Windows Vista is so so, has little market share, but Windows 7 seems to be the one MOST used now by businesses and the general public. Windows 8 adoption is rather poor as it's a radical change, but all the XP machines becoming obsolete and only Windows 8 machines in retail stores (Windows 7 machines/software can be gotten online) is going to be rather interesting to see what happens over the next couple of years.


However currently Windows 7 is the choice of businesses as it's similar to XP and Vista, thus there is more productivity as people are familiar with it's interface better than they are on Windows 8. Windows 7 will be supported for another 7 years at least.


User uploaded file


What you chose is your choice, I will provide how to setup VirtualBox and go about making the right setup choices, the operating system installer will take over from there depending upon what you decide to choose (you might even choose Linux versions also)




What about Linux?


You can chose a distro right here. http://distrowatch.com/dwres.php?resource=major


These are the more popular and well working ones, there is a longer list of exotic, specialized, geekeir and incomplete distros as well.


Each distro is different and not as easy to install as say Windows or OS X is. It's a lot more "geekier" as it assumes you have a working knowledge of how computers work and have a brain to figure things out on your own, plus willing to use the scary Terminal or Command Line.. But the top ten distros are usually easier to install and have more support, but they all typically don't like newbie questions too much. I would say Linux Mint is by far the most friendly to new Linux users, and they install a lot of other things you need automatically. So your best bet is that for your first distro install.


Linux distros is a lot of fun, one gets to try different operating systems like driving different cars, all safely done in a virtual machine so one can fall back to OS X or just force quit and dump the whole guest operating system like a file which isn't as easy to do with a direct install. Using a virtual machine is the best way to start, test and find a distro you like for eventually direct installing onto a PC


Do not direct install Linux or any other operating system Apple doesn't support on a Mac (like into BootCamp), your in for a lot of pain and a bricked machine, (unless you REALLY know what your doing). Direct installing non-Apple supported operating systems on a Mac is one of the toughest challenges a computer geek type can likely do, as Apple controls the hardware drives and you can't get them easily, so your machine doesn't function 100%. Apple won't rescue you neither, your totally on your own if you do.


There is also FreeSD and other Unix based operating systems as well, whatever VirtualBox or your virtual machine software will support.


Note: Linux uses a separate partition for the memory swap file (when one runs out of physical RAM) on the boot volume in addition to the main partition Linux installs in. So keep this in mind when installing Linux distros into VirtualBox as you may be confused a bit, especially if you chose a distro that requires more tinkering to install.




What about another OS X?


You can do that with some versions of OS X, for instance Apple will allow OS X Snow Leopard Server to run in a virtual machine program under OS X Lion or OS X Mountain Lion, but not OS X Snow Leopard Client version. Apple also allows OS X Lion/ Mountain Lion to run another version of itself under the same OS X version.


Apple contacts virtual machine software makers and asks them not to run certain OS X versions. So if you try and it won't work, you know what possibly could be the problem.




My Mac doesn't have a optical disk drive!


Well that does present some challenges as you will need to get a copy of the operating system off the disk as a ISO image using another computer.


ISO are just images of disks, so they act just the same without the physical media of the disk itself. Luckily Linux distros are distributed as ISO's so all one has to do is download it.


Windows is copy protected, so even if it's a ISO there is a license key on the packaging or when purchased online to ensure it's only installed on the approved amount of machines. Any other machine using the licence key will be invalidated, so plan your hardware changes beforehand as a changed machine will signal a possible non-compliance, but it can be re-validated with Microsoft (it will tell you if required)


You can find out how to create ISO images in OS X's Disk Utility for your particular OS X version online.



Install VirtualBox


Download the OS X version here


https://www.virtualbox.org/


To run the program may require 10.8 and later users to right click and select "Open" to bypass Apple's Gatekeeper controls.


How to uninstall/install software on your Mac




Note the memory, minimal disk space and any other install requirements of the guest operating system


Remember your running another operating system in addition to the VirtualBox program and OS X all at the same time.


So for best performance, make sure your using your physical RAM only and not paging out excessive memory needs to the slower boot drive.



Since nearly all Mac's are using 64 bit processors, you should choose 64 bit for the guest operating systems to address more than 3.5GB of physical RAM.


In some cases where the guest OS is going to be used in a very small memory footprint fashion or for older software, you might to instead choose a 32 bit version of the guest OS instead.


Doesn't matter, 32 bit code can run on 64 bit processors, it just uses half the registers.



Read more how computers work here.


Why is my computer slow?




Click the New button and run the wizard to set up the guest machine

Note that VirtualBox pretends to be a piece of computer hardware to the guest operating system and it's installer. so when running the wizard your describing to both what sort of hardware it's pretending to be.


Do not use more than 50% of your available processor cores or physical memory (RAM), but be slightly above the minimal requirements of the guest operating system.


Later you can change things, but the guest operating system has to be shutdown (from in itself like it was for real) before you can make pretend "hardware" changes.


User uploaded file



When the wizard is completed

You now have your pretend hardware, now click Start to run the operating system installer which you choose from the location it's stored on your boot drive.


You should save this ISO guest OS installer someplace safe on the machine to use again and again, as installs don't always go perfectly and you may have to try a few times to get it right.


Do not store anything permanent in the Downloads folder, for security reasons it should remain empty and only used for downloads your aware of currently, less a website causes a hidden drive by download to place a trojan there.


Now jump through the hoops of the guest operating system installer and once installed, update it much like you would any other operating system.





Save a Snapshot

This is a great feature of virtual machine software, the ability to take and revert to a previous state of your guest operating systems, mostly within just a few seconds.


It's highly advised to do so immediately when a successful guest OS has installed, remember you can change the pretend hardware requirements of most virtual machines by first shutting down the guest OS from within itself, then making the changes in VirtualBox, then restarting the guest OS again.


Save a Snapshot before any major change to the guest operating system or a stable state.




Rotate Snapshots


Much like OS X's TimeMachine auto-rotates saved states of your boot drive going back 30 days or so, you also should keep a few states of your guest operating systems and delete older ones to free up drive space.



User uploaded file


(Linux distro ZorinOS with Cairo Dock and Clock, Windows version of Safari using Wine)




Install VirtualBox guest additions


This is rather vitally important, this software installed or a disk image provided (for manual installation inside the guest OS) by VirtualBox, it provides drivers and compatibility so your not stuck using a stock screen size and other issues.


Select the Install Guest Additions from the VirtualBox > Devices menu and either a download image appears in the Windows Downloads folder or on the Desktop.


See this for more detail, reboot the guest OS to have the software take effect.


http://www.virtualbox.org/manual/ch04.html




Read the manual for more details


http://www.virtualbox.org/manual/



You might have to go into the system preferences of the guest operating system to invoke changes in the screen size, etc. of your guest OS, much like you would do if it's a real piece of hardware.




Maintain your guest operating systems


Much like OS X and it's programs, you will have to maintain the guest operating systems software as well by running the system or Windows update and installing anti-virus (for Windows). Windows will require some time and checking to make sure there isn't more updates AFTER the current one was installed.


Windows versions get support for about ten years on average, if your installing fresh a older Windows version, there might be many updates before it's fully complete, so check again after installing the latest updates for more. "Service Packs" sort of reduce this overload a bit by delivering a major update instead of having to download a lot of smaller ones and going back for more.


Microsoft Security Essentials Anti-Virus is free and one really don't need to much more really as you can revert your guest OS to a earlier snapshot in seconds to eliminate most all malware.



Security


Likely best in the beginning to not allow too much interaction between the guest OS and OS X, like sharing folders, clipboard data and so forth until your well aware of the security risks, especially with Linux and Windows.



Backup your entire OS X boot partition


So much work went into installing and updating these guest operating systems, especially all the updates and personal configurations, take the time to backup your entire OS X system, programs and files with either Apple's TimeMachine (rotational backup, restore only) or using bootable clones.


Most commonly used backup methods




I hope this user tip has been beneficial in kick starting your virtual machine guest adventure and exploration, it certainty allows a lot of trial and error with the safety net of a OS X to fall back onto in case things go horribly wrong.


Direct installing Windows or Linux onto PC's is a much more difficult path, as the entire machine is running (or not) from the other OS and cuts off contact from Internet sources of assistance.


I suggest many take the virtual machine route and harden their skills before tackling direct installs of operating systems on hardware so they know how it all functions.



Good luck and enjoy. 🙂

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.