Detailed instructions for use are in the User's Guide.
[. . . ] Virtual PCTM for Windows®
The Technology of Virtual Machines
A Connectix white paper
Connectix Corp. 94403 (650) 571-5100 www. connectix. com
Table of contents
Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 A PC within a PC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Virtualizing the Pentium processor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Privileged versus user mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Virtualizing I/O. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Sharing the host processor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Address translation (MMU) virtualization. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Virtual hard drives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Virtualized networking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Shared networking. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Virtual switch. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Media contact. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 About Connectix. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Connectix Virtual PCTM · The Technology of Virtual Machines
1
Introduction
This white paper discusses the technology of Virtual PC for Windows, a software program that uses virtual machine technologies developed by Connectix to create in software a complete PC environment. Each virtual machine operates as if it were a stand-alone machine with its own sound card, video board, network adapter and processor. Each virtual computer runs its own operating system; users can install Windows 3. x, Windows 95, Windows 98, Windows Me, Windows NT, Windows 2000, MS-DOS, Linux, BSD, OS/2, Novell Netware, and others. [. . . ] The types of virtual devices implemented within Virtual PC were chosen due to the broad availability of drivers among various operating systems. For example, the S3 Trio video card was nearly ubiquitous in its day, so almost every PC-compatible OS supports this card with built-in drivers. Likewise, nearly every PC-based operating system contains a driver for the DEC 21041 ethernet adapter. This allows older operating systems to run within Virtual PC on a new host computer even if the guest OS contains no driver support for the new host hardware. Because of the "ownership" problem, Virtual PC doesn't allow virtual machines to directly access PCI cards or PC cards installed in the host computer. Generally, these cards are "owned" by a host driver, so they can't also be owned by a driver within the virtual machine. This limitation precludes the use of arbitrary plug-in hardware within the virtual machine environment.
Sharing the host processor
It is the job of the host OS to arbitrate and control global resources like CPU cycles, address space, etc. How, then, does Virtual PC allow multiple virtual machines to share the CPU with the host OS?From the perspective of the host OS, Virtual PC is just an application with its own threads, each of which is preemptively scheduled along with all of the other currentlyrunning threads. If Virtual PC is the only active application running on the host, it will be allocated nearly all of the available CPU cycles, and the virtual machine environment will run at its maximum speed. If Virtual PC is running alongside another application that is actively utilizing the processor, the host OS will probably only allocate half of the CPU cycles to Virtual PC, and the virtual machine environment will run at half of its maximum performance. When multiple concurrent virtual machines are running, available CPU cycles are further subdivided.
Connectix Virtual PCTM · The Technology of Virtual Machines
7
Address translation (MMU) virtualization
In an effort to provide maximum performance within the virtual machine environment, Virtual PC makes use of the host processor's MMU (memory management unit) to perform address translation the conversion of a "logical" address to a "physical" address. This translation must be done on every memory reference, so it's important to use the underlying hardware; a software implementation would be prohibitively slow. An x86 processor is capable of addressing up to 4GB (32 bits) of virtual address space. Typically, an operating system will carve up this 4GB address space into small bands of address ranges. For example, Windows 2000 usually places its kernel at address 0xC0000000 and user-mode application programs at address 0x00400000. Other parts of the address space may be used for the system BIOS, memory-mapped I/O, etc. The layout of the address space is "owned" by the host operating system, so, how is it possible for Virtual PC to impose the address space layout of the guest operating system when the virtual machine is executing?Virtual PC uses a technique that involves temporarily commandeering ownership of the MMU from the host OS. This is done for relatively short periods of time (measured in milliseconds) without knowledge of the host OS, so it continues to believe it is in complete control of the host processor the entire time. So, while the virtual machine environment is in control of the host processor, the address space layout is made to reflect the current layout of the guest operating system. The virtual machine environment must maintain control over the processor rather than completely handing it over to the guest operating system. [. . . ] This allows clients running within virtual machines to access files and printers on other machines.
·
Shared Networking Mechanism
DHCP Server ICMP
Virtual Machine
Translators NetBIOS Translator Host NetBIOS Interface
TCP & UDP
Network Address Translator
Host TCP/IP connection
Connectix Virtual PCTM · The Technology of Virtual Machines
10
Because shared networking works at the TCP/IP level of the networking stack, it is compatible with any TCP/IP connection including ethernet, token ring, dial-up adapters (PPP), etc.
Virtual switch
Virtual PC's virtual switch networking mode provides lower-level network connectivity at the ethernet (ARP) level. Here's how it works: · Packets sent from the virtual DEC card are intercepted by the virtual switch subsystem. This mode is therefore compatible with any packet type that can be encapsulated within an ethernet packet. The destination hardware (MAC "media access control") address of the packet is extracted and examined. [. . . ]