Introduction to Virtual Machine

Introduction to Virtual Machine

Sections:

  1. What is a virtual machine (VM)
  2. What is an Emulator
  3. How a VM works
  4. What to do next

Updated:



What is a virtual machine (VM)

Learning objective: (2) Explain what a virtual machine (VM) is


Click on image to enlarge.

Most modern computers are powerful enough to run entire operating systems within your main operating systems, which means virtual machines are more commonplace today than ever. Virtual machines allow you to run one operating system emulated within another operating system. Your primary OS can be Windows 7 64-bit, for example, but with enough memory and processing power, you can run Ubuntu and OS X side-by-side within it. [lifehacker.com]

What is a virtual machine?

In computing, a virtual machine (VM) is an emulation of a particular computer system. Virtual machines operate based on the computer architecture and functions of a real or hypothetical computer, and their implementations may involve specialized hardware, software, or a combination of both.

Classification of virtual machines can be based on the degree to which they implement functionality of targeted real machines. That way, system virtual machines (also known as full virtualization VMs) provide a complete substitute for the targeted real machine and a level of functionality required for the execution of a complete operating system. On the other hand, process virtual machines are designed to execute a single computer program by providing an abstracted and platform-independent program execution environment.

Different virtualization techniques are used, based on the desired usage. Native execution is based on direct virtualization of the underlying raw hardware, thus it provides multiple "instances" of the same architecture a real machine is based on, capable of running complete operating systems. Some virtual machines can also emulate different architectures and allow execution of software applications and operating systems written for another CPU or architecture. Operating-system-level virtualization allows the resources of a computer to be partitioned via kernel's support for multiple isolated user space instances, which are usually called containers and may look and feel like real machines to the end users.

Some computer architectures are capable of hardware-assisted virtualization, which enables efficient full virtualization by using virtualization-specific hardware capabilities, primarily from the host CPUs. [Wikipedia]

Role of a virtual machine in a business environment like cloud computing

The beauty of virtualization and cloud computing is that it is easier for enterprises of all size to benefit from the high performance and availability of our network without the cost of running your own hardware. Virtual machines are ideal for small-to-medium enterprises that need reliable service at low cost. [datapipe.com]

The goal of cloud computing is to allow users to take benefit from all of these technologies, without the need for deep knowledge about or expertise with each one of them. The cloud aims to cut costs, and helps the users focus on their core business instead of being impeded by IT obstacles. The main enabling technology for cloud computing is virtualization. Virtualization software separates a physical computing device into one or more "virtual" devices, each of which can be easily used and managed to perform computing tasks. With operating system–level virtualization essentially creating a scalable system of multiple independent computing devices, idle computing resources can be allocated and used more efficiently. Virtualization provides the agility required to speed up IT operations, and reduces cost by increasing infrastructure utilization. Autonomic computing automates the process through which the user can provision resources on-demand. By minimizing user involvement, automation speeds up the process, reduces labor costs and reduces the possibility of human errors. [Wikipedia]

Server virtualization on the x86 platform has been around now for more than a decade, yet many in the industry still consider it a "new" technology. But those of us who have already adopted the technology in our own environments have grown to believe we can't live without it. Many of us also have the opinion that there is simply no going back to a "physical-only world." Server virtualization has been a game-changing technology for IT, providing efficiencies and capabilities that just aren't possible when constrained within a physical world. And while server virtualization has continued to mature and advance itself, some virtualized organizations are still not taking full advantage of the offering -- stalling their virtual environment at something far less than the 100 percent virtualized data center of the hard-core virtual administrator. [Infoworld]

Virtual machines in research

Computer scientists at Sandia National Laboratories in Livermore, Calif., have for the first time successfully demonstrated the ability to run more than a million Linux kernels as virtual machines. The achievement will allow cyber security researchers to more effectively observe behavior found in malicious botnets, or networks of infected machines that can operate on the scale of a million nodes. Botnets, said Sandia’s Ron Minnich, are often difficult to analyze since they are geographically spread all over the world. Sandia scientists used virtual machine (VM) technology and the power of its Thunderbird supercomputing cluster for the demonstration. [Help Net Security]

Popular VMs in use today

There are many virtual machine applications available for use with desktop computing for Windows, Macs, and Linux. Running a VM with another operating system can greatly impact you knowledge and skills in operating systems by allowing you to experience several OS as well as the use of using a VM. For example, you can run Windows on your Mac or Linux on your Windows computer. The VM app does not require you to install a new OS on your hard drive. Instead, it is run in memory on a virtual copy of your system's hardware. A VM is great for secure computing and testing out new ideas or just getting to know a new OS. Below are some of the popular VMs. See this link for more details.

