Initial Concepts
Initial Concepts
Initial Concepts
Table of Contents
Table of Contents
Driving Datacenter Optimization Through Virtualization . . . . . . . . . . . . . . . . . . . . 1 Datacenter Server Proliferation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1 Improving Consolidation Strategies Through Virtualization . . . . . . . . . . . . . . . . . . . .1 A Broad Spectrum of Virtualization Technologies . . . . . . . . . . . . . . . . . . . . . . . . . . . .2 Hard Partitions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Operating System Virtualization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Resource Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Virtual Machines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Sun Logical Domains Agile, Secure, Efficient Virtual Machines . . . . . . . . . . . . . . .4 Sun Logical Domains Best-in-Class Platform Virtualization . . . . . . . . . . . . . . . . . . .5 Logical Domains Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Hypervisor Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8 Control Domain and Logical Domains Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9 I/O Domain and Service Domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9 Logical Domain Channels. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 Virtual Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12 OpenBoot PROM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 CPU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Disk Device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Console . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Cryptographic Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Error Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15 Applying Logical Domains to the Enterprise Environment . . . . . . . . . . . . . . . . . . .16 Advanced Logical Domains Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .16 Logical Domain Migration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Reconfiguration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Enabling New Infrastructure Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17 Server Consolidation with Improved Isolation and Flexibility . . . . . . . . . . . . . . 17 Advanced Datacenter Compute Resource Management . . . . . . . . . . . . . . . . . . 19 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .20 For More Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .20
Chapter 1
platforms, simplify an IT infrastructure, and bring new levels of efficiency, manageability, and agility to a growing enterprise.
OS
Server Solaris Containers Solaris Trusted Extensions Solaris Containers for Linux Applications
Trend to Flexibility
Trend to Isolation
Figure 1-1. Sun provides innovative server virtualization technology choices to enterprises, enabling the creation of more effective consolidation projects.
Hard Partitions
Hard partitioning tools assign physical CPU, memory, and I/O resources to specific domains which run independent operating system instances. Since isolation is instantiated all the way to the hardware, potential faults in one domain do not affect applications running in other domains, increasing reliability. However, resource assignment is only as granular as physically allowed by the hardware. Suns mid-range and high-end Sun Fire severs include the capability to create Dynamic System Domains which physically divide a single system into multiple electrically isolated partitions, each running a unique instance of the Solaris Operating System (Solaris OS).
Resource Management
Resource management tools address the needs of consolidation efforts which require soft resource boundaries between applications. With no privileges to access underlying hardware, resource management software leverages operating system controls to govern utilization of CPU, memory, and I/O. For example, Solaris Resource Manager software enables system administrators to set and enforce policies that guarantee a share of CPU cycles and virtual memory space to individual applications. Administrators can also set upper limits on process count, number of logins, and connect time for each system user ID. In addition, Solaris Resource Manager software can be used along with other virtualization technologies to further define resource rights for each virtualized boundary. In fact, Solaris Resource Manager software enables dynamic allocation of processors and individual processor cores to a Solaris Container. The power to define and readily adjust compute resource levels within virtualized environments helps enterprises improve hardware utilization and better guarantee the quality of service for individual applications.
Virtual Machines
A virtual machine monitor enables enterprises to run multiple, different operating systems concurrently as guests on a single physical machine. Virtual machines make use of a hypervisor to enable partitioning of compute resources on conventional hardware in a safe and effective manner without sacrificing performance or function. Hypervisors in virtual machine solutions which use full virtualization emulate a machine architecture down to the register level, enabling execution of unmodified guest operating systems. However, some implementations such as VMware ESX Server, dynamically rewrite portions of the hosted machine code to insert traps wherever virtual machine monitor intervention might be required. This translation also is applied to the entire guest OS kernel, resulting in added translation, execution, and caching
delays for core operations. As such, the full virtualization approach incurs a high cost for update-intensive operations, potentially introducing significant processing overhead. Rather than rely upon translation, para-virtualization virtual machine architectures, such as Sun Logical Domains and XenSource XenEnterprise, increase efficiency by directly integrating the hypervisor with a para-virtualized operating system. Using paravirtualization, a guest operating system explicitly calls a support function implemented by hypervisor code rather than trying to access a system register itself. Much of the code that traditionally exists in the lowest layers of an operating system is moved from the operating system and placed in the hypervisor. Sun Logical Domains optimize performance and security by implementing the hypervisor in firmware, setting logical domains technology apart from other virtual machine technology.
LDom A
LDom B
LDom C
LDom D
Operating System
LDoms Hypervisor
CPU
CPU Memory
CPU
CPU
CPU
CPU
CPU
Memory I/O
Memory
I/O
Figure 1-2. A single server hosts multiple logical domains, each running unique, isolated operating system instances.
Table 1-1. Comparison of Virtual Machine Solutions from Sun, VMware, XenSource, IBM, and HP.
Sun Logical Domainsa Virtual Machine Approach Architecture Supported Operating System Supported Memory Granularity I/O Path Granularity Virtualized Processors Virtualized Memory Shared I/O Path Number of Partitions Paravirtualization Sun UltraSPARC T1 Solaris OS Linuxb FreeBSDc 8 KB Shared XenSource XenEnterprise Paravirtualization x86 VMWare ESX Server Full Virtualization x86 IBM DLPAR IBM Micropartition Paravirtualization IBM Power5 HP vPar HP Integrity VM
Paravirtualization HP PA-RISC Itanium HPUX Linux (IA-32/ IA-64 only) 64 MB One I/O Slot
Paravirtualization Itanium
AIX
HP-UX
Linux
16 MB
One I/O Slot Shared or Optionally Shared No No Yes (Optional) One per CPU core Yes No Yes 10 per CPU core, up to 254
a. Specifications based upon Sun Logical Domain deployments on UltraSPARC T1 systems. b. Linux support for Sun Logical Domains is expected to be provided as a result of a community effort. c. FreeBSD support for Sun Logical Domains is expected to be provided as a result of a community effort. d. XenEnterprise requires Intel VT-enabled or AMD-V hardware to support unmodified guest operating systems, such as the Windows operating environment.
Chapter 2
1. Please reference the Logical Domains (LDoms) 1.0 Adminisration Guide and visit http://sunsolve.sun.com to obtain required patches.
I/O domain Controls direct, physical access to input/output devices, such as PCI Express cards, storage units, and network devices. Guest domain Utilizes virtual devices offered by service and I/O domains and operates under the management of the control domain.
Hypervisor Architecture
The hypervisor is a firmware layer on the flash PROM of the server motherboard which partitions a physical system into one or more virtual machines. The SPARC execution model contains a new hyper-privileged mode which enables the hypervisor to assess and control all platform devices. In this role, the hypervisor abstracts underlying hardware and exposes a subset of system resources to each logical domain. In fact, logical domains can only access platform resources explicitly made available by the hypervisor, and all requests for communication with devices by logical domains result in system calls to the hypervisor (Figure 2-1).
OpenBoot
Hypervisor
SPARC Hardware
Figure 2-1. The hypervisor firmware layer virtualizes server resources and buffers logical domains from direct hardware access. Acting as a multiplexing agent, the hypervisor instantiates multiple virtual devices for each physical device. As such, multiple logical domains can share the same physical resource. For example, the hypervisor employs a time slicing technique to efficiently service the processing needs of many logical domains using a single multithreaded processor. Similarly, the hypervisor virtualizes memory, segmenting physical memory and presenting a unique address space to all logical domains. The hypervisor also virtualizes I/O, enabling the creation of virtual disk, network, consoles, and other I/O
devices for each logical domain regardless of the number of physical I/O units. In order to optimize performance, all functions aside from low level device control are left to the operating system on the logical domain.
Hypervisor
Hyper Privileged
PCI-Express
...
Devices
Figure 2-2. I/O domain with direct device ownership Typically, an I/O domain takes the additional role of a service domain and shares device access to other logical domains in the form of virtual devices (Figure 2-3). A service domain provides specific virtualized services, including virtual disk, network, and console services to guest domains using a logical domain channel for communication. Many logical domains can share the same physical device, but only the service domain accesses the physical device driver. By buffering device control, the service domain can actually change the underlying device or device driver while the logical domain continues to execute. Usually a service domain provides virtual devices that map to underlying physical I/O devices. However, devices such as a private, internal virtual switch requires no corresponding physical hardware.
Service Domain Device Driver Privileged Virtual Device Service Nexus Driver
Hypervisor
Domain Channel
Hyper Privileged
...
Devices
Figure 2-3. A service domain shares device access with a guest domain through a logical domain channel.
With logical domains, transferring data using shared memory is controlled by the hypervisor and relies heavily on the memory management unit (MMU) of the Sun UltraSPARC T1 processor. Equipped with an additional level of memory translation, the MMU enables logical domains to share the same Translation Lookaside Buffer (TLB). As a result, a message placed in the TLB by the logical domain originating the message can be readily accessed by the logical domain intended to receive the message.
Virtual Devices
Virtual devices are physical hardware resources abstracted by the hypervisor and
presented to logical domains. Virtualized CPU and memory resources are exposed to logical domains directly by the hypervisor. Leveraging the CMT technology of the Sun UltraSPARC T1 processor, the hypervisor constructs a virtual CPU out of each hardware thread for use by guest domains. The hypervisor also divides physical memory into segments and handles all mapping functions required to properly provide a unique, usable address space to each logical domain. Virtual I/O devices, such as disk, network, console, and cryptographic units are created by the hypervisor and subsequently offered to logical domains by a service domain. Guest domains contain virtual device drivers that communicate using a logical domain channel to a virtual device service in a service domain. The service domain then connects to the actual I/O device (Figure 2-4). As a result, the number of virtual devices offered can substantially exceed the amount of physical resources in a system, enabling support of many logical domains on a single server.
Logical Domain 1 User Application User Application User Application User Application
Service Domain
Virtual Disk Bridge Virtual Disk Driver Virtual Disk Driver Virtual Disk Driver Device Driver
Figure 2-4. Guest domains access I/O devices using a virtual device service provided by the service domain.
OpenBoot PROM
A virtualized OpenBoot PROM is provided to each logical domain in order to enable initial loading and execution of an operating system, diagnostic programs, and the ability to configure boot time parameters. In fact, a virtualized OpenBoot prompt is the first interface presented to the administrative console upon connection to a new logical domain.
CPU
For each available processor thread, the hypervisor creates one virtual CPU, resulting in support for up to 32 virtual CPUs on platforms which utilize the Sun UltraSPARC T1 processor. As such, a guest domain often only gains access to a fraction of the possible execution time of a set of physical CPUs. A time slicing technique used by the hypervisor helps maximize CPU utilization and application performance. All low level CPU device communication and control is handled by the hypervisor, isolating the operating system on a logical domain from all register level executions. As a result, the hypervisor can schedule logical domain processes across multiple CPUs within the same platform and transparently and dynamically swap use of one CPU for another. Using the hypervisor as a buffer, logical domains can utilize a mix of different CPU implementations and even remain active when a physical processor is not available.
Memory
Within the logical domains architecture, the hypervisor virtualizes physical memory into increments as small as eight kilobyte segments and allocates memory to each logical domain. Most importantly, all virtualized memory segments created by the hypervisor appear to begin at the same offset as physical memory, enabling operating systems to readily find the start of the address space just as in non-virtualized environments.
Disk Devices
The virtual disk server (vds) executes in a service domain, directly controls physical disk block devices, and functions to provide logical domains with virtualized disk access. In this role, the service domain exports device control to guest domains in the form of
virtual disk service devices (vdsdev). The vdsdev may be a whole physical disk, logical
unit number (LUN), slice of a disk, loopback filesystem, or Solaris zettabyte file system (ZFS) volume. Using a simple interrupt driven request and response mechanism combined with the shared memory communication support implemented as a part of the hypervisor and virtual nexus, a guest domain can transfer data via the virtual disk device driver to the corresponding physical storage device.
Console
Within traditional compute systems, a console is required to view boot messages, receive notification of system level errors, and perform low level system configuration tasks. The hypervisor virtualizes the system console device in order to provide fail-safe administrative access for each individual logical domain. Administrators can access a logical domain console through a Virtual Console Concentrator (vcc) or Virtual Network Terminal Server (VNTS). The Virtual Console Concentrator service on the control domain communicates with the hypervisor over a LDC and provides each logical domain with a console connection as a TTY device at a unique port number. Administrators can connect to the vcc service on the control domain and specify the proper port number to gain console access. The Virtual Network Terminal Server daemon (vntsd) on the control domain provides telnet access to logical domain consoles. By specifying groups of consoles, multiple consoles become accessible from a single TCP port. In this scenario, the administrator connects to a specific TCP port/console group and is offered the choice of connecting to any console within the group.
Network
Virtual network support is provided by defining virtual network devices (vnet) on a guest domain. The vnet device emulates an Ethernet device and communicates with other vnet devices in the system over a point-to-point connection. The vnet device implements a distributed switch architecture, capturing and maintaining route information to communicate with other vnet devices without the use of an intervening physical switch. In order to support network connections external to the platform, a virtual switch (vsw) device and a vnet proxy server reside within the service domain. The vsw device routes incoming packets on the basis of the Media Access Control (MAC) or IP address and sends the packets to the appropriate vnet device or descriptor ring in the vnet device. In addition, the vsw acts as a forwarding agent for packets destined to clients outside the platform. The vnet proxy server multiplexes all network control and error information.
Cryptographic Devices
Cryptographic devices perform dedicated, high-performance Rivest Shamir Adleman (RSA) operations, such as encrypting and decrypting network traffic. Within the logical domains architecture, cryptographic devices can be virtualized for use by multiple logical domains. However, since the UltraSPARC T1 processor contains one cryptographic unit per core, virtualized cryptographic devices can only be bound to logical domains that contain at least one virtual CPU from the parent UltraSPARC T1 processor core.
Error Handling
In order to create a fully virtualized environment, the logical domains architecture provides special error handling. While the service domain receives detailed error information for all faults, guest domains only receive error information relevant to assigned hardware. The hypervisor also intercepts error messages and shields guest domains from messages regarding correctable errors. Logical domains which run the Solaris OS also inherit all of the error management functions provided by the operating system. In fact, logical domains technology is completely integrated with the Solaris OS Fault Management Architecture (FMA). As such, detailed, relevant information for each error condition including items specific to logical domain functions are provided by the Solaris OS to system administrators, enabling initiation of corrective action.
Chapter 3
Reconfiguration
Spikes in demand and changing business needs cause individual IT service to use varying amounts of compute capacity over time. The Logical Domains Manager enables administrators to optimize use of compute resources by modifying the number and type of virtual resources, including CPU, memory, and I/O devices assigned to a logical domain. Some reconfiguration tasks can take place dynamically, enabling the compute capacity of a logical domain to grow or shrink without need to reboot the operating system or interrupt application processing. Currently, dynamic reconfiguration applies to CPU resources, easing the process of balancing processing power between logical domains.
Using delayed reconfiguration, specified configuration changes are implemented upon the next reboot or power cycle of the guest domain. Delayed reconfiguration works for all virtual devices.
Security
In order to safely consolidate software with strict access control or data isolation requirements, administrators must ensure secure boundaries are created between applications. By taking advantage of the logical domains security model, enterprises can provide high levels of processing isolation to applications. Implemented in firmware, the hypervisor ensures all calls to devices are validated, and a privileged instruction mode only available through the hypervisor enforces low level access protection. In addition, the service domain uses secure logical domain channels for all virtual device service data transfer. Guest domains which run the Solaris OS also inherit all of the security advantages of the base operating environment and the ability to use Solaris Containers technology to create multiple private execution environments within a single logical domain. In addition, an optional measure can be implemented to further harden the security of individual logical domains. For domains with the highest security requirements, the Solaris Security Toolkit can be used to tighten user access and improve process auditing. Most notably, the control domain which contains processes involved in creating and managing all logical domains within a platform falls into this category. Administrators can use the Solaris Security Toolkit to disable services and functions extraneous to core application operation, implement non-default security controls and features, and configure logging and auditing of critical actions. The additional security enabled by the Solaris Security Toolkit can contribute to reducing the number of potential security threats and a better overall view of the operating environment.
domain hosts a unique operating system instance, the specific configuration needs of hosted applications can be addressed individually. In addition, secure logical domain channels ensure sensitive data routes to the proper logical domain. By taking advantage of logical domains, enterprises can increase flexibility and securely isolate applications while reaping the benefits of a consolidated platform.
Financial Database
File Server
Web Server
LDom A
LDom B
LDom C
LDom D
File Server
Financial Database
Web Server
LDoms Hypervisor
CPU
CPU
CPU
CPU
CPU
Memory I/O
Memory
Figure 3-1. Using logical domains, applications from multiple servers can be consolidated onto a single platform while maintaining isolation and resource control.
Logical Domain 1
Logical Domain 2
Figure 3-2. Logical domains technology enables rapid migration of software stacks from one physical server to another.
Summary
Chapter 4
Summary
Sun is constantly looking to, and shaping, the future of computing by investing in new technology and gaining expertise to help solve critical business problems and build solutions that meet the needs of today and tomorrow. Sun's full product portfolio ranges from silicon to software, and the ability to innovate at every level results in unique solutions, such as Sun Logical Domains. As the result of research, innovation, and years of experience in datacenter environments, Sun provides industry leading approaches to virtualization which help enterprises improve asset utilization, efficiency, and security. By taking advantage of Sun virtualization technologies, organizations can architect, implement, and manage a consolidated datacenter that strikes the proper balance between absolute isolation and soft, flexible separation of applications. Through the creation of more agile, consolidated environments, organizations can ultimately achieve a lower total cost of ownership and higher return on investment for compute assets.
Sun Microsystems, Inc. 4150 Network Circle, Santa Clara, CA 95054 USA Phone 1-650-960-1300 or 1-800-555-9SUN (9786) Web sun.com
2007 Sun Microsystems, Inc. All rights reserved. Sun, Sun Microsystems, the Sun logo, CoolThreads, Solaris, and Sun Fire are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. in the U.S. and other countries. Products bearing SPARC trademarks are based upon architecture developed by Sun Microsystems, Inc.Information subject to change without notice. Printed in USA 04/07