Most Mac users are very happy with their operating system of choice. However, at times there are needs to run other operating systems on your Mac.
For example, I work with and write quite a bit about Linux. Often times, I run the particular Linux distribution on my Mac using virtualization. Virtualization allows the hardware for the operating system (the "guest") you would like to run on the Mac to be virtualized or fooled, so that the operating system believes it is running on hardware instead of OS X.
Currently there are three popular ways to virtualize complete systems on the Mac: Parallels, vmware, and VirtualBox. All three of these solutions allow you to run Windows, Linux, Solaris, and other operating systems that require Intel or AMD processors.
Before taking a closer look at these solutions, let's look at the elements that must be virtualized: processor, disk, and network interface card.
Processor
The central processing unit (CPU) or processor is the chip responsible for most of the computations necessary to perform operations. Processors in personal computers are typically either Intel or AMD, although there are other offerings from IBM, Arm, and others.
For virtualization, processors that directly support virtualization are ideal. On the Intel platform, Intel supports its Virtualization TechnologyTM or Intel VTTM. AMD supports its virtualization technology through AMD Virtualization (AMD-VTTM)
The hypervisor software will then manage assigning CPU cycles to the virtual machines to ensure a virtual machine (guest) doesn't impact the host operating system or other guests on the system.
Most virtualization solutions limits the number of processors that can be used by the machine by setting the number of "cores" assigned to the virtual machine. Cores are individual processors and the terminology is necessary because a processor is often made up of multiple processors that can be individually used.
By allowing a virtual machine to only use a limited number of cores, the hypervisor can be assured cores are available for itself.
Memory
Memory is where the computer keeps data while the data is needed by the user. For example, whenever you are editing a document in a word processor, the document is loaded into memory for you. Memory is very fast compared to hard drives, so its major storage advantage is how quick it can be accessed--quick enough to be considered real time by the user.
The amount of memory in a computer is limited; however at times there is a need to temporarily load more things into memory than your system can hold. To allow this, virtual memory is used. Virtual memory has nothing to do with system virtualization. Virtual memory is created by using a part of the hard drive (swap drive or swap space) as memory temporarily. The operating system can then write to this space as if it is memory. To increase operating system speed, the operating system actually tries to "move" something that isn't currently active from the real memory to the virtual memory. This swapping does take time; however, by moving something inactive, the user's current active program will keep moving at normal speed once the swapping has completed.
Disks
Computers need a storage place to keep our applications and data, and we typically use disks for this.
Virtual machines also require storage for the operating system, applications, and data. However, a virtualized disk is used by the virtual machine. A virtualized disk is actually a file on the hypervisor operating system. Because of the use of a file, the virtual machine can actually be quite easily moved from machine to machine, either via a network or some other storage media such as a DVD or thumb drive.
The file used by VirtualBox to represent the hard drive is referred to as a Virtual Disk Image (VDI) and uses the .vdi extension as identification. The VDI has a standard format and can be used for storing the various operating systems' file system formats, such as ext3 for Linux or NTFS for Windows.
Network Interface Cards
A system connects to the local area network and Internet using its network interface card (NIC). The NIC can be a part of the motherboard, a separate card in the machine, or even connected externally via a USB port. On most new personal computers and all Macs, the NIC card is integrated with the motherboard.
The NIC has a built-in hardware address that uniquely identifies the card worldwide. This hardware address is the Ethernet address and although it is globally unique, it is only used on the local area network. An Internet address, or Internet Protocol (IP) address is assigned to the Ethernet address. You can either manually configure the IP, or it can be provisioned to receive its address dynamically from your router or Internet service provider's router.
The Internet Protocol requires that IP addresses be globally unique; unfortunately, there are not enough IP addresses available with the current version of the protocol. Therefore, we use a technique called network address translation (NAT) in which your Internet provider gives you a single globally unique address. This address is then used to translate to your internal IP addressees. This concept is also used by virtual machines, as we'll see shortly.
Most likely, you'll want to use your virtual machines on your network and Internet as well. To do so, you'll need to have the virtual machine on your local area network. Virtualization solutions support two type of virtualized NIC cards: NAT and bridged.
In NAT mode, your virtual machine is not assigned Ethernet or IP addresses. Rather, it uses the host's address to send out traffic. The hypervisor tracks the traffic and maintains a NAT table to accept responses back to the traffic. In this mode, the virtual machine is useful for client (user) operations, but isn't useful as a server.
In bridge mode, the virtual machine has an Ethernet address and IP address. The IP address assignment can be either manually configured (within the virtual machine) or it can be dynamically configured from your router or Internet service provider. Since the machine is on the network, this mode is ideal whenever you wish to run server software (such as a mail server) on the virtual machine. (Note: The IP address is still on your local area network, so most likely, you will have to use NAT at your Internet gateway to make the system globally reachable for server software such as mail servers.)
Parallels
Parallels was one of the first virtualization options available for the Mac, and was my favorite for quite a while. The product line is solid and has some nice features available such as moving a physical machine on to your mac. This is a great feature for switchers--Windows users moving to the Mac. Parallels is available from Amazon here: Parallels Desktop 6 for Mac
vmware Fusion
Fusion is vmware's virtualization for the Mac. vmware Fusion is a very popular platform for the Mac because of it's wide acceptance in the Enterprise. vmware is considered the best Virtualization platform by many, and it drives the virtualization market in many ways with its innovations. The biggest advantage of using vmware Fusion is its ability to use a huge number of readily availaible pre-installed operating systems with applications ("soft appliances"). This means that you can quickly look at vendor provided software without having to worry about operating system installs. Soft appliances are quite popular for software vendors using Linux, as Linux can be freely distributed on the soft appliances without cost to the software vendor or user. vmware Fusion is available from Amazon here: VMware Fusion 3
VirtualBox 4
With the acquisition of Sun Microsystems, Oracle acquired the VirtualBox virtualization solution VirtualBox. VirtualBox is quite popular with the Sun and Linux community because it is freely available for individual use. The product is also freely available for the Mac! The product is as polished and easy to use as both Parallels and Fusion. You can download the product from here.
I have also written a book on running VirtualBox 4 on the Mac. To get more information and order it if you would like, I have set up a page for it.
Changing Virtualization Products?
If you're needing to move from one platform to another, you most likely need to use the Open Virtualization Format (OVF) support that allows virtual machines to be migrated from one product (for example vmware) to another product (for example VirtualBox). Check out my article on OVF here.