- VirtualBox (Windows/Mac/Linux, Free)
- Parallels (Windows/Mac/Linux, $79.99)
- VMware (Windows/Linux, Basic: Free, Premium: $189)
- QEMU (Linux, Free)
- Windows Virtual PC (Windows, Free)

Thinking: Why not have multiple boots for each OS you want to use?

Key terms: cloud computing, server virtualization, virtual machine

Resources:
To maximize your learning, please visit these Web sites and review their content to help reinforce the concepts presented in this section.

Quick links:
Virtual Machine @ Wikipedia
Top 10 benefits of server virtualization
Cloud Computing @ Wikipedia
Knowledge Byte: Benefits And Challenges of Virtualization
Scientists boot one million Linux kernels as virtual machines
Emulation or virtualization: What's the difference?
Five Best Virtual Machine Applications

Embedded Resources

Notes on navigation: Click inside the frame to navigate the embedded Web page. - Click outside the frame to navigate this page to scroll up/down between the embedded Web pages. - Click on the frame title to open that page in a new tab in most browsers. - Click on the the "Reload page" link to reload the original page for that frame.

Virtual Machine @ Wikipedia | Reload page

Top 10 benefits of server virtualization | Reload page

Cloud Computing @ Wikipedia | Reload page

Knowledge Byte: Benefits And Challenges of Virtualization | Reload page

Scientists boot one million Linux kernels as virtual machines | Reload page

Emulation or virtualization: What's the difference? | Reload page

Five Best Virtual Machine Applications | Reload page

Notes:




















What is an Emulator

Learning objective: (2) Explain what an emulator is


Click on image to enlarge.

What is an emulator

Emulation is a strategy in digital preservation to combat obsolescence. Emulation focuses on recreating an original computer environment, which can be time-consuming and difficult to achieve, but valuable because of its ability to maintain a closer connection to the authenticity of the digital object. Emulation addresses the original hardware and software environment of the digital object, and recreates it on a current machine. The emulator allows the user to have access to any kind of application or operating system on a current platform, while the software runs as it did in its original environment. Jeffery Rothenberg, an early proponent of emulation as a digital preservation strategy states, "the ideal approach would provide a single extensible, long-term solution that can be designed once and for all and applied uniformly, automatically, and in synchrony (for example, at every refresh cycle) to all types of documents and media". He further states that this should not only apply to out of date systems, but also be upwardly mobile to future unknown systems.[6] Practically speaking, when a certain application is released in a new version, rather than address compatibility issues and migration for every digital object created in the previous version of that application, one could create an emulator for the application, allowing access to all of said digital objects. [Wikipedia]

Difference between a virtual machine and an emulator

Emulation and virtualization carry many similarities, yet they have distinct operational differences. If you're looking to access an older operating system within a newer architecture, emulation would be your preferred route. Conversely, virtualized systems act independent of the underlying hardware.

Emulation, in short, involves making one system imitate another. For example, if a piece of software runs on system A and not on system B, we make system B "emulate" the working of system A. The software then runs on an emulation of system A. In our virtualization example, we can safely say that it utilizes computing resources in an efficient, functional manner - independent of their physical location or layout. A fast machine with ample RAM and sufficient storage can be split into multiple servers, each with a pool of resources. That single machine, ordinarily deployed as a single server, could then host a company's web and email server. Computing resources that were previously underutilized can now be used to full potential. This can help drastically cut down costs. [Dell]

DOSBox (DOS games)

DOSBox is an emulator program that emulates an IBM PC compatible computer running a DOS operating system. DOSBox can run old DOS software on modern computers which would not work otherwise, because of incompatibilities between the older software and modern hardware and operating systems. DOSBox is a full CPU emulator, capable of running DOS programs that require the CPU to be in real mode or protected mode. Other similar programs, such as DOSEMU or VDMs for Windows and OS/2, provide compatibility layers and rely on virtualization capabilities of the 386 family processors. Since DOSBox can emulate its CPU by interpretation, the environment it emulates is completely independent of the host CPU. On systems which provide the i386 instruction set, however, DOSBox can use dynamic instruction translation to accelerate execution several times faster than interpretive CPU emulation.[citation needed] The emulated CPU speed of DOSBox is also manually adjustable by the user to accommodate for the speed of the systems DOS programs were originally written for. DOSBox provides a high level emulation of the DOS and BIOS interrupts, and contains its own internal DOS-like shell. This means that it can be used without owning a license to any real DOS operating system. Most commands that are typically used in installer batch files are supported, but many of the more advanced commands of later DOS versions (e.g. post-Windows 98 DOS shells) are not. In addition to its internal shell, it also supports running image files of games and software originally intended to start without any operating system. The DOS emulation enables DOSBox to mount folders of the host OS as virtual drives. [Wikipedia]

