Beruflich Dokumente
Kultur Dokumente
Part No 821-0316-11
Revision 1.1 1/13/10
Sun Microsystems, Inc.
Table of Contents
Housekeeping............................................................................................... 25
Save configurations to the service processor........................................................ 25
Use proper shutdown procedures........................................................................ 25
Removing guest domains................................................................................... 25
Removing Logical Domains software................................................................... 26
Sun Microsystems, Inc.
Summary...................................................................................................... 27
About the authors.............................................................................................. 28
Acknowledgments............................................................................................. 28
Ordering Sun documents.................................................................................... 28
Accessing Sun documentation online.................................................................. 29
1 Sun Logical Domains Quick Start Guide Sun Microsystems, Inc.
Chapter 1
Sun™ Logical Domains Quick Start Guide
When this document was prepared, Sun™ Sun™ Logical Domains, or Sun LDoms, is Sun’s built-in, no-cost hardware
Logical Domains 1.2 was the current version virtualization technology for servers and blade systems powered by UltraSPARC®
and the document applies to versions 1.2
T1, T2, and T2 Plus processors. These systems are equipped for massive scalability
and greater. Take care to use the latest
recommended versions of LDoms, the using chip multithreading (CMT) technology in which each of up to eight processor
Solaris™ Operating System, and firmware. cores support up to eight concurrent execution threads each for a total of up to
Recommended sets of software can be 64 threads per processor and up to 256 threads per server. The systems based on
found in the Logical Domains Release Notes
these processors deliver excellent performance for highly threaded applications,
for the current version.
along with the lowest power consumption per thread of the current generation of
processors.
Hypervisor
PCI A PCI B
Sun CMT Server
Figure 1. Logical Domains supports multiple guest domains each having their own
secure partition of server resources. Physical I/O is performed by I/O domains that
‘own’ one or more PCI root nexus nodes, or buses.
2 Sun Logical Domains Quick Start Guide Sun Microsystems, Inc.
Where Logical Domains differs significantly from other Type 1 hypervisors on the
market today is that it allows physical server resources (such as CPUs, memory,
MAUs, and even PCI root nexus nodes) to be partitioned, not time shared, between
domains. This provides each domain with dedicated resources and increases isolation
between domains. Partitioning helps to avoid issues such as one domain depriving
other domains of needed resources. Partitioning potentially increases cache
performance by fixing the domain’s relationship to a CPU in contrast to timesharing.
While separating CPU and memory resources is prudent from a resource allocation
standpoint, LDoms also allows I/O resources to be shared in flexible ways to allow
both sharing and separation of resources to improve performance, reliability, and
availability.
This article was originally written to describe Logical Domains 1.2 software. The
procedures shown in this document apply to version 1.2 and later, and they may
show references to Logical Domains 1.2 software. We recommend using the latest
version of Logical Domains software for your platform together with the latest
recommended versions of Solaris, patches, and firmware as described in the
applicable Logical Domains Release Notes.
Note – These assumptions do not cover UltraSPARC T1 processor-powered servers such as the
Sun SPARC Enterprise T1000 and T2000 servers. This guide focuses on administering servers
through Sun’s Integrated Lights-Out Management (ILOM) software using both its command-
line interface and browser user interface (BUI). For UltraSPARC T1 server platforms that use
Sun’s older lights-out management software, ALOM commands will need to be used instead.
There is, however, some preparation needed to set up a new server, update firmware,
install Logical Domains software, and set up virtual devices and disks. That is the
bulk of this article that takes you through the steps from providing a server’s initial
network identity to booting your first logical domain. Although many of these steps
can be condensed by using the Logical Domains Configuration Assistant mentioned
in the sidebar, the purpose of this document is to convey an understanding of the
process and mechanics of setting up a system to run Logical Domains software and
creating guest domains on the system.
• Chapter 2, “Initial Server Setup,” walks you through the tasks that you’ll need
to perform just once: giving your server a network identity, updating the system
firmware, initializing the Solaris OS, and downloading and installing the Logical
Domains Manager software.
• Chapter 3, “Control and I/O Domain Setup,” describes how to turn the OS
running on the server into a control and I/O domain in the context of Logical
Domains software. The chapter shows how to set up the virtual disk and network
infrastructure used by guest domains.
• Chapter 4, “Virtual Disk Backend Setup,” describes the benefits of using Solaris
ZFS™ software to support virtual disks, and it walks you through the steps involved
in carving out a spare disk partition to use as a Solaris ZFS file system.
• Chapter 5, “Guest Domain Creation,” shows how to create a logical domain and
connect it to the virtual infrastructure created in Chapters 3 and 4.
4 Sun Logical Domains Quick Start Guide Sun Microsystems, Inc.
Chapter 2
Initial Server Setup
This chapter covers the steps that you need to take in order to get your server
connected to the network with current firmware installed.
Gather documentation
Even though this guide is intended to give you a complete, self-contained set of
instructions for setting up a first domain using Logical Domains software, it is still
useful to have the basic LDoms documentation on hand to answer questions and
provide more background. Visit http://docs.sun.com/app/docs/prod/
ldoms to download appropriate versions of the following documents:
• Logical Domains Release Notes. This document will give you any last-minute news
on the release and any unresolved issues. You should not run into any issues
following the steps in this guide.
• Logical Domains Administration Guide. This document explains how to administer
Logical Domains software, illustrating a large number of scenarios that are beyond
the scope of this document.
• Logical Domains Reference Manual. This document provides all of the options for
all Logical Domains-related commands in a concise format.
Assign IP addresses
You will need three IP addresses as you work through this guide, one for each of the
following uses:
• Service processor Network Port. This is the port labeled NET MGT.
• Control domain. This is the address of the primary domain on the server, the one
that boots with no Logical Domains software installed. This is typically the port
labeled NET 0.
• Guest domain. This is the address that the guest domain will use when it connects
to the network, and for the purpose of this example is the same NET 0 port as the
control domain.
6 Sun Logical Domains Quick Start Guide Sun Microsystems, Inc.
Obtain these addresses, along with the appropriate netmasks, and router IP
addresses, from your network administrator. Putting the control domain and guest
domain IP addresses on the same subnet makes it easy to set up communication
between the control domain and the guest domain.
Log in with the user root and the initial password changeme. Then use the show
/SP/network command to view the assigned address. In this example, the
address is 10.6.162.25.
7 Sun Logical Domains Quick Start Guide Sun Microsystems, Inc.
Daemons ready
Version 3.0.2.50
/SP/network
Targets:
Properties:
commitpending = (Cannot show property)
dhcp_server_ip = none
ipaddress = 10.6.162.25
ipdiscovery = static
ipgateway = 10.6.163.254
ipnetmask = 255.255.252.0
macaddress = 00:14:4F:46:EE:A1
pendingipaddress = 10.6.162.25
pendingipdiscovery = static
pendingipgateway = 10.6.163.254
.
pendingipnetmask = 255.255.252.0
state = enabled
Commands:
cd
set
show
Log in with the user root and the initial password changeme. Then type the
following commands to set the service console’s IP address and other parameters:
8 Sun Logical Domains Quick Start Guide Sun Microsystems, Inc.
Daemons ready
Version 3.0.2.50
Now that the service processor has been set up to have a network identity, you can
choose to make further configuration steps through the browser user interface or
through the serial port.
You can determine your firmware revision from the command output. Firmware
revision numbers are sequential for each server type, so consult http://www.
sun.com/bigadmin/patches/firmware to determine the most current revision.
Locate your server model and see if the listed system firmware revision is greater
than the one installed on your server. If it is, download the latest firmware onto your
workstation and uncompress it. The result should be a package file whose name
ends in .pkg. If your have the latest firmware installed, skip the next section.
The server power must be turned off before you update the firmware. To turn off
the power, click the Remote Control tab, then the Remote Power Control tab. Select
Graceful Shutdown and Power Off from the pop-up menu and click Save.
To update the service processor firmware, click the Maintenance tab, then click
Firmware Upgrade. Click the Enter Upgrade Mode button.
Now browse to where you have stored the firmware package on your desktop or
laptop, and then click the Upload button.
10 Sun Logical Domains Quick Start Guide Sun Microsystems, Inc.
You need to first power on the server, and then execute the initialization steps
through a command-line interface (via the service console) or through the BUI.
Command-line setup
To work from the command line, you can use an ssh connection and log in to the
service processor’s network port. Use the ILOM start /SYS command to turn
.
on the system’s power, and then connect to the server console through the service
processor.
Note that the power-on sequence takes some time due to the power-on self tests
that are conducted. Once the Solaris OS boots for the first time, it will prompt you
for information including your language, time zone, and network settings.
To connect to the server console, select the Remote Control tab and then select
Launch Redirection. You can bring up a serial console by selecting I Want To
See Serial Redirection. If you choose the serial console, you will need to use the
sequence of commands under “Command-line setup” above to turn the server power
on. You can bring up a graphical user interface by leaving the option unchecked.
Either approach will allow you to go through the sequence of setting up the system
identity.
Now that you have the Solaris OS initialized and on the network, you can connect to
the server via ssh, through the service console (serial port or ssh), or through the
BUI (graphical or serial console)
# cd LDoms_Manager-1_2
# cd Install
# ./install-ldm
The Logical Domains installation script will ask if you want to harden the server
operating system using the Solaris Security Toolkit. This is an excellent step to follow
for production systems as security of the control domain is important for protecting
guest domains. For the purpose of this quick install exercise, skip the hardening step
proceed with a standard Solaris OS configuration.
At this point you have a server with current firmware, an initialized Solaris operating
system instance, and running Logical Domains software. The next step is to convert
that OS instance into a control and I/O domain.
.
13 Sun Logical Domains Quick Start Guide Sun Microsystems, Inc.
Chapter 3
Control and I/O Domain Setup
Primary
Solaris 10 OS and
Logical Domains
Manager
Hypervisor
1 128
16 MAUs 32 GB Memory
Figure 2. In the server’s initial state, a single control domain owns all of the system
resources including CPU threads, MAUs, memory, and PCI buses. The control domain
is also referred to as the primary domain.
The example server has two eight-core UltraSPARC T2 Plus processors. The server
has two PCI buses that connect to built-in Ethernet interfaces, internal disk drives,
and PCI Express slots for additional peripherals. Each CPU has 64 threads and eight
modular arithmetic units (MAUs) that accelerate encryption operations.
Verify the server’s initial state using the ldm list command. You’ll note that a
single domain primary owns 128 virtual CPUs (threads) and 64 GB of memory
# ldm list
NAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIME
primary active -n-c-- SP 128 65312M 0.2% 3d 15h 41m
The end state of the next several steps is illustrated in Figure 3 and consists of the
following:
14 Sun Logical Domains Quick Start Guide Sun Microsystems, Inc.
Primary
primary-vds0
Unallocated Resources
Hypervisor
primary-vds0
primary-vsw0
nxge0 24 GB Memory
4 GB Memory
16 MAUs
Figure 3. The end state of this set of steps frees resources and creates virtual device
infrastructure to support guest domains.
# ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
nxge0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 10.6.162.45 netmask fffffc00 broadcast 10.6.163.255
ether 0:14:4f:46:ee:98
Now use the knowledge of that interface to create a virtual switch primary-vsw0
that is connected to the physical interface.
Note – When making configuration changes, always remember to save the final state in the
service processor.
For the hypervisor to choose this new hardware configuration when the system
is powered on, the configuration must be stored in the service processor. In this
example, we store the changed state in the named location my‑initial.
Now reboot the primary and I/O domain so that the delayed configuration takes
effect.
.
17 Sun Logical Domains Quick Start Guide Sun Microsystems, Inc.
Chapter 4
Virtual Disk Backend Setup
There are significant advantages to using a flat file stored on a Solaris ZFS file
system. You can use snapshots to create a point-in-time image of a virtual disk for
use in backups or roll back a guest domain to a previous, known state. You can use
clones as a quick and space-efficient way to create multiple guest domains from the
same “golden master” Solaris OS installation. When more than one disk device is
dedicated to a ZFS file system pool, various levels of redundancy can be established
to further protect data.
. This set of steps illustrates how you can create a ZFS pool from a single disk
partition. After creating the guest domain we will demonstrate how easy it is to
make a clone of your first guest domain for use in creating subsequent guests.
Use the format command and choose the disk on which you wish to allocate a
partition as a virtual disk backend.
Note – This example repartitions disk 0, where the Solaris OS is usually installed. Take
care when allocating unused space on this volume not to destroy your running Solaris OS
installation for the control domain.
18 Sun Logical Domains Quick Start Guide Sun Microsystems, Inc.
# format
Searching for disks...done
The format command will present a menu. Choose p to edit the partition table.
FORMAT MENU:
disk - select a disk
type - select (define) a disk type
partition - select (define) a partition table
current - describe the current disk
format - format and analyze the disk
repair - repair a defective sector
label - write label to the disk
analyze - surface analysis
defect - defect list management
backup - search for backup labels
verify - read and display labels
save - save new disk/partition definitions
inquiry - show vendor, product and revision
volname - set 8-character volume name
!<cmd> - execute <cmd>, then return
quit
. format> p
The format command presents the partition table for the selected disk. The swap
partition uses disk cylinders 0–402. The root partition uses cylinders 403–1912. The
backup partition represents the whole disk, which is 14087 cylinders. We can create
a partition from any of the unassigned partitions. We choose partition 6, starting the
partition at cylinder 1913 (one after the root partition) and make it 12174 cylinders
in size (cylinders 1913–14087). Select 6 to begin this partitioning process.
partition> 6
19 Sun Logical Domains Quick Start Guide Sun Microsystems, Inc.
Allocate the remaining space with a partition that begins after the root partition
and extends to the end of the disk. Then choose l to label the disk and q to quit the
partition command.
partition> l
Ready to label disk, continue? y
partition> q
. Create a ZFS file system pool ldompool from the c1t0d0s6 partition, and create
the domain1 file system within the pool. By default, ZFS pools are mounted in the
root directory by the name of the pool, and ZFS file systems appear underneath
as directories. Create an empty file with the mkfile command to hold the guest
domain’s disk image. Using the -n option creates the file but does not allocate all of
its data. This example creates a 20 GB file.
# cd /
# zpool create -f ldompool c1t0d0s6
# zfs create ldompool/domain1
# mkfile -n 20g /ldompool/domain1/diskimagefile
20 Sun Logical Domains Quick Start Guide Sun Microsystems, Inc.
Chapter 5
Guest Domain Creation
Once the guest domain is started, it boots from the virtual cdrom device and begins
an installation of the Solaris OS.
Primary Guest 1
/solaris-s10u6-dvd.iso ldompool/domain1/
diskimagefile
primary-vsw0 vnet0 vdisk0 cdrom
primary-vds0
Unallocated Resources
Hypervisor
primary-vds0
primary-vsw0
nxge0 24 GB Memory
4 GB Memory 4 GB Memory
16 MAUs
Figure 4. The end state of this quick-start guide is a guest domain with both physical
and virtual resources connected to it.
21 Sun Logical Domains Quick Start Guide Sun Microsystems, Inc.
Create a virtual network device vnet0 in guest1 and connect it to the virtual
switch that was created in Chapter 3.
Note – The Logical Domains Manager does not check to be sure that a file name you provide
is valid. The only indication that you have typed an invalid file name is a virtual disk that does
not work in the guest domain.
Each domain runs its own instance of OpenBoot™ software. You can set the domain’s
boot device so that it first tries to boot from a disk, and then from the virtual cdrom
device. On the first boot attempt, booting from the disk will fail and the domain
will boot from the cdrom device. Once the Solaris OS is installed, the next attempt
to boot from the disk will be successful. Note that you must boot from the cdrom
device’s f partition as shown in the following command.
Commit the resources that have been allocated using the bind command.
You can verify that the resources have been allocated using the
ldm list-bindings command.
MAC
00:14:4f:fb:e3:4a
HOSTID
0x84fbe34a
VCPU
VID PID UTIL STRAND
0 4 100%
1 5 100%
2 6 100%
3 7 100%
MEMORY
RA PA SIZE
0xe000000 0x10e000000 4G
VARIABLES
boot-device=cdrom:f
NETWORK
NAME SERVICE DEVICE MAC MODE PVID VID
vnet0 primary-vsw0@primary network@0 00:14:4f:fa:c0:ad 1
PEER MAC MODE PVID VID
.
primary-vsw0@primary 00:14:4f:f9:6a:97 1
DISK
NAME VOLUME TOUT DEVICE SERVER MPGROUP
vdisk0 vol1@primary-vds0 disk@0 primary
cdrom cdrom@primary-vds0 disk@1 primary
VCONS
NAME SERVICE PORT
guest1 primary-vcc0@primary 5000
# ldm list
NAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIME
primary active -n-cv- SP 4 4G 0.8% 5m
guest1 bound ------ 5000 4 4G
Enable the virtual console service (you only need to do this one time), and then start
the guest domain.
23 Sun Logical Domains Quick Start Guide Sun Microsystems, Inc.
Now telnet to guest1’s console. The domain should be in the process of booting
from the Solaris ISO image, and it should begin an interactive Solaris OS installation.
If you do not have automatic booting enabled, you can use commands such as
show-devs and show-nets at the OpenBoot software’s ok prompt to verify that
the devices you created are available to the guest domain.
Note – A good practice is to use a separate ssh connection to the control domain for each
guest domain console connection you make. When you connect to the control domain
through the service processor, only one connection can own the console, which limits
the number of concurrent telnet sessions you can observe. When you create a new ssh
connection to the control domain for each guest domain console connection, you don’t use a
limited resource. Thus, response time is better because the connection is not limited by the
console serial port speed.
Details on using Solaris ZFS technology For example, suppose that you don’t want to go through the Solaris OS installation
with Logical Domains are available in process for every new guest domain that you create. You can create a golden master
Chapter 6 of the Sun BluePrints article
virtual disk image that you can clone as many times as needed for each new logical
“Data Reliability with Logical Domains.”
The Logical Domains System Administration domain that you create. One of the benefits of using snapshots and clones in Solaris
Guide also makes suggestions in the section ZFS file systems is that they are very space efficient. Every disk block in a clone is a
“Using ZFS with Virtual Disks” in Chapter 6, reference to the original golden master, and space is allocated only as needed using
“Using Virtual Disks.”
copy-on-write semantics.
24 Sun Logical Domains Quick Start Guide Sun Microsystems, Inc.
To create a clone, first snapshot a Solaris ZFS file system and then make a clone of it.
The cloning process makes a permanent copy of the snapshot. The clone uses copy-
on-write semantics so that the clone is an independent, read/write copy.
Solaris ZFS file system snapshots operate on file systems, not files, so it is a good
practice to put only one virtual disk backend file in each Solaris ZFS file system.
In the following example, we create a snapshot of guest1’s file system named
initial. Then we clone the snapshot and create a new file system golden at the
same time.
You can remove the golden master’s identity with the sys-unconfig command,
however note that this will not remove many useful changes you can prepare in the
golden image, such as patches, applications, and configuration files. This will cause
the Solaris OS to go through the system identity setting prompts upon first boot so
that each clone of the golden master obtains its own identity. To accomplish this,
perform the following steps:
.
1. Shut down the guest1 logical domain.
3. Boot guest2 and run the sys-unconfig command. The command will
unconfigure the system and halt it.
5. Now you can start guest1 without any identity conflicts on the network. You
can start guest2 and give it an identity. To create new logical domains based
on the unconfigured golden master, use the zfs clone command using the
snapshot ldompool/golden@goldenmaster as the source.
25 Sun Logical Domains Quick Start Guide Sun Microsystems, Inc.
Chapter 6
Housekeeping
2. Shut down and unbind any active I/O domains. In this example, there is no
secondary I/O domain supporting redundant I/O paths. If there were, you would
use the two commands from Step 1.
3. Shut down and halt the primary domain. You can use the command shutdown
-i5 -g0 -y. Following the shutdown the server will power off since there are
no longer any active domains running.
If you have enabled networking between the control domain and guests, you
may have to manually restore the previous hostname files (for example /etc/
hostname.nxge0) and remove the hostname files that plumbed virtual switches
into the control domain (for example /etc/hostname.vsw0).
.
27 Sun Logical Domains Quick Start Guide Sun Microsystems, Inc.
Chapter 7
Summary
Once you have installed the correct server firmware and the Logical Domains
Manager software, it is simple and straightforward to create new logical domains
given a virtual disk image. As demonstrated in Chapter 1, starting with a populated
virtual disk image file, only seven commands are needed to create a guest domain.
The ldm create command creates the guest. The ldm set-vcpu and ldm set-
mem commands allocate virtual CPUs and memory to the guest. The ldm add-
vnet command gives the guest a network connection. The ldm-add-vdsdev
command attaches a virtual disk to the virtual disk service, and the ldm add-
vdisk command attaches the service to the guest. The ldm bind command
activates the resource allocation.
• Guest domains can be moved between servers via warm or cold migration,
simplifying datacenter workload management, and simplifying the process of
taking a physical server down for upgrades or maintenance.
Gary Combs is currently a SPARC Specialist in the Systems Technical Marketing Group.
He specializes in mid-range high-end SPARC servers, which includes the popular
. M-Series as well as the higher end CMT servers, such as the Sun SPARC Enterprise
T5440 server. Gary also covers virtualization technologies that are implemented on
these platforms: Dynamic Domains, Logical Domains, and Solaris Containers. Gary
has over 15 years direct sales support experience as a systems engineer. For the
last 10 years, Gary has held marketing positions in product management, product
definition, and now technical marketing.
Acknowledgments
The author would like to thank Steve Gaede, an independent technical writer and
engineer, for preparing this article. Thanks also to Alexandre Chartre, Cathleen
Reiher, and Pierre Reynes for giving the document a thorough review.
http://docs.sun.com/
To reference Sun BluePrints OnLine articles, visit the Sun BluePrints OnLine Web site:
http://www.sun.com/blueprints/online.html
.
Logical Domains Quick Start Guide Sun Microsystems, Inc.
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
© 2008-2010 Sun Microsystems, Inc. All rights reserved. Sun, Sun Microsystems, the Sun logo, BluePrints, Java, OpenBoot, Solaris, SunDocs, and ZFS are trademarks or registered trademarks of Sun Microsystems,
Inc. or its subsidiaries 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 US and other countries.
Products bearing SPARC trademarks are based upon an architecture developed by Sun Microsystems, Inc. Information subject to change without notice. Printed in USA 1/10