It happens that you want to try some operating system (same or different), platform or application without changing your main computer's software in a irreversible way (if you install an application and you uninstall it later the computer doesn't remain exactly the same as if you hadn't installed it in the first place) or without the need to reboot the computer, or you just want to do development so you needn't to have more than one computer to try several combinations or snapshots, or you want to run games that don't run in windows. It is used too when you want to try some software that cannot be installed on your computer, for example you cannot install a iPhone application on Windows directly and run it like if windows where the iPhone because are incompatible. Emulation and Virtualization allows you to do things like that.
There are two parts involved:
- The host is the computer or device that is "always powered on" and where you install the other things, for example if you have a computer with Windows XP or Windows 7, and you want to try things on it.
- The guest if the other software or "hardware" that you want to try without the need to install it on a hard drive deleting your windows, or if you do not want to change your computer as you have it, or if it can't be installed because the systems require different hardware.
The way to do this is using emulators and virtualizers, and the main differences between them are the following:
- Virtualizers (also called hardware virtualizers) need that the hardware of your host and the hardware of our guest are similar in some way, because they share some of the physical hardware for both the host and guest, for example using the same processor instruction set like SSE4 or MMX. This makes the virtualization faster than the emulation because doesn't need every single instruction to be elaborated by software. For this reason also is faster.
The other big difference is that you need administration privileges on the host computer for virtualize, for the previous reason that the virtualizer accesses the hardware directly.
Some virtualizers may require special hardware, depending on the guest. For example, if you want to run MAC OS X Leopard on Windows or Linux, you need a processor with Intel-VT or AMD-V because the OS X requires it, and since it is not workarounded by software if demands you to have it physically on your computer. See here. And even if the Intel-VT or AMD-V are not required, the virtualization will go much faster if you have it, because there are several grades of virtualization depending on the percentage of hardware involved, so several names are given to that: Full virtualization, Paravirtualization, I/O virtualization, Memory virtualization, Network virtualization, Storage Virtualization, Partial Virtualization... See at the wikipedia.
- Emulators (also called software virtualizers) allow you to run almost any platform no matter how different the host and guest are. Because of this, usually the guest goes slower when emulated than virtualized, and require a more powerfull hardware to be run the same. Furthermore, emulators usually do not need administration privileges on the host computer, so you can run it as portable on public computers or on a friend's.
In some cases, there is not a clear line that separates emulators from virtualizers, because some of them can act in the both ways depending on how you configure them. Also, depending on its characteristics, sometimes the emulation/virtualization is more accurate that in other cases, or are some things that you cannot do but you could if you had the original hardware (for example, when emulating the Nintendo 64 on a PC you may encounter that some games have glitches or missing objects, that surely doesn't happen if you play in the console). This is due to limitations, for example if the original hardware is publicly undocumented or due to technical reasons.
Sometimes, making portable applications consists on making some kind of emulation/virtualization over the original program so you can run it without the need to install (the hardware is faked).
You can do a lot of things using emulation/virtualization:
- Run several instances of a operating system with a single computer powered on.
- Test installation of programs over a clean install.
- Make portable applications, over a clean install or with selected plugins.
- Run a different operating system from the one you have installed on your computer because you want to try it or you want to do development.
- Develop software for different computers when you only own one type. For example you have a PC with Windows XP but you want to develop for Windows 95, Windows 7, GNU/Linux, MAC OS X, FreeBSD, BeOS, HP-UX and all of those: List of operating systems
- Run games that natively don't work on you system, for example play SNES ofrPlayStation games on your computer, or old NEO-GEO machines.
- Run games designed for a console on another. For example, with Surreal64xxx you can run Nintendo 64 games on the XBOX 1, if you have a modchip on it.
- Run software only compatible with very old machines (abandonware), like AMSTRAD CPC games and programs.
- Develop software for mobile phones or tablet pcs, like Symbian, iPhone OS, Android, Windows Mobile, etc.
- Take operating systems from a computer to another in a usb pendrive.
- Develop, compile, simulate and debug software oriented for PICs, industrial microcontrollers or PLCs.
- Install and run games that have copy protection software (Safedisk, SecurROM etc) when you don't have the original disc. This is done by emulating the protection over a virtual drive created on your computer and mounting on that drive the ISO or image of the game. Software like Daemon Tools or Alcohol 120% do this job, although newer versions of the protections like SecuROM detect that you have a virtual drive and won't let you go ahead.
There are a lot of different emulators and virtualizers, each one with its own strengths and weaknesses, more or less complicated to use, more or less powerfull computer you need to run nicely, the exact things you can do with each one, the license that is has, etc. Some examples of it are:
Virtualizers:
- Xenocode Virtual Application Studio: it is intended for making portable applications. Depending on the application made portable such application may need or not admin privileges to be run. Allows you to integrate different frameworks with the application, like Java, .NET, Silverlight, WPF, LINQ, etc.
- Spoon Studio 2011: the continuation of Xenocode Virtual Application Studio
- VMWare ThinApp: if you use VMWare ThinApp Portable you needn't to install it (this version is not official). It is intended for making portable applications. Depending on the application made portable this may need or not admin privileges to be run.
- VMWare Player: only allows you to run operating systems in the vmware format. It is freeware.
- VMWare Workstation: one of the best programs to virtualize operating systems. It allows to create and administrate virtual operating systems, beside from playing it. Also allows to create snapshots and graphic acceleration. It is not freeware.
- Virtualbox: designed to virtualize operating systems. It is available under two different licenses, one under the GPL and other as freeware with some more features.
- Microsoft Virtual PC 2007: operating system virtualization.
- Parallels Workstation: operating system virtualization.
- W.I.N.E.: it is not really a emulator or virtualizer, but an API translation toolkit. It allows you to run a lot of Windows applications and games on Linux, MAC or UNIX, with about 86% performance.
- Keil µVision IDE and Debugger: Keil™ makes C/C++ compilers, debuggers, integrated environments, real-time kernels, simulation models, and evaluation boards for ARM, Cortex-M, Cortex-R4, 8051, C166, and 251 processor families. It can run run only as emulator or virtualizer depending on the exact hardware you want to code for and if you want to live-testing the code and hardware or not.
Emulators:
- Qemu Manager + Qemu: designed for operating systems. Exists in portable version, to take your operating system on a pendrive. It can act as emulator or virtualizer, depending if you wish to install the Kqemu virtualization module from the menu. Installing the kqemu module requires administration privileges but the guest goes a lot of faster. Qemu has less functions than the VMWare Workstation but works good for testing. The big bet is that are free of use and distribution, under the GPL license. The Qemu Manager is a frontend for Qemu but thre are others.
- Video Game and Abandonware emulators, that emulate consoles or old computers: Project64, ePSXe, ZSNES, WinAPE, Surreal64xxx, pcsp, Jpcsp and so on. See more at the Wikipedia.