RetroArch (Gameboys and others)

RetroArch is a front-end for emulators, game engines, video games, media players and other applications, designed to be fast, lightweight, portable and without dependencies for devices like Gameboys. RetroArch runs programs converted into dynamic libraries called libretro cores, using several user interfaces such as command-line interface, a few graphical user interfaces (GUI) optimized for gamepads (the most famous one being called XMB, a clone of Sony's XMB), several input, audio and video drivers, plus other sophisticated features like dynamic rate control, audio filters, multi-pass shaders, netplay, gameplay rewinding, cheats etc. RetroArch has been ported to many platforms. It can run on several PC operating systems (Windows, OS X, GNU/Linux), home consoles (PlayStation 3 , Xbox 360, Wii U, etc.), handheld consoles (PlayStation Vita, Nintendo 3DS, etc.), on smartphones (Android, iOS, etc.), embedded systems (Raspberry Pi, ODROID, etc.) and even on web browsers by using the Emscripten compiler. [Wikipedia]

Thinking: How do emulators allow us to be connected to our digital past?

Key terms: emulator

Resources:
To maximize your learning, please visit these Web sites and review their content to help reinforce the concepts presented in this section.

Quick links:
Emulator @ Wikipedia
Emulation or virtualization: What’s the difference? @ Stack Overflow (Dell)
DOSBox @ Wikipedia
DOSBox Homepage
RetroArch @ Wikipedia

Embedded Resources

Notes on navigation: Click inside the frame to navigate the embedded Web page. - Click outside the frame to navigate this page to scroll up/down between the embedded Web pages. - Click on the frame title to open that page in a new tab in most browsers. - Click on the the "Reload page" link to reload the original page for that frame.

Emulator @ Wikipedia | Reload page

Emulation or virtualization: What’s the difference? @ Stack Overflow (Dell) | Reload page

DOSBox @ Wikipedia | Reload page

DOSBox Homepage | Reload page

RetroArch @ Wikipedia | Reload page

Notes:




















How a VM works

Learning objective: (2) Explain how a VM works


Click on image to enlarge.

How does a VM work?

A virtual machine is a software computer that, like a physical machine, runs an operating system and applications. A virtual machine uses the physical resources of the physical machine on which it runs, which is called the host system. Virtual machines have virtual devices that provide the same functionality as physical hardware, but with the additional benefits of portability, manageability, and security. A virtual machine has an operating system and virtual resources that you manage in much the same way that you manage a physical computer. For example, you install an operating system in a virtual machine in the same way that you install an operating system on a physical computer. You must have a CD-ROM, DVD, or ISO image that contains the installation files from an operating system vendor. [VMWare]

Relation between the host OS and the VM

The host is the virtual machine host server; the underlying hardware that provides computing resources, such as processing power, memory, disk and network I/O, and so on. The guest is a completely separate and independent instance of an operating system and application software. Guests are the virtual workloads that reside on a host virtual machine and share in that server's computing resources. The only requirement is that a host virtual machine (or server) must meet or exceed the minimum hardware requirements for its guest VMs (workload). Since most traditional nonvirtualized servers are woefully underutilized, a host should supply ample computing resources for several guest virtual machines. But as additional guests are added to the host, computing resources -- such as memory or processing capacity -- may be exhausted. This can create performance problems in one or more guests or can crash guests -- even the entire host -- leading to numerous simultaneous workload outages, which can undermine user productivity. Guests are usually distributed among several available hosts to better distribute each workload's computing demands. [TechTarget]

Type I hypervisor (native or bare-metal / independent)

It works directly on the hardware of the host and can monitor operating systems that run above the hypervisor. It is completely independent from the Operating System. The hypervisor is small as its main task is sharing and managing hardware resources between different operating systems. A major advantage is that any problems in one virtual machine or guest operating system do not affect the other guest operating systems running on the hypervisor. [golinuxhub.com] These hypervisors run directly on the host's hardware to control the hardware and to manage guest operating systems. For this reason, they are sometimes called bare metal hypervisors. A guest operating system runs as a process on the host. The first hypervisors, which IBM developed in the 1960s, were native hypervisors. These included the test software SIMMON and the CP/CMS operating system (the predecessor of IBM's z/VM). Modern equivalents include Oracle VM Server for SPARC, Oracle VM Server for x86, the Citrix XenServer, VMware ESX/ESXi and Microsoft Hyper-V 2008/2012. [Wikipedia]

