History of Virtualization
History of Virtualization
Virtualization was first developed in the 1960s to partition large, mainframe hardware for better hardware
utilization. Today, computers based on x86 architecture are faced with the same problems of rigidity and
underutilization that mainframes faced in the 1960s. VMware invented virtualization for the x86 platform
in the 1990s to address underutilization and other issues, overcoming many challenges in the process.
Today, VMware is the global leader in x86 virtualization, with over 300,000 customers, including 100%
of the Fortune 100.
The term virtualization has many meanings, and aspects of virtualization
permeate all aspects of computing. Virtual machines are one instance of this
trend. Generally, with a virtual machine, guest operating systems and applications
run in an environment that appears to them to be native hardware and
that behaves toward them as native hardware would but that also protects,
manages, and limits them.
The basic function of most CPUs, both in mainframes and in PCs, is to execute a sequence of stored
instructions (ie, a software program). In x86 processors, there are 17 specific instructions that create
problems when virtualized, causing the operating system to display a warning, terminate the application,
or simply crash altogether. As a result, these 17 instructions were a significant obstacle to the initial
implementation of virtualization on x86 computers.
To handle the problematic instructions in the x86 architecture, VMware developed an adaptive
virtualization technique that “traps” these instructions as they are generated and converts them into safe
instructions that can be virtualized, while allowing all other instructions to be executed without
intervention. The result is a high-performance virtual machine that matches the host hardware and
maintains total software compatibility. VMware pioneered this technique and is today the undisputed
leader in virtualization technology.
What is Virtualization?
Today’s x86 computer hardware was designed to run a single operating system and a single application,
leaving most machines vastly underutilized. Virtualization lets you run multiple virtual machines on a
single physical machine, with each virtual machine sharing the resources of that one physical computer
across multiple environments. Different virtual machines can run different operating systems and
multiple applications on the same physical computer. While others are leaping aboard the virtualization
bandwagon now, VMware is the market leader in virtualization. Our technology is production-proven,
used by more than 170,000 customers, including 100% of the Fortune 100.
Improve the efficiency and availability of IT resources and applications through virtualization. Start by
eliminating the old “one server, one application” model and run multiple virtual machines on each
physical machine. Free your IT admins from spending so much time managing servers rather than
innovating. About 70% of a typical IT budget in a non-virtualized datacenter goes towards just
maintaining the existing infrastructure, with little left for innovation.
An automated datacenter built on the production-proven VMware virtualization platform lets you
respond to market dynamics faster and more efficiently than ever before. VMware vSphere delivers
resources, applications—even servers—when and where they’re needed. VMware customers typically
save 50-70% on overall IT costs by consolidating their resource pools and delivering highly available
machines with VMware vSphere.
•Run multiple operating systems on a single computer including Windows, Linux and more.
•Let your Mac run Windows creating a virtual PC environment for all your Windows applications.
•Reduce capital costs by increasing energy efficiency and requiring less hardware while increasing your
server to admin ratio
•Ensure your enterprise applications perform with the highest availability and performance
•Build up business continuity through improved disaster recovery solutions and deliver high availability
throughout the datacenter
•Improve enterprise desktop management & control with faster deployment of desktops and fewer
support calls due to application conflicts
Virtualization and Operating-System Components
Thus far, we have explored the building blocks of virtualization and the various types of virtualization.
In this section, we take a deeper dive into the operating-system aspects of virtualization, including how
the VMM provides core operating-system functions like scheduling, I/O, and memory management.
Here, we answer questions such as these: How do VMMs schedule CPU use when guest operating
systems believe they have dedicated CPUs? How can memory management work when many guests
require large amounts of
memory?
Just as there are process and system perspectives of “machine,” there are process and system virtual
machines. A process VM is a virtual platform that executes an individual process. This type of VM
exists solely to support the process; it is created when the process is created and terminates when
the process terminates. In contrast, a system VM provides a complete, persistent system environment
that supports an operating system along with its many user processes. It provides the guest operating
system with access to virtual hardware resources, including networking, I/O, and perhaps
a graphical user interface along with a processor and memory.
The process or system that runs on a VM is the guest, while the underlying platform that supports
the VM is the host. The virtualizing software that implements a process VM is often termed the runtime,
short for “runtime software.” The virtualizing software in a system VM is typically referred
to as the virtual machine monitor (VMM).
Figure 3 depicts process and system VMs, with compatible interfaces illustrated graphically as
meshing boundaries. In a process VM, the virtualizing
software is at the ABI or API level, atop the OS/HW combination. The runtime emulates both
user-level instructions and either operating system or library calls. In a system VM, the virtualizing
software is between the host hardware machine and the guest software. The VMM emulates the
hardware ISA so that the guest software can potentially execute a different ISA from the one
implemented on the host. However, in many system VM applications, the VMM does not perform
instruction emulation; rather, its primary role is to provide virtualized hardware resources.
PROCESS VIRTUAL MACHINE
In essence, a process VM presents an ABI to an application process, translates a set of OS and user-level
instructions composing one platform to those of another ( Figure 2.14a ). A process VM is a virtual
platform for executing a single process. As such, the process VM is created when the process is
created and terminated when the process is terminated.
In order to provide cross-platform portability, a common implementation of the process VM architecture
is as part of an overall HLL application environment.
The resulting ABI does not correspond to any specific machine. Instead, the ABI specification is
designed to easily support a given HLL or set of HLLs and to be easily portable to a variety of ISAs. The
HLL VM includes a front-end compiler that generates a virtual binary code for execution or
interpretation. This code can then be executed on any machine that has the process VM implemented.
Two widely used examples of this approach are the Java VM architecture and
the Microsoft Common Language Infrastructure, which is the foundation of the .NET framework.
CPU Scheduling
A system with virtualization, even a single-CPU system, frequently acts like a multiprocessor system.
The virtualization software presents one or more virtual CPUs to each of the virtual machines running on
the system and then schedules the use of the physical CPUs among the virtual machines.
The significant variations among virtualization technologies make it difficult to summarize the effect of
virtualization on scheduling. First, let’s consider the general case of VMM scheduling. The VMM has a
number of physical CPUs available and a number of threads to run on those CPUs. The threads can be
VMM threads or guest threads. Guests are configured with a certain number of virtual CPUs at creation
time, and that number can be adjusted throughout the life of the VM. When there are enough CPUs to
allocate the requested number to each guest, the VMM can treat the CPUs as dedicated and schedule only
a given guest’s threads on that guest’s CPUs. In this situation, the guests act much like native operating
systems running on native CPUs.
Of course, in other situations, there may not be enough CPUs to go around. The VMM itself needs some
CPU cycles for guest management and I/O management and can steal cycles from the guests by
scheduling its threads across all of the system CPUs, but the impact of this action is relatively minor.
More difficult is the case of overcommitment, in which the guests are configured for more CPUs than
exist in the system. Here, a VMM can use standard scheduling algorithms to make progress on each
thread but can also add a fairness aspect to
those algorithms. For example, if there are six hardware CPUs and twelve guest allocated
CPUs, the VMM can allocate CPU resources proportionally, giving each
guest half of the CPU resources it believes it has. The VMM can still present all
twelve virtual CPUs to the guests, but in mapping them onto physical CPUs, the
VMM can use its scheduler to distribute them appropriately.
Even given a scheduler that provides fairness, any guest operating-system
scheduling algorithm that assumes a certain amount of progress in a given
amount of time will most likely be negatively affected by virtualization. Consider
a time-sharing operating system that tries to allot 100 milliseconds to each
time slice to give users a reasonable response time. Within a virtual machine,
this operating system receives only what CPU resources the virtualization system
gives it. A 100-millisecond time slice may take much more than 100 milliseconds
of virtual CPU time. Depending on how busy the system is, the time
slice may take a second or more, resulting in very poor response times for users
logged into that virtual machine. The effect on a real-time operating system can
be even more serious.
The net outcome of such scheduling is that individual virtualized operating
systems receive only a portion of the available CPU cycles, even though they
believe they are receiving all of the cycles and indeed are scheduling all of
the cycles. Commonly, the time-of-day clocks in virtual machines are incorrect
because timers take longer to trigger than they would on dedicated CPUs.
Virtualization can thus undo the scheduling-algorithm efforts of the operating
systems within virtual machines.
To correct for this, the VMM makes an application available for each type of
operating system that the system administrator can install into the guests. This
application corrects clock drift and can have other functions, such as virtual
device management.
Memory Management
I/O
In the area of I/O, hypervisors have some leeway and can be less concerned
with how they represent the underlying hardware to their guests. Because
of the wide variation in I/O devices, operating systems are used to dealing
with varying and flexible I/O mechanisms. For example, an operating system’s
device-driver mechanism provides a uniform interface to the operating system
whatever the I/O device. Device-driver interfaces are designed to allow
third-party hardware manufacturers to provide device drivers connecting their
devices to the operating system. Usually, device drivers can be dynamically
loaded and unloaded. Virtualization takes advantage of this built-in flexibility
by providing specific virtualized devices to guest operating systems.
As described in Section 18.5, VMMs vary greatly in how they provide I/O
to their guests. I/O devices may be dedicated to guests, for example, or the
VMM may have device drivers onto which it maps guest I/O. The VMM may
also provide idealized device drivers to guests. In this case, the guest sees an
easy-to-control device, but in reality that simple device driver communicates to
the VMM, which sends the requests to a more complicated real device through
a more complex real device driver. I/O in virtual environments is complicated
and requires careful VMM design and implementation.
Consider the case of a hypervisor and hardware combination that allows
devices to be dedicated to a guest and allows the guest to access those devices
directly. Of course, a device dedicated to one guest is not available to any
other guests, but this direct access can still be useful in some circumstances.
The reason to allow direct access is to improve I/O performance. The less the
hypervisor has to do to enable I/O for its guests, the faster the I/O can occur.
With type 0 hypervisors that provide direct device access, guests can often run at the same speed as
native operating systems. When type 0 hypervisors
instead provide shared devices, performance may suffer.
With direct device access in type 1 and 2 hypervisors, performance can
be similar to that of native operating systems if certain hardware support
is present. The hardware needs to provide DMA pass-through with facilities
like VT-d, as well as direct interrupt delivery (interrupts going directly to the
guests). Given how frequently interrupts occur, it should be no surprise that
the guests on hardware without these features have worse performance than
if they were running natively.
In addition to direct access, VMMs provide shared access to devices. Consider
a disk drive towhich multiple guests have access. The VMM must provide
protection while the device is being shared, assuring that a guest can access
only the blocks specified in the guest’s configuration. In such instances, the
VMM must be part of every I/O, checking it for correctness as well as routing
the data to and from the appropriate devices and guests.
In the area of networking, VMMs also have work to do. General-purpose
operating systems typically have one Internet protocol (IP) address, although
they sometimes have more than one—for example, to connect to a management
network, backup network, and production network.With virtualization,
each guest needs at least one IP address, because that is the guest’s main mode
of communication. Therefore, a server running a VMM may have dozens of
addresses, and the VMM acts as a virtual switch to route the network packets
to the addressed guests.
The guests can be “directly” connected to the network by an IP address
that is seen by the broader network (this is known as bridging). Alternatively,
the VMM can provide a network address translation (NAT) address. The NAT
address is local to the server on which the guest is running, and the VMM
provides routing between the broader network and the guest. The VMM also
provides firewalling to guard connections between guests within the system
and between guests and external systems.
Storage Management