Type II hypervisor (hosted / dependent)

The hypervisor is installed on an operating system and then supports other operating systems above it. It is completely dependent on host Operating System for its operations. While having a base operating system allows better specification of policies, any problems in the base operating system affects the entire system as well even if the hypervisor running above the base OS is secure. [golinuxhub.com] These hypervisors run on a conventional operating system just as other computer programs do. Type-2 hypervisors abstract guest operating systems from the host operating system. VMware Workstation, VMware Player and VirtualBox are examples of type-2 hypervisors. [Wikipedia]

Thinking: Why is a Type II hypervisor better for most users?

Key terms: Type I hypervisor, Type II hypervisor, host, virtual machine

Resources:
To maximize your learning, please visit these Web sites and review their content to help reinforce the concepts presented in this section.

Quick links:
Understanding Virtual Machines
Host and guest virtual machine: Definitions
Understanding Virtual Machines @ Oracle
Hypervisor @ Wikipedia
Comparison Type 1 vs Type 2 Hypervisor

Embedded Resources

Notes on navigation: Click inside the frame to navigate the embedded Web page. - Click outside the frame to navigate this page to scroll up/down between the embedded Web pages. - Click on the frame title to open that page in a new tab in most browsers. - Click on the the "Reload page" link to reload the original page for that frame.

Understanding Virtual Machines | Reload page

Host and guest virtual machine: Definitions | Reload page

Understanding Virtual Machines @ Oracle | Reload page

Hypervisor @ Wikipedia | Reload page

Comparison Type 1 vs Type 2 Hypervisor | Reload page

Notes:




















What to do next

Learning objective: (2) Explain the role of a VM in a business environment


Click on image to enlarge.

Learning by doing!

This unit is setup differently from other units since it is a mixture of local and remote computing, not as local services, but as virtual ones with many variations on what technology might be used depending on your personal devices. You are also free to use any of the labs at OC. See the Help page for list of open lab times on the Bremerton, Poulsbo, and Shelton campuses. Due to the fact that there are so many ways to experience virtual machines and emulators on so many devices and they are in constant change, the best way to learn about this unit is to experience it by doing!

Try one of the virtual machines at OC

Access the Windows Virtual Machine at http://workspace.olympic.edu. Please use "instruction\firstnamelastname" and your OC login to access the virtual machine. Once you are connected to the OC Workspace, select the instance of Windows you want to use. The Remote Desktop will allow the VM to use your desktop for presentation for the VM. (If you have issues, please contact the OC Help Desk at 360-475-7600 or email helpdesk@olympic.edu) If you are not using Windows, you will need a copy of Windows Remote Desktop for your OS. For Macs, try the Microsoft Remote Desktop app @ Apple. Please note that there are limited number instances of the Windows virtual machines (VM) for all CIS students. It is possible you may need to wait until one become available. It is strongly recommend you do not wait until the last day of the due date to start this assignment. See the Links section of this unit for access and details.

Try running the game Wolfenstein 3D in DOSBox dynamically

Click on the Wolfenstein 3D in DOSBox or other MS-DOS Games at the Internet Archive and see how the DOSBox emulator is dynamically downloaded onto your computer and starts a DOS game. The emulator creates a platform of the hardware and OS required for the application. Thus, DOS apps can run on Windows / Macs / Linux / Android, with minimal issues other than mounting a local drive, since the Intel x86 environment used by MS-DOS is recreated by the emulator. See the Links section of this unit for access and details.

Try installing an emulator on your computer and phone and add a game

Install the PortableApps DOSBox (as a PortableApp on the desktop) or similar emulate for your computer and play a DOS game or other DOS based application. The DOS Games Archive is a great repository for DOS based games. Go retro! See the Links section of this unit for access and details.

Thinking: How would you explain the difference between a virtual and a emulated environment to a non-technical person?

Key terms:

Notes: