student guide - sa-345 sun virtualization - solaris 10 logical domains administration
DESCRIPTION
Student Guide - SA-345 Sun Virtualization - Solaris 10 Logical Domains AdministrationTRANSCRIPT
Sun Virtualization: Solaris 10 Logical Domains Administration
Student Guide
SA-345-S10 B
D61784GC20Edition 2.0
April 2010
D66810
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Copyright © 2010, Oracle and/or its affiliates. All rights reserved.
Disclaimer
This document contains proprietary information, is provided under a license agreement containing restrictions on use anddisclosure, and is protected by copyright and other intellectual property laws. You may copy and print this document solely foryour own use in an Oracle training course. The document may not be modified or altered in any way. Except as expresslypermitted in your license agreement or allowed by law, you may not use, share, download, upload, copy, print, display,perform, reproduce, publish, license, post, transmit, or distribute this document in whole or in part without the expressauthorization of Oracle.
The information contained in this document is subject to change without notice. If you find any problems in the document,please report them in writing to: Oracle University, 500 Oracle Parkway, Redwood Shores, California 94065 USA. Thisdocument is not warranted to be error-free.
Sun Microsystems, Inc. Disclaimer
This training manual may include references to materials, offerings, or products that were previously offered by SunMicrosystems, Inc. Certain materials, offerings, services, or products may no longer be offered or provided.Oracle and itsaffiliates cannot be held responsible for any such references should they appear in the text provided.
Restricted Rights Notice
If this documentation is delivered to the U.S. Government or anyone using the documentation on behalf of the U.S.Government, the following notice is applicable:
U.S. GOVERNMENT RIGHTSThe U.S. Government’s rights to use, modify, reproduce, release, perform, display, or disclose these training materials arerestricted by the terms of the applicable Oracle license agreement and/or the applicable U.S. Government contract.
Trademark Notice
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respectiveowners.
AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks or registered trademarks of Advanced MicroDevices. Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are usedunder license and are trademarks or registered trademarks of SPARC International, Inc. UNIX is a registered trademarklicensed through X/Open Company, Ltd.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
This page intentionally left blank.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
This page intentionally left blank.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
1Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Table of Contents
About This Course .................................................................Preface-iCourse Map..............................................................................Preface-iiTopics Not Covered...............................................................Preface-iiiHow Prepared Are You?.......................................................Preface-ivIntroductions ...........................................................................Preface-vHow to Use Course Materials ..............................................Preface-viConventions ...........................................................................Preface-vii
Typographical Conventions ..................................... Preface-viii
Logical Domains Fundamentals .....................................................1-1Additional Resources ........................................................................ 1-2Introduction to Logical Domains..................................................... 1-3
What Are Logical Domains?.................................................... 1-3How Is Logical Domains Positioned in Sun Microsystems
Virtualization Technologies?................................................ 1-3Logical Domains Virtual Machines Overview ..................... 1-5
Logical Domains Architecture ......................................................... 1-9The Hypervisor ....................................................................... 1-10Logical Domains Manager..................................................... 1-11Logical Domain Channel ....................................................... 1-12The OpenBoot™ PROM Environment................................. 1-13The Operating System............................................................ 1-14Physical and Virtual Devices................................................. 1-15
Logical Domains Planning.............................................................. 1-16Identifying Design Goals ....................................................... 1-16Gather System Hardware and Software Configuration
Information ........................................................................... 1-18Additional Configuration Planning Considerations ......... 1-26Identify Installation Tasks ..................................................... 1-27Identify Configuration Tasks ................................................ 1-28Identify Administrative and Maintenance Tasks............... 1-29Identify Implementation Resources ..................................... 1-29
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
2 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Installing Logical Domains Software ............................................. 2-1Additional Resources ........................................................................ 2-2Introduction ........................................................................................ 2-3Verifying the Correct Build of the Solaris OS ................................ 2-5Checking the System Firmware ....................................................... 2-6Installing the Logical Domains Manager Software Packages ... 2-10
Downloading the Logical Domains Manager SoftwarePackage.................................................................................. 2-10
Installing the Logical Domains Manager SoftwarePackages ................................................................................ 2-11
Ensuring the Logical Domains Manager Daemon isEnabled .................................................................................. 2-13
Ensuring Security on a Logical Domains System isEnabled .................................................................................. 2-14
The Logical Domains Manager ldm Command........................... 2-15Applying What You Have Learned – Lab Exercise .................... 2-20
Preparation............................................................................... 2-21Task 1 – Gather System Hardware and Software
Configuration Information ................................................. 2-24Task 2 – Upgrade the System Controller Firmware........... 2-29Task 3 – Install the Logical Domains Management
Software................................................................................. 2-35Lab Exercise Summary........................................................... 2-38
Configuring the Control and Service Domain ............................... 3-1Additional Resources ........................................................................ 3-2Introduction ........................................................................................ 3-3Configuring the Control Domain’s Resources............................... 3-4
Determining How Many Resources are Available .............. 3-5Setting Virtual CPUs for the Control Domain ...................... 3-5Setting Cryptographic Resources for the Control Domain. 3-6Setting Memory for the Control Domain .............................. 3-6Verifying the Resources Assigned to the Control Domain. 3-7
Adding Virtual Services.................................................................... 3-8Adding a Virtual Disk Server.................................................. 3-9Adding a Virtual Switch Service........................................... 3-10Adding a Virtual Console Concentrator Service ................ 3-11Verifying the Virtual Services Have Been Created ............ 3-12
Saving the Configuration to the System Controller.................... 3-13Verifying the Configuration is Ready to be Used at the Next
Reboot ............................................................................................. 3-14Rebooting the Control Domain...................................................... 3-15Enabling Networking Between the Control/Service Domain and
Other Domains .............................................................................. 3-16Enabling the Virtual Network Terminal Server Daemon .......... 3-18Applying What You Have Learned – Lab Exercise .................... 3-19
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
3Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Preparation............................................................................... 3-19Task 1 – Set Up the Control Domain.................................... 3-20Task 2 – Create Virtual Services............................................ 3-28Task 3 – Configure the Virtual Switch as a Primary
Network Interface ................................................................ 3-31Task 4 – Enable the Virtual Network Terminal Server...... 3-33Lab Exercise Summary........................................................... 3-34
Creating a Guest Domain.................................................................4-1Additional Resources ........................................................................ 4-2Introduction ........................................................................................ 4-3Creating and Starting a Guest Domain........................................... 4-4
Determining Available Resources .......................................... 4-4Creating the Guest Domain..................................................... 4-5
Installing the Solaris OS on a Guest Domain Using JumpStart .. 4-9Verifying a Guest Domain Configuration.................................... 4-11Applying What You Have Learned – Lab Exercise .................... 4-13
Preparation............................................................................... 4-13Task 1 – Create a Guest Domain........................................... 4-14Task 2 – Switch Between Control and Guest Domains ..... 4-21Task 3 – JumpStart the Guest Domain................................. 4-22Task 4 – Explore the Guest Domain ..................................... 4-26Lab Exercise Summary........................................................... 4-29
Performing Logical Domains Administration ................................5-1Additional Resources ........................................................................ 5-2Introduction ........................................................................................ 5-3Reconfiguring Logical Domain Resources ..................................... 5-4
Overview of Dynamic and Delayed ReconfigurationOperations............................................................................... 5-4
Reconfiguring Virtual CPU and Memory ............................. 5-5Using Virtual Disks............................................................................ 5-8
Introduction to Virtual Disks .................................................. 5-8Virtual Disk Appearance ......................................................... 5-9Virtual Disk Backend Options .............................................. 5-10Virtual Disk Backend.............................................................. 5-10Exporting CD, DVD and ISO Images................................... 5-16Using ZFS to Create Virtual Disks for Guest Domains ..... 5-17
Using Virtual Networks.................................................................. 5-22Configuring a Virtual Switch and the Service Domain for
NAT and Routing................................................................. 5-23Configuring Virtual Local Area Networks ......................... 5-24
Managing Logical Domains Configurations................................ 5-27Saving, Removing, and Restoring a Guest Domain
Configuration ....................................................................... 5-27Resetting the Logical Domains Configuration ................... 5-30
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
4 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Managing Advanced Logical Domains Configurations................ 6-1Additional Resources ........................................................................ 6-2Introduction ........................................................................................ 6-3Migrating a Logical Domain from One Server to Another.......... 6-4
Migration Process Overview................................................... 6-4Migrating an Active Domain (Warm Migration) ................. 6-6Migrating a Bound or Inactive Domain (Cold Migration) 6-10Performing the Migration ...................................................... 6-11Performing Automated Migrations...................................... 6-13
Using Multiple I/O Domains......................................................... 6-14Creating an Additional I/O Domain ................................... 6-14Configuring Virtual Network Multipathing With Multiple
I/O Domains......................................................................... 6-17Configuring Virtual Disk Multipathing With Multiple I/O
Domains................................................................................. 6-20Applying What You Have Learned – Lab Exercise .................... 6-23
Preparation............................................................................... 6-23Task 1– Remove and Restore a Guest Domain................... 6-24Task 2 – Reconfigure Guest Virtual CPUs........................... 6-27Task 3 – Reconfigure Guest Domain Memory.................... 6-30Task 4 – Split the PCI Configuration to Create I/O
Domains................................................................................. 6-33Task 5 – Use a File as a Virtual Disk..................................... 6-41Task 6 – Export a ZFS Volume as a Virtual Disk................ 6-47Task 7 – Migrate an Active Guest Domain.......................... 6-53Task 8 – Reset the System to the Factory Default
Configuration ....................................................................... 6-63Lab Exercise Summary........................................................... 6-67
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Preface-iCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Preface
AboutThis Course
Course Goals
Upon completion of this course, you should be able to administerLogical Domains. This includes administrative tasks such as:
● Planning a Logical Domains installation
● Installing the Logical Domains software
● Configuring the control and service domain
● Creating a guest domain
● Reconfiguring logical domains resources
● Using virtual disks
● Using virtual networks
● Managing logical domains configurations
● Migrating an active guest domain (warm migration)
● Migrating a bound or inactive guest domain (cold migration)
● Creating an additional I/O domain
● Configuring virtual network multipathing with multiple I/Odomains
● Configuring virtual disk multipathing with multiple I/O domainsO
racl
e U
nive
rsity
and
BO
S-it
Gm
bH &
Co.
KG u
se o
nly
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Course Map
Preface-ii Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Course Map
The following course map enables you to see what you haveaccomplished and where you are going in reference to the course goals.
Performing Logical
System ManagementChanges in Solaris 10Configuring the Control
System ManagementChanges in Solaris 10 Installing Logical
Domains SoftwareLogical Domains
Fundamentals
and Service Domain
Domains Administration
Creating a Guest Domain
System ManagementChanges in Solaris 10
Managing AdvancedLogical Domains
Configurations
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Topics Not Covered
About This Course Preface-iiiCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Topics Not Covered
This course does not cover the following topics. Many of these topics arecovered in other courses offered by Sun Learning Services:
● Concepts involving IP packet forwarding and routing
● Concepts relating to Sun™ Enterprise Volume Manager software
Refer to the Sun Learning Services catalog for specific information andregistration.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
How Prepared Are You?
Preface-iv Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
How Prepared Are You?
To be sure you are prepared to take this course, can you answer yes to thefollowing questions?
● Can you administer the Solaris 10 Operating System?
● Do you have experience with logical domain capable systems?
● Can you configure remote installation methods such as JumpStart?
● Do you understand security protection methods commonlyemployed in computer environments?
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Introductions
About This Course Preface-vCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Introductions
Now that you have been introduced to the course, introduce yourself tothe other students and the instructor, addressing the following items:
● Name
● Company affiliation
● Title, function, and job responsibility
● Experience related to topics presented in this course
● Reasons for enrolling in this course
● Expectations for this course
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
How to Use Course Materials
Preface-vi Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
How to Use Course Materials
To enable you to succeed in this course, these course materials contain alearning module that is composed of the following components:
● Goals – You should be able to accomplish the goals after finishingthis course and meeting all of its objectives.
● Objectives – You should be able to accomplish the objectives aftercompleting a portion of instructional content. Objectives supportgoals and can support other higher-level objectives.
● Lecture – The instructor presents information specific to the objectiveof the module. This information helps you learn the knowledge andskills necessary to succeed with the activities.
● Activities – The activities take various forms, such as an exercise,self-check, discussion, and demonstration. Activities help youfacilitate the mastery of an objective.
● Visual aids – The instructor might use several visual aids to convey aconcept, such as a process, in a visual form. Visual aids commonlycontain graphics, animation, and video.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Conventions
About This Course Preface-viiCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Conventions
The following conventions are used in this course to represent varioustraining elements and alternative learning resources.
Icons
Additional resources – Indicates other references that provide additionalinformation on the topics described in the module.
?!
Discussion – Indicates a small-group or class discussion on the currenttopic is recommended at this time.
Note – Indicates additional information that can help students but is notcrucial to their understanding of the concept being described. Studentsshould be able to understand the concept or complete the task withoutthis information. Examples of notational information include keywordshortcuts and minor system adjustments.
Caution – Indicates that there is a risk of personal injury from anonelectrical hazard, or risk of irreversible damage to data, software, orthe operating system. A caution indicates that the possibility of a hazard(as opposed to certainty) might happen, depending on the action of theuser.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Conventions
Preface-viii Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Typographical Conventions
Courier is used for the names of commands, files, directories,programming code, and on-screen computer output; for example:
Use ls -al to list all files.system% You have mail.
Courier is also used to indicate programming constructs, such as classnames, methods, and keywords; for example:
The getServletInfo method is used to get author information.The java.awt.Dialog class contains Dialog constructor.
Courier bold is used for characters and numbers that you type; forexample:
To list the files in this directory, type:# ls
Courier bold is also used for each line of programming code that isreferenced in a textual description; for example:
1 import java.io.*;2 import javax.servlet.*;3 import javax.servlet.http.*;
Notice the javax.servlet interface is imported to allow access to itslife cycle methods (Line 2).
Courier italics is used for variables and command-line placeholdersthat are replaced with a real name or value; for example:
To delete a file, use the rm filename command.
Courier italic bold is used to represent variables whose values are tobe entered by the student as part of an activity; for example:
Type chmod a+rwx filename to grant read, write, and executerights for filename to world, group, and users.
Palatino italics is used for book titles, new words or terms, or words thatyou want to emphasize; for example:
Read Chapter 6 in the User’s Guide.These are called class options.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
1-1Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Module 1
LogicalDomains Fundamentals
Objectives
This module introduces you to Logical Domains concepts, architecture,and planning considerations.
Upon completion of this module, you should be able to:
● Describe Logical Domains virtualization.
● Describe the Logical Domains architecture.
● Plan your Logical Domains installation.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Additional Resources
1-2 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Additional Resources
The following references provide additional information about the topicsdescribed in this module:
● Logical Domains 1.3 Administration Guide, Part No: 821-0406-10
● Logical Domains 1.3 Reference Manual, Part No: 821-0405-10
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Introduction to Logical Domains
Logical Domains Fundamentals 1-3Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Introduction to Logical Domains
What Are Logical Domains?
The Logical Domains, or LDoms, technology is part of a suite ofmethodologies for consolidation and resource management that includesSun Fire Dynamic System Domains (dynamic hardware domains) andSolaris OS Zones, of which resource control and operating systemvirtualization are a subset.
How Is Logical Domains Positioned in SunMicrosystems Virtualization Technologies?
Sun provides a wide spectrum of virtualization technologies designed tomeet the needs of the most demanding dynamic datacenter. Eachvirtualization technology provides varying degrees of flexibility,availability, and security. In some cases, organizations benefit by utilizingmultiple virtual technologies within a single server deployment. Byharnessing commodity software, delivering Sun's own advanced productsand technologies, and leveraging Sun's global expertise in providingsystems and software, Sun offers a full portfolio of virtualizationsolutions. Sun Microsystems' comprehensive approach addresses strategicvirtualization categories, including hard partitioning with DynamicSystem Domains, virtual machines with Logical Domains, operatingsystem virtualization with Solaris Zones, and resource management (seeFigure 1-1).
Figure 1-1 Sun Virtualization Technologies for SPARC
Hard Partitions Virtual Machines OS Virtualization Resource Management
AppA
AppB
AppC
AppC
AppA
AppB
AppA
AppB
AppC
App
OS
Server
Hypervisor
Trend to Isolation and SecurityTrend to Flexability
Dynamic SystemDomains
Solaris ResourceManager
Solaris ZonesLogical Domains (LDoms)
AppB
AppA
AppD
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Introduction to Logical Domains
1-4 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
● Dynamic System Domains (DSD) are engineered to remain isolatedfrom each other within the system, providing a highly secure andreliable environment for running multiple functions simultaneously.Each domain is a self-contained server of one or multiple systemboards, containing CPU, memory, I/O, boot-disk and networkresources, running Sun's highly robust Solaris Operating Systemsoftware in each domain instance. This solution provides the greatestisolation and security.
● Logical Domains, or LDoms, allows you to share a system's variousresources, such as memory, CPUs, and devices, into logicalgroupings and create multiple, discrete systems, each with their ownoperating system, resources, and identity within a single computersystem. These discrete systems are known as logical domains. At theheart of the LDoms architecture is the hypervisor. The hypervisorprovides a set of support functions to the operating system, so thatthe OS does not need to know intimate details of how to performfunctions with the hardware. A Logical Domains environment helpsyou achieve greater resource usage.
● Solaris Zones, also known as Solaris Containers, provide a completeexecution environment for a set of software services. They are aseparate, virtual Solaris environment sharing a common kernel. Azone provides a virtual mapping from software services to platformresources, and allows application components to be isolated fromeach other even though they share a single kernel. It establishesboundaries for resource consumption and provides isolation fromother zones on the same system. The boundaries can be changeddynamically to adapt to changing processing requirements of theapplications running in the zone.
● Solaris resource management software, formerly referred to asSolaris Resource Manager, enables increased resource availability forusers, groups, and applications. It provides the ability to allocate andcontrol major system resources such as CPU, memory, and numberof processes. After a resource policy is set, the system administratorcan walk away, confident that mission-critical applications will getthe resources they demand.
Two other virtualization technologies you should be aware of are SunVirtualBox, which falls between Virtual Machines and OS Virtualizationas an application that runs within an OS instances, and Oracle VM Server,which is functionally the equivalent of Logical Domains (SPARC) forx86/x64 but supports Linux as a guest OS.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Introduction to Logical Domains
Logical Domains Fundamentals 1-5Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
● Sun VirtualBox is a multi-operating environment virtualizationapplication that runs on x86 platforms only. It extends thecapabilities of the user's existing computer so that it can run multipleoperating systems (inside multiple virtual machines) at the sametime. So, for example, a user can run Windows and Linux on a Mac,run Windows Server 2008 on a Linux server, run Linux on aWindows PC, and so on, all alongside existing applications. The usercan install and run as many virtual machines as he or she likes. Theonly practical limits are disk space and memory.
● Oracle VM Server is a free, next-generation server virtualization andmanagement solution from Oracle that makes enterprise applicationseasier to deploy, manage, and support. Users can create and managevirtual machines that exist on the same physical server but behavelike independent physical servers. Each virtual machine created withOracle VM Server has its own virtual CPUs, network interfaces,storage, and operating system. With Oracle VM Server, users have aneasy-to-use browser-based tool for creating, cloning, sharing,configuring, booting, and migrating virtual machines.
Logical Domains complements Sun’s existing virtualization technologiesand brings additional value to enterprises. For example, Logical Domainsenables partitioning of entry level servers. This capability was previouslyonly available to mid-range and high-end systems with Dynamic SystemDomains. Logical Domains can also enhance computer resourcemanagement on systems using Solaris Zones technology forvirtualization.
Logical Domains Virtual Machines Overview
Logical Domains, which are available on SPARC Chip Multithreadedservers, uses server virtualization technology to transform one physicalserver into a host for many virtual machines. Each virtual machine canrun a separate, independent operating system and applications. Theserver virtualization technology partitions the hardware so that it canfunction as if it were several separate independent pools. As a result theunderlying server resources, such as memory, CPUs, network interfaces,and storage devices, can be shared among the virtual machines.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Introduction to Logical Domains
1-6 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
A Logical Domains virtual machine is known as a logical domain. Alogical domain is comprised of a discrete logical grouping of resourcesand has its own operating system and identity within a single computersystem. Each logical domain can be created, destroyed, reconfigured, andrebooted independently, without requiring you to powercycle the physicalserver.
You can run a variety of applications software in different logical domainsand keep them independent for performance and security purposes. Eachlogical domain is only permitted to observe and interact with thosephysical server resources that are made available to it by the hypervisor.
There are multiple roles that logical domains can perform (see Figure 1-2),such as a:
● Control domain – The control domain controls the Logical Domainsenvironment. It is used to configure machine resources and guestdomains, and provides services necessary for domain operation,such as virtual console service. The control domain also normallyacts as a service domain. The Logical Domains Manager software islocated within the control domain. A system has exactly one controldomain. It is the first domain configured on the system and is alsoknown as the primary domain.
● I/O domain – An I/O domain has direct ownership of and directaccess to physical I/O devices connected to the PCI bus, such aslocal network interfaces and disk drives, and devices connected toPCI adapters. It is normally a prerequisite role for a service domain.
● Service domain – A service domain provides virtual services, such asvirtual disk drives, virtual network switches, and virtual consoleservices to guest domains. The service and I/O roles are typicallyconfigured on the same domain.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Introduction to Logical Domains
Logical Domains Fundamentals 1-7Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
● Guest domain – A guest domain runs an operating system instancewithout performing any of the above roles, but leverages the servicesprovided by a service domain in order to run applications and userservices.
Figure 1-2 Logical Domains With Individual Roles
Here is a summary of the logical domain roles:
● If a domain runs the Logical Domains Manager, then it is the controldomain.
● If a domain has access to a physical device, then it is an I/O domain.
● If a domain provides virtual device services, then it is a servicedomain.
● If a domain uses only virtual devices, then it is a guest domain.
Physical Resourses(CPUs, LANs, Storage, Network)
GuestDomain
ServiceDomain
Workload
I/ODomain
SystemController
Hypervisor
DeviceDriver
DeviceServer
Client
ControlDomain
LogicalDomainsManager
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Introduction to Logical Domains
1-8 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
A domain can also have multiple roles. For example, the initial domain(the “primary” domain) usually has the role of control, I/O, and servicedomains (see Figure 1-3).
Figure 1-3 Logical Domains With Multiple Roles
Although control, I/O, and service functions can be combined within adomain, it is recommended that additional user applications not runwithin the control or service domain in order to protect domain stabilityand performance. This is also recommended for security reasons toprevent other domains from being compromised.
Now that you have a better understanding of what the Logical Domainsproduct is, how it is positioned in Sun Microsystems virtualizationtechnologies, and how it utilizes server virtualization technology, let’slook at the key architectural components that enable you to create andconfigure a Logical Domains environment.
Physical Resourses(CPUs, LANs, Storage, Network)
GuestDomain
ServiceDomain
Workload
I/ODomain
SystemController
Hypervisor
DeviceDriver
DeviceServer
Client
ControlDomain
LogicalDomainsManager
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Logical Domains Architecture
Logical Domains Fundamentals 1-9Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Logical Domains Architecture
The key architectural components that make up Logical Domains include:
● Hypervisor
● Logical Domains Manager
● Logical domain channels
● OpenBoot environment
● Operating system
● Physical and virtual devices
In the sections that follow, you are introduced to each of thesecomponents and the functions they serve within the Logical Domainsarchitecture.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Logical Domains Architecture
1-10 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
The Hypervisor
The hypervisor is a firmware layer on the Flash PROM of the servermotherboard, which partitions a physical system into one or more virtualmachines (see Figure 1-4). The SPARC sun4v architecture contains a newhyper-privileged mode that enables the hypervisor to access and controlall platform devices. In this role, the hypervisor abstracts underlyinghardware and exposes a subset of system resources to each logicaldomain. In fact, logical domains can only access platform resourcesexplicitly made available by the hypervisor.
Figure 1-4 The Hypervisor
Firmware
Hardware
Kernel
User/Services
CPU, Memory, & I/O
GuestDomain
Solaris 10 8/07 or later
Application
ControlDomain
Solaris 10 8/07 or later
Application
Application
LogicalDomainsManager
Hypervisor
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Logical Domains Architecture
Logical Domains Fundamentals 1-11Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Logical Domains Manager
The Logical Domains Manager software communicates with thehypervisor and logical domains to sequence changes, such as the removalof resources or creation of a logical domain (see Figure 1-5). The LogicalDomains Manager, which resides on the control domain, provides anadministrative interface and keeps track of the mapping between thephysical and virtual devices in a system. Only one Logical DomainsManager can run on a server.
Figure 1-5 Logical Domains Manager
AppApp
AppAppLDOM
SequencerLDOM
Controller
VirtualDevice Service
DB
NexusDriver
Hypervisor
HardwareResources
Control Domain Guest Domain
Solaris 10 Solaris 10
LDoms Manager
CLI
Logical Domain Channel
VirtualDevice Driver
Virtual Nexus I/F
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Logical Domains Architecture
1-12 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Logical Domain Channel
A logical domain channel (LDC) is a point-to-point, full-duplex linkcreated by the hypervisor. Within the Logical Domains architecture, anLDC provides a data path between virtual device services and guestdomains and establishes virtual networks between logical domains (seeFigure 1-6). A unique LDC is explicitly created for each link, ensuringdata transfer isolation. Each logical domain, virtual I/O device, andnetwork device needs an LDC. With assistance from the hypervisor, datais transferred across an LDC as a simple 64-byte datagram or by usingshared memory. With the shared memory approach the data is stored inmemory and multiple domains have access to the same memory location.This is done so that you do not need multiple copies of the same data inphysical memory. The hypervisor controls access.
Figure 1-6 Logical Domain Channel
For the Sun UltraSPARC T2-based platforms, the maximum number ofLDCs available in any logical domain is 512, and for the UltraSPARC-T2Plus-based platforms the maximum number of LDCs is 768. This limit ismore relevant on the control domain, because the control domain has atleast part, if not all, of the I/O subsystem allocated to it, and because ofthe potentially large number of LDCs created for both virtual I/O datacommunications and the Logical Domains Manager’s control of the otherlogical domains.
Hypervisor
Physical Resources
Control Domain Guest Domain Guest Domain
VirtualDevice
Services
VirtualDeviceDriver
VirtualDeviceDriver
Logical Domain Channel
Logical Domain Channel
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Logical Domains Architecture
Logical Domains Fundamentals 1-13Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
The OpenBoot™ PROM Environment
The OpenBoot PROM environment forms the basis for initial programloading and execution, typically for an operating system (see Figure 1-7).It also provides other features, such as diagnostics and boot-timeparameters, to control operation. The OpenBoot ok prompt is the firstthing you see when connecting to the console of a newly created logicaldomain, and a familiar sight for those experienced in using Sun’s SPARChardware.
Figure 1-7 Guest Domain OpenBoot Environment
In the Logical Domains software, the OpenBoot PROM environment ispartitioned for each guest domain. The OpenBoot PROM interacts withthe hypervisor on startup. It is removed after the Solaris OS is started.Each logical domain runs its own OpenBoot environment.
When you boot the logical domain, the OBP passes its current device tree(both real and virtual devices) to the Solaris OS kernel. At that point the/etc/path_to_inst file is built or updated. It contains the mappingbetween how the OBP represents things and how the Solaris OSrepresents them.
Note – Each domain runs the same version of the OpenBoot PROM.
Hypervisor
Physical Resources
Control Domain Guest Domain
I/O Devices
VirtualConsoleService
OpenBoot{0}ok
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Logical Domains Architecture
1-14 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
The Operating System
Control, service, I/O, and guest domains must contain operating systemsthat understand both the sun4v platform and the virtual devicespresented by the hypervisor. Currently, for Logical Domains 1.3 this is atleast the Solaris 10 8/07 operating system with required patches for thesupported servers (see Figure 1-8).
Figure 1-8 The Operating System Physical and Virtual Devices
Note – To have all the Logical Domains 1.3 features, you need to run theSolaris 10 10/09 OS.
Firmware
Hardware
Operating System
User/Services
CPU, Memory, & I/O
GuestDomain
Solaris 10 8/07 or later
Application
Control/Service/IODomain
Solaris 10 8/07 or later
Hypervisor
Application
Application
LogicalDomainsManager
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Logical Domains Architecture
Logical Domains Fundamentals 1-15Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Physical and Virtual Devices
With Logical Domains, I/O domains will have direct access to physicalI/O devices, such as disk drives or network interfaces. These physicaldevices can then be virtualized using virtual device services and madeavailable as virtual devices to guest domains. This allows physical devicesto be shared among multiple domains, thereby providing additionalconsolidation benefits by rationalization of storage and network (and thereduction in the administrative burden involved) (see Figure 1-9).
Figure 1-9 Virtual Devices
Now that you are familiar with the Logical Domains architecture, let’slook at the steps involved in planning for your Logical Domainsenvironment.
Hypervisor
Shared CPU, Memory, & I/O
VirtualDeviceService
Solaris 10
ServiceDomain
A B
Device Driver
Nexus Driver
Virtual I/F
I/O MMUI/O BridgePCI-Express
VirtualDeviceDriver
GuestDomain
App
Solaris 10
Logical Domain Channel
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Logical Domains Planning
1-16 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Logical Domains Planning
Before you proceed with creating a Logical Domains environment, youmust first have a plan. Your plan should include configuration details,such as the number of logical domains you need, the types and amount ofresources each domain will have, the properties of your network setup,and so on. You also need to consider how to boot an OS for the guestdomains, and finally, if you are virtualizing devices, how to virtualizedevices in terms of your I/O and service domain setup.
The following are key tasks that should be part of your planningactivities:
● Identify design goals (for example, plan for high availability).
● Gather system hardware and software configuration information.
● Identify installation tasks.
● Identify configuration tasks.
● Identify administrative and maintenance tasks.
● Identify implementation resources.
Planning for your Logical Domains implementation will help youuncover and resolve potential issues before they occur, thereby reducingyour chances of encountering problems with your new Logical Domainsenvironment either before, during, or after implementation.
Identifying Design Goals
Knowing what end state your environment must have to support yourdesign goals and system requirements is a key factor in achieving asuccessful implementation. You will save both time and resources bytaking time up front to document what the end state should be.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Logical Domains Planning
Logical Domains Fundamentals 1-17Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
For example, let’s assume our primary design goal is to plan for highavailability. With this goal in mind, we might configure our new LogicalDomains production environment to look something like the exampleshown in Figure 1-10.
Figure 1-10 Logical Domains Production Environment Example
As you can see, we are planning for high availability by having twoservice domains. Each service domain provides access to the same storageand to the same network. The guest domain uses multipathing to accessthe storage and the network through either of the service domains. Thatway if a service domain is not available, the guest domain still has accessto the storage and the network through the other service domain.
The number of logical domains you create per server is based on twofactors:
● The purpose of the logical domain (what applications you intend torun).
● Available resources in the underlying system.
Secondary Service LDom
VirtualSwitch 2
Virtual DiskServer 2
Virtual SAN 2
Virtual LAN 2 Virtual LAN 1
Virtual SAN 1
Virtual DiskServer 1
VirtualSwitch 1
I/O Bridge (Leaf B) I/O Bridge (Leaf A)
Guest LDom
Hypervisor
Primary Service LDom
NIC NICStorage
PhysicalNetworkDriver
PhysicalDisk
Driver vDisk vNet2
vNet1
IPMPPhysical
DiskDriver
PhysicalNetworkDriver
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Logical Domains Planning
1-18 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Gather System Hardware and Software ConfigurationInformation
After you have identified your design goals and know what your endstate configuration is going to look like, the next task is to gather systemhardware and software configuration information and requirements.
Note – In this class you will be installing and configuring LogicalDomains 1.3 software on a Sun SPARC Enterprise T5140 server. Keep thisin mind as you review the system requirements and domain and memorysizing guidelines presented in this section.
System Requirements
The purpose of the system requirements gathering task is to answer suchquestions as “What are the supported platforms for the version of theLogical Domains Manager software that you are planning to install?” and“What software and patches are required to use all the features of theLogical Domains software you want to run?” When you complete thistask, your plan should contain the following information:
● Supported platforms for the Logical Domains Manager software youare running
● Required and recommended Solaris OS versions
● Required Solaris 10 patches
● Required software to enable any new Logical Domains features
● Minimum version of software required
● Required system firmware patches
● Location of the Logical Domains software
● Location of the patches
● Location of any supporting documentation
The Release Notes contain all of this information. It is a good practice toalways read the Release Notes for the latest system requirements.
?!
Discussion – Take a moment to review the Release Notes for LogicalDomains 1.3 software provided in the files installed on your workstationfor this class. You will need this information for the first lab activity.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Logical Domains Planning
Logical Domains Fundamentals 1-19Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Note – For additional information about the hardware platforms that canrun Logical Domains and their capabilities, see Section 1 - Hardware ofthe LDoms Community Cookbook(http://wikis.sun.com/display/SolarisLogicalDomains/Section+1+%28NEW%29+-+Hardware).
During the logical domains configuration process, you map physicalsystem devices to virtual devices and then bind the virtual devices to thedomains. To map the devices correctly, you must have a goodunderstanding of how the devices are configured on the underlyingplatform. Once you have identified the platform you will be using, takethe time to familiarize yourself with the device pathing requirements forthat system and include this information in your plan.
?!
Discussion – Take a moment to study the device locations on the rear andfront panels of the Sun SPARC Enterprise T5140 server in the figures thatfollow. You will need this information for the first lab activity. Also,review the device pathing information that is provided for the T5140.
Sun SPARC Enterprise T5140 Server Example
The Sun SPARC Enterprise T5140 Server begins the next wave of high-efficiency systems based on the second generation of Sun's Chip Multi-threaded Technology (CMT). The Sun SPARC Enterprise T5140 serverutilizes multiple UltraSPARC-T2 Plus processors. Because the system hasmultiple chips, it uses cache coherency protocols via connections betweenthe chips to manage the sharing of data. Figure 1-11 and Figure 1-12 showthe location of devices accessed from the front and rear panels.
Figure 1-11 Sun SPARC Enterprise T5140 Server Device Locations FrontPanel
Locator LED/Locator Button
Disk Drive MapDVD Drive
PowerButton
Power/OK LED
Service ActionRequired LED
HDD0 HDD1Disk Drives
HDD2 HDD3 Power Supply Service LEDSystem Overtemperature LEDFan Module Service LED
Disk Drives
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Logical Domains Planning
1-20 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Figure 1-12 Sun SPARC Enterprise T5140 Server Device Locations RearPanel
Table 1-1 provides the device and slot mapping for the T5140 (1U) andT5240 (2U) systems.
Power Supply0 1
Rear Panel LEDs
PCIe/XAUI 0 PCIe/XAUI 1 PCIe 2
Serial PortUSB Ports
0 1Gigabit
Ethernet Ports
0 1 2 3NetworkMgmt Port
PowerSupply LEDs
SerialMgmt Port
Table 1-1 T5140/T5240 PCI-E Device/Slot Map
Device Name Device Path
PCI-E to PCI-E Switches (PLX8548) /pci@400/pci@0/ (switch 0)
/pci@500/pci@0/ (switch 1)
PCI-E Gigabit Ethernet Adapter(Neptune)
/pci@500/pci@0/pci@8/network@0 (net0)
/pci@500/pci@0/pci@8/network@0,1 (net1)
/pci@500/pci@0/pci@8/network@0,2 (net2)
/pci@500/pci@0/pci@8/network@0,3 (net3)
10 Gigabit Ethernet Option /pci@500/pci@0/pci@8/network@0 (XAUI)
/pci@500/pci@0/pci@8/network@0,1 (XAUI)
Internal SAS Disk 0 /pci@400/pci@0/pci@8/scsi@0/sd@0,0
Internal SAS Disk 1 /pci@400/pci@0/pci@8/scsi@0/sd@1,0
Internal SAS Disk 2 /pci@400/pci@0/pci@8/scsi@0/sd@2,0
Internal SAS Disk 3 /pci@400/pci@0/pci@8/scsi@0/sd@3,0
CD/DVD /pci@400/pci@0/pci@1/pci@0/usb@0,2/storage@2/disk@0:f
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Logical Domains Planning
Logical Domains Fundamentals 1-21Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
The T5140/T5240 have all Ethernet ports on pci@500 and all the harddisks are located at pci@400. Both the T5140 and T5240 systems can beconfigured with two I/O domains, with the on-board network interfacesconnected to one I/O domain and the internal disks connected to theother.
Note – For device path information for other Sun platforms, seeSolaris[TM] Operating System: Matrix of Recognized Device Paths(http://sunsolve.sun.com/search/document.do?assetkey=1-61-208209-1).
PCI-E Slots PCIE Slot 0: /pci@500/pci@0/pci@9 (1U & 2U)
PCIE Slot 1: /pci@400/pci@0/pci@c (1U & 2U)
PCIE Slot 2: /pci@400/pci@0/pci@9 (1U & 2U)
PCIE Slot 3: /pci@400/pci@0/pci@d (2U only)
PCIE Slot 4: /pci@500/pci@0/pci@d (2U only)
PCIE Slot 5: /pci@500/pci@0/pci@c (2U only)
Table 1-1 T5140/T5240 PCI-E Device/Slot Map
Device Name Device Path
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Logical Domains Planning
1-22 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Domain Sizing Guidelines
Another important piece of information you will need as part of planningis the number of virtual CPUs you can assign to each domain. With ChipMultithreaded (CMT) systems, each of the cores of the system containmultiple processing strands. The strands in a core work as a team toswitch through the workloads, one each cycle, so it is important to keepthe strands together. This approach is particularly effective for workloadsthat have many threads and where performance is impacted to asignificant degree by memory latency. Figure 1-13 illustrates the ChipMultithreading execution model for a single core in a Sun SPARCEnterprise T5140 server with an UltraSPARC T2+ processor.
Figure 1-13 Chip Multithreaded Execution Model
In a CMT system, the impact of memory latency can be reduced byswitching to other processing strands to perform useful work whilewaiting for memory. From a Logical Domains Manager perspective, eachof the threads in a system appear to be virtual CPUs, and, as such, can beallocated independently to any domain in the system.
C
C M C M C MThread 1
Single Threaded Processor
Time
M
Compute Time
Cache/Memory Latency
C M C M C MThread 1
C M C M C MThread 2
C M C M C MThread 3
Thread 4
Thread 5
Thread 6
Thread 7
Thread 8
C M C M C M
C M C M C M
C M C M C M
C M C M C M
C M C M C M
UltraSPARC T2-Plus Systems CMT Processor (Single core shown)
Time
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Logical Domains Planning
Logical Domains Fundamentals 1-23Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Running threads from the same core in separate domains can lead tounpredictable and poor performance. For that reason, when creating adomain with eight virtual CPUs, ensure that the virtual CPUs come fromthe same core to provide the best performance. Because the LogicalDomains Manager adds from the lowest virtual CPU and removes fromhighest, in terms of the CPU ID, it is possible to create several domains ina way that can break the core/thread affinity model.
Following are guidelines for determining the number of CPUs/cores toassign to domains.
The number of CPUs required for each domain mostly depends onapplications and workload running on that domain. However, a bestpractice is to assign entire CPU cores to domains. So the minimumguideline is to assign a minimum of one CPU core to each domain.
Note – Depending on the CPU chip and system type, the number of CPUthreads per CPU core can be different. See the Sun SPARC EnterpriseServer table in the LDom Community Cookbook, Section 1, SystemOverview for a listing of number of cores and threads by system(http://wikis.sun.com/display/SolarisLogicalDomains/Section+1+%28NEW%29+-+Hardware).
● A service domain will provide virtual device services to otherdomains, and it will have to process any virtual I/O (such as virtualdisk or virtual network requests) for domains it is servicing. As suchit is more likely to have a more important workload, especially ifapplications running in other domains are very I/O intensive. Theguideline in that case is to assign a minimum of two CPU cores to aservice domain.
● An I/O domain requires a minimum of one CPU core. However, if anI/O domain is also used as a service domain, the CPU requirementfor a service domain has to be applied (that is, a minimum of twoCPU cores). Also, if an I/O domain has a lot of I/O devices, thenumber of CPUs might have to be increased to better handle the I/Orequests (for example, an I/O domain with a lot of 10-Gbit Ethernetinterfaces can have a lot of network interrupts to process and requiremore CPUs).
● The control domain is an I/O domain, and it does not have anyadditional CPU requirement. So the number of CPUs required alsodepends on the application and workload use, with a minimum of
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Logical Domains Planning
1-24 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
one CPU core. But, similarly, if the control domain is used as aservice domain, then an additional CPU is required (that is, aminimum of two CPU cores).
It is also recommended to have a cryptographic unit (also referred toas a Modular Arithmetic Unit or MAU) for each CPU core assignedto the control domain. This is useful for migration purposes.
The number of virtual CPUs assigned to a domain can be changed afterthe domain has been created. Virtual CPUs can be dynamically added orremoved from a domain without having to stop, restart, or interrupt thedomain. You might want to provision additional CPUs so that you canadd more CPUs to a domain later if, for example, that domain has a moreimportant workload.
Memory Sizing Guidelines
As part of your planning you will also want to determine the amount ofmemory required for each domain. Logical Domains software does notimpose a minimum memory size limitation when creating a domain. Thememory size requirement is a characteristic of the guest operating system.For recommended and minimum size memory requirements, refer to theinstallation guide for the operating system you are using.
You will want to keep the following information in mind whendetermining the amount of memory required for each domain:
● The amount of memory the operating system requires
● Applications running in the logical domain will have their ownminimum memory size requirements.
Following are guidelines for determining the amount of memory requiredfor each domain.
The amount of memory required for each domain mostly depends onapplications and workload running on that domain. The SolarisOperating System requires a minimum of 1 Gbyte of memory. So that willbe the minimum amount of memory to assign to one domain.
● A service domain will provide virtual device services to otherdomains, and it will have to process any virtual I/O (such as virtualdisk or virtual network requests) for domains it is servicing. As suchit is more likely to have a more important workload, especially if
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Logical Domains Planning
Logical Domains Fundamentals 1-25Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
applications running in other domains are very I/O intense. Theguideline in that case is to assign a minimum of 2 Gbytes of memoryto a service domain.
● An I/O domain does not have any special memory requirement, sothe amount of memory required depends on the application andworkload use, with a minimum of 1 Gbyte of memory for runningthe Solaris OS. However, if an I/O domain is also used as a servicedomain, then the memory requirement for a service domain has tobe applied (that is, a minimum of 2 Gbytes of memory).
● The control domain is an I/O domain, and it does not have anyadditional memory requirement. So the amount of memory requiredalso depends on the application and workload use, with a minimumof 1 Gbyte of memory for running the Solaris OS. But, similarly, ifthe control domain is used as a service domain, then the memoryrequirement for a service domain has to be applied (that is, aminimum of 2 Gbytes of memory).
The amount of memory assigned to a domain can be changed after thedomain has been created. However, the Logical Domains software doesnot currently support dynamic reconfiguration of memory, so changingthe amount of memory assigned to an active domain requires that domainto be restarted for the change to take effect.
Sizing Guidelines Summary
Table 1-2 presents the minimum guidelines to size a domain dependingon its role. If a domain assumes several roles (for example, a controldomain that is also an I/O domain and a service domain), then the mostrestrictive guideline should be selected.
(*) If the domain is also a service domain, the guideline for the servicedomain has to be selected.
Table 1-2 Sizing Guidelines
Domain Role Memory CPUs
Control domain 1GB* 1 core*
I/O domain 1GB* 1 core*
Service domain 2GB 2 cores
Guest domain 1GB 1 core
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Logical Domains Planning
1-26 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Additional Configuration Planning Considerations
Additional Applications in the Control and Service Domains
When upgrading an existing system to provide Logical Domainsfunctionality, pre-existing applications might be present in the newlyestablished control domain. Running these applications within the newlyestablished control domain might not be desirable for several reasons.First, a lot of resources can be required to handle virtual I/Os, and we donot want to have to compete with other applications for resources.Second, extra applications create attack vectors for someone attempting tocompromise the server. Keep in mind that if someone can gain access tothe root account on the control domain, that individual has access to notonly the control domain but to all of the other domains as well.
Supported Network Adapters
In a Logical Domains environment the virtual switch service, running in aservice domain, can directly interact with network adapters that complywith Generic LAN Driver version 3 (GLDv3).
Though non-GLDv3 compliant network adapters can be used in thesesystems, the virtual switch cannot interface with them directly.
To determine if a network adapter is GLDv3-compliant:
1. Use the Solaris OS dladm(1M) command, where, for example, nxge0is the network device name.
# dladm show-link nxge0
nxge0 type: non-vlan mtu: 1500 device: nxge0
2. Look at type: in the output.
● GLDv3-compliant drivers will have a type of non-vlan orvlan.
● Non-GLDv3-compliant drivers will have a type of legacy.O
racl
e U
nive
rsity
and
BO
S-it
Gm
bH &
Co.
KG u
se o
nly
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Logical Domains Planning
Logical Domains Fundamentals 1-27Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Range of MAC Addresses Assigned to Logical DomainsSoftware
Logical domains have been assigned the following block of 512K MACaddresses:
00:14:4F:F8:00:00 ~ 00:14:4F:FF:FF:FF
The lower 256K addresses are used by the Logical Domains Manager forautomatic MAC address allocation, and you cannot manually request anaddress in this range:
00:14:4F:F8:00:00 - 00:14:4F:FB:FF:FF
You can use the upper half of this range for manual MAC addressallocation:
00:14:4F:FC:00:00 - 00:14:4F:FF:FF:FF
When you do not specify a MAC address when you create a logicaldomain or a network device, the Logical Domains Manager automaticallyallocates and assigns a MAC address to that logical domain or networkdevice.
Identify Installation Tasks
After you have gathered all your system hardware and softwareconfiguration information and requirements, you will want to identifyyour installation tasks. For Logical Domains these tasks would include thefollowing:
● Verifying the correct build of the Solaris OS
● Checking the system firmware
● Installing the Logical Domains Manager
● Ensuring security on the Logical Domains system is enabled
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Logical Domains Planning
1-28 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
As part of this planning step you will want to gather as much informationas possible as to what actions are required to complete each task. A goodpractice is to read through the appropriate sections of the LogicalDomains Administration Guide and make note of any considerations thatmight impact your plan.
In Module 2 of this course you are given the opportunity to complete eachof the installation tasks using the Logical Domains 1.3 software and aT5140 server.
Identify Configuration Tasks
After you have identified the installation tasks you will need to completeas part of your Logical Domains implementation, you will need toidentify your configuration tasks. These tasks are based on the designgoals you have set. At a minimum you should plan to complete thefollowing tasks:
● Configure the control and service domain, which includes:
● Configuring the control domain’s resources
● Enabling virtual services
● Saving the configuration to the system controller
● Enabling networking between the control/service domain andother domains
● Enabling the virtual network terminal server daemon
● Create guest domains, which includes:
● Creating and starting a guest domain
● Installing the Solaris OS on a guest domain using JumpStart
● Verifying the guest domain configuration
As part of this planning step you will want to ensure that yourconfiguration tasks are complete and fully support your designrequirements. Review the configuration sections of the Logical DomainsAdministration Guide and make note of any considerations that mightimpact your design or plan.
In modules 3 and 4 of this course you are given the opportunity tocomplete each of the configuration tasks in the previous lists using theLogical Domains 1.3 product and a T5140 server.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Logical Domains Planning
Logical Domains Fundamentals 1-29Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Identify Administrative and Maintenance Tasks
The on-going administrative and maintenance tasks you identify as partof your Logical Domains planning will be based on your company’spolicies and specific needs and requirements. At a minimum your planshould identify what the tasks are and the frequency with which theyshould be performed.
In modules 5 and 6 of this course you are introduced to a number ofadministrative tasks associated with Logical Domains. You are given theopportunity to perform a number of these tasks in the lab exercise thatfollows Module 6.
Identify Implementation Resources
The final step in the planning process is to identify the resources you willneed to implement your plan. Depending on the size and complexity ofthe environment in which you are working, you will need to consider thefollowing:
● Time required to install and configure the Logical Domains system
● Resources needed to perform the installation and configuration
● Impact to applications running on the Logical Domains server(downtime)
● Scheduled day and time to perform and test the implementation
● Communication to management on scheduled implementation
● Resources required to sustain environment (that is, resourcesrequired to perform on-going administrative and maintenance tasks)
Once you have completed your plan and have had it approved bymanagement, you are ready to implement your design. You will find thathaving spent the time up front in planning your approach will make theimplementation and maintenance of your new Logical Domainsenvironment go more smoothly.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Logical Domains Planning
1-30 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Notes:
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
2-1Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Module 2
InstallingLogicalDomains Software
Objectives
This module describes how to install the different software componentsrequired to enable the Logical Domains (LDoms) 1.3 software on a newsystem.
Upon completion of this module, you should be able to:
● Verify the correct build of the Solaris OS.
● Check the system firmware.
● Install the Logical Domains Manager software.
● Identify Logical Domains security features.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Additional Resources
2-2 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Additional Resources
The following references provide additional information about the topicsdescribed in this module:
● Logical Domains 1.3 Administration Guide, Part No: 821-0406-10
● Logical Domains 1.3 Release Notes, Part No: 821-0404-10
● Logical Domains 1.3 Reference Manual, Part No: 821-0405-10
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Introduction
Installing Logical Domains Software 2-3Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Introduction
After you have completed your Logical Domains planning and have agood idea of what you want your Logical Domains environment to looklike, the next step is to install the different software components requiredto install and enable the Logical Domains (LDoms) software on yoursystem. In this module you will be shown how to enable the LDoms 1.3software on a T5140 server. You will then be given the opportunity toapply what you have learned by completing a lab exercise.
Note – Logical Domains 1.3 is not supported on T1 systems (T1 systemshave been end-of-lifed). However, older versions of the Logical Domainsproduct can still be run on T1 systems (up to Logical Domains 1.2).
Before we get started, there are a few things you need to know. Using theLDoms software requires the following components:
● Supported server running an operating system at least equivalent tothe Solaris 10 10/09 OS with any patches recommended in“Required Software and Patches” in the Logical Domains 1.3 ReleaseNotes.
● System firmware Version 7.2.4 at a minimum for your SunUltraSPARC T2 or T2 Plus platform; however, Version 7.2.7 isrecommended.
● Logical Domains 1.3 software installed and enabled on the server.
The Solaris OS and the system firmware must be installed or upgraded onyour server before you install the Logical Domains Manager software.
The UltraSPARC T2 and UltraSPARC T2 Plus come pre-installed with theappropriate firmware and software for using LDoms. Therefore, LDomscan be used out of the box. You only need to update the firmware or thesoftware when you want to update to the latest version of LDoms. Forinformation about how to upgrade the LDoms software components, seethe “Installing and Enabling Software” chapter in the Logical Domains 1.3Administration Guide.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Introduction
2-4 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Initially, a Sun platform that supports the Logical Domains softwareappears as a single system hosting only one operating system. After theSolaris OS, system firmware, and Logical Domains Manager softwarehave been installed, the original system and instance of the Solaris OSbecome the control domain. That first domain on the platform is namedprimary. You cannot change that name or destroy that domain. Fromthere, the platform can be reconfigured to have multiple domains hostingdifferent instances of the Solaris OS.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Verifying the Correct Build of the Solaris OS
Installing Logical Domains Software 2-5Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Verifying the Correct Build of the Solaris OS
The first task associated with installing the Logical Domains software on anew system is to verify that you have the correct version of the Solaris OSthat supports the Logical Domains Manager and advanced features likedynamic reconfiguration. As you discovered during your softwareinformation and requirements gathering, you must have the Solaris 1010/09 OS (or the equivalent patch level) with any patches recommendedto run Logical Domains 1.3 on your system.
To check the release of the Solaris OS present on your system, run thefollowing command:
# cat /etc/release
If you need to upgrade your system to the Solaris 10 OS required for the1.3 version of the Logical Domains software, refer to “Required Softwareand Patches” in Logical Domains 1.3 Release Notes. The Release Notes willalso list any required and recommended patches.
You can use any normal process of installation for the server, includingJumpStart, network, DVD or CD, or upgrading from a previous version.Select the Entire Distribution for a regular installation or SUNWCall for aJumpStart installation.
Note – For complete instructions for upgrading the Solaris OS, refer to theSolaris 10 10/09 Release and Installation Collection(http://docs.sun.com/app/docs/coll/1236.11).
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Checking the System Firmware
2-6 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Checking the System Firmware
After you have verified that you have the correct build of the Solaris OS,the next thing you want to do is to check that you have the right versionof the system firmware. During planning, you should have noted whatversion of the firmware you needed by checking the “Required SystemFirmware Patches” section in Logical Domains 1.3 Release Notes.
Once you know what version of the firmware you need, you can check tosee what version you have on your system using one of the followingapproaches:
● Enter the following command on the Integrated Lights Out Manager(ILOM):
-> show /HOST
● Enter the following command on the Advanced Lights Out Manager(ALOM):
sc> showhost
Note – Servers now use the ILOM service processor, which hascommands different from the ALOM system controller. However, theILOM has an ALOM compatibility mode so you can still use the ALOMcommands which remain unchanged.
If you don’t have the right version, you will need to upgrade the systemfirmware. In this section you are shown two ways to upgrade the systemfirmware:
● From the operating system
● From a local TFTP server using system controller commands
Note – Another approach to checking and upgrading the system firmwareis to launch a browser and connect to the Sun Integrated Lights OutManager WebGUI. In the lab exercise at the end of this module you willhave the opportunity to use this approach.
You can find system firmware for your platform at the SunSolvesm site(http://sunsolve.sun.com).
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Checking the System Firmware
Installing Logical Domains Software 2-7Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Upgrading System Firmware From the Operating System
To upgrade the system firmware from the operating system, perform thefollowing steps:
1. In the system console window, access the system controller.
2. From the system controller, open a console session on the system.
Using ILOM:
-> start /SP/console
Using ALOM:
sc> console -f
3. Log in to the operating system as root.
Console Window: rootPassword:...
4. Navigate to the /opt/ses/firmware directory.
# cd /opt/ses/firmware
5. Copy the firmware package 139444-07.zip to the /var/tmpdirectory and unzip the file.
# cp 139444-07.zip /var/tmp# cd /var/tmp# unzip 139444-07.zip
6. Change to the 139444-07 directory.
# cd 139444-07# ls
Note – The Sun_System_Firmware-7_2_7_b-SPARC_Enterprise_T5140+T5240.pkg file contains the system controllerfirmware.
7. Run the sysfwdownload -u command to download and update thesystem controller firmware.
# ./sysfwdownload -u Sun_System_Firmware-7_2_7_b-SPARC_Enterprise_T5140+T5240.pkgWARNING: Host will be powered down for automaticfirmware update when download is completed.Do you want to continue(yes/no)? yes
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Checking the System Firmware
2-8 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
The -u option automatically performs these tasks:
● Downloads the system firmware image
● Powers down the host
● Updates the system firmware
● Resets the system controller
● Powers the host back on
Note – The system controller takes a few minutes to complete thefirmware update operation.
Upgrading System Firmware With a TFTP Server
The steps for upgrading the system firmware with a TFTP server are asfollows:
1. Shut down and power off the host server operating system.
# shutdown -i0 -g0 -y
2. Use the #. escape sequence to return to the system controller.
3. Power down the system.
Using ILOM:
-> cd /SYS-> stop /SYSDo you want to stop SYS (y/n)? y
Using ALOM:
sc> poweroff -fy
4. Upgrade the system firmware, depending on your server.
Refer to your platform documentation for information about how toupdate your firmware.
Sample ILOM command:
-> load -source tftp://IP-address/Firmware_File
Sample ALOM command:
sc> flashupdate -s IP-address -f path/Firmware_File
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Checking the System Firmware
Installing Logical Domains Software 2-9Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Where:
● IP-address is the IP address of your TFTP server.
● path is the location in SunSolve or your own directory whereyou can obtain the system firmware image.
5. Reset the service processor.
Using ILOM:
-> cd /SP-> reset
Using ALOM:
sc> resetsc -y
6. Log back in to the system controller.
7. Power on the system.
Using ILOM:
-> cd /SYS-> start /SYS
Using ALOM:
sc> poweron -c
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Installing the Logical Domains Manager Software Packages
2-10 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Installing the Logical Domains Manager SoftwarePackages
After you have checked the system firmware, the next task is to install theLogical Domains Manager software packages. To complete this task, youwill need to do the following:
● Download the Logical Domains Manager software package.
● Install the Logical Domains Manager software packages.
● Ensure the Logical Domains Manager daemon is enabled.
● Ensure security on the Logical Domains system is enabled.
Let’s look at how to perform each of these procedures.
Downloading the Logical Domains Manager SoftwarePackage
The steps for downloading the Logical Domains Manager softwarepackage are as follows:
1. Download the zip file (LDoms_Manager-1_3.zip) from the SunSoftware Download site.
You can find the software athttp://www.sun.com/servers/coolthreads/ldoms/index.jsp.
2. Unzip the zip file.
$ unzip LDoms_Manager-1_3.zip
The Logical Domains Manager 1.3 software includes the SUNWldmand SUNWldmp2v packages.
See “Location of LDoms 1.3 Software” in Logical Domains 1.3 ReleaseNotes for details about the structure of the file and what it includes.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Installing the Logical Domains Manager Software Packages
Installing Logical Domains Software 2-11Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Installing the Logical Domains Manager SoftwarePackages
After you have downloaded the Logical Domains Manager softwarepackage, you can install the software. There are two methods of installingthe Logical Domains Manager software that we will focus on in thiscourse:
● Using the installation script to install the packages and patches. Thisautomatically installs the Logical Domains Manager software.
● Installing the package manually.
Let’s take a look at each method.
Installing the Logical Domains Manager Software Using theInstallation Script
If you use the install-ldm installation script, you have several choicesto specify how you want the script to run. Each choice is described in theprocedures that follow.
● Using the install-ldm script with no options does the followingautomatically:
● Checks that the Solaris OS release is Solaris 10 10/09 OS at aminimum
● Verifies that the package subdirectories SUNWldm/ andSUNWldmp2v/ are present
● Verifies that the prerequisite Solaris Logical Domains driverpackages, SUNWldomr and SUNWldomu, are present
● Verifies that the SUNWldm and SUNWldmp2v packages have notbeen installed
● Installs the Logical Domains Manager 1.3 software
● Verifies that all packages are installed
● If the Solaris Security Toolkit (SUNWjass) is already installed,you are prompted to harden the Solaris OS on the controldomain.
● Determine whether to use the Logical Domains ConfigurationAssistant (ldmconfig) to perform the installation.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Installing the Logical Domains Manager Software Packages
2-12 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Note – For information about the Logical Domains ConfigurationAssistant, see the description at the end of this procedure.
● Using the install-ldm script with the -c option installs thesoftware by using the Logical Domains Configuration Assistant.
● Using the install-ldm script with the -s option skips the runningof the Logical Domains Configuration Assistant.
Logical Domains Configuration Assistant
The Logical Domains Configuration Assistant leads you through theconfiguration of a logical domain by setting basic properties. It can beused to configure any system where the Logical Domains software isinstalled but not already configured.
After gathering the configuration data, the Configuration Assistant createsa configuration that is suitable for booting as a logical domain. You canalso use the default values selected by the Configuration Assistant tocreate a usable system configuration.
The Configuration Assistant is available as both a graphical user interface(GUI) and terminal-based tool.
For more information, see Appendix D, “Logical Domains ConfigurationAssistant,” in the Logical Domains 1.3 Administration Guide and theldmconfig(1M) man page.
Installing the Logical Domains Manager Software PackagesManually
This procedure assumes you have downloaded the Logical DomainsManager 1.3 software, the SUNWldm and SUNWldmp2v packages, from theSun Software Download site.
The steps for installing the Logical Domains Manager software packagesmanually are as follows:
1. Use the pkgadd command to install the SUNWldm.v and SUNWldmp2vpackages.
For more information about the pkgadd command, see thepkgadd(1M) man page.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Installing the Logical Domains Manager Software Packages
Installing Logical Domains Software 2-13Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
The -G option installs the package in the global zone only and the -doption specifies the path to the directory that contains the SUNWldm.vand SUNWldmp2v packages.
# pkgadd -Gd . SUNWldm.v SUNWldmp2v
Note – Installation of the SUNWldmp2v package is optional. This package isnot required for using LDoms, it is only needed to use the LDoms P2Vtool.
2. Answer y for yes to all questions in the interactive prompts.
3. Use the pkginfo command to verify that the Logical DomainsManager 1.3 packages, SUNWldm and SUNWldmp2v, are installed.
For more information about the pkginfo command, see thepkginfo(1) man page.
The revision (REV) information shown below is an example.
# pkginfo -l SUNWldm | grep VERSIONVERSION=1.3,REV=2009.12.03.10.20
Ensuring the Logical Domains Manager Daemon isEnabled
The install-ldm installation script automatically enables the LogicalDomains Manager daemon (ldmd). The ldmd daemon is alsoautomatically enabled when the SUNWldm package is installed. Whenenabled, you can create, modify, and control the logical domains.
If the ldmd daemon has been disabled, you can use the followingprocedure to enable it.
1. Use the svcadm command to enable the Logical Domains Managerdaemon, ldmd.
# svcadm enable ldmd
For more information about the svcadm command, see thesvcadm(1M) man page.
2. Use the ldm list command to verify that the Logical DomainsManager is running.
# ldm listNAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIMEprimary active ---c- SP 64 3264M 0.3% 19d 9m
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Installing the Logical Domains Manager Software Packages
2-14 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
The ldm list command should list all domains that are currentlydefined on the system. In particular, the primary domain should belisted and be in the active state. The sample output presented in step2 shows that only the primary domain is defined on the system.
Ensuring Security on a Logical Domains System isEnabled
The Logical Domains Manager has two levels of authorization that areenabled during installation:
● Read – Allows you to view, but not modify the configuration.
● Read and write – Allows you to view and change the configuration.
By default, the root user has read and write authorization while all otherusers have read-only authorization.
Following are the Logical Domains entries automatically added to theSolaris OS /etc/security/auth_attr file:
● solaris.ldoms.:::LDom administration::
● solaris.ldoms.grant:::Delegate LDom configuration::
● solaris.ldoms.read:::View LDom configuration::
● solaris.ldoms.write:::Manage LDom configuration::
You can set up authorization and profiles and assign roles for useraccounts using the Solaris OS Role-Based Access Control (RBAC) adaptedfor the Logical Domains Manager. For more information about RBAC,refer to the Solaris 10 System Administrator Collection(http://docs.sun.com/app/docs/coll/47.16)
To find out more about how to add authorization for additional users andmanage user profiles on your Logical Domains system as well as how toenable other security features, see the “Security” chapter in the LogicalDomains 1.3 Administration Guide.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
The Logical Domains Manager ldmCommand
Installing Logical Domains Software 2-15Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
The Logical Domains Manager ldmCommand
The Logical Domains Manager uses a command-line interface (CLI) tocreate, configure, and manage logical domains. The CLI is a singlecommand, ldm, that has multiple subcommands.
The general syntax for the ldm command is:
ldm [--help] subcommand [options] [properties] operands
Where:
● --help displays command details
● subcommand specifies the action to be performed
● options are used to modify the subcommand operation
● properties are used to tailor the characteristics of the targetspecified by the operand
● operands identify the target of the command.
Note – For a complete listing of the ldm command subcommands, see theldm(1M) man page.
The Logical Domains Manager daemon, ldmd, must be running to use theLogical Domains Manager CLI.
?!
Discussion – Your instructor will now take a few minutes to introduceyou to the ldm command and familiarize you with some of the morecommon subcommands using the command usage statement output thatfollows. The instructor will also explain the use of aliases and shortcuts.
primary# ldm
Usage: ldm [--help] command [options] [properties] operands ldm -V
Options: -V Display version information
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
The Logical Domains Manager ldmCommand
2-16 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Command(s) for each resource (aliases in parens):
bindings list-bindings [-e] [-p] [<ldom>...]
services list-services [-e] [-p] [<ldom>...]
constraints list-constraints ([-x] | [-e] [-p]) [<ldom>...]
devices list-devices [-a] [-p] [cpu] [crypto|mau] [memory] [io]
domain ( dom ) add-domain (-i <file> | [mac-addr=<num>] [hostid=<num>] [failure-policy=<ignore|stop|reset|panic>] [master=<master_ldom1,...,master_ldom4>] <ldom>...) set-domain (-i <file> | [mac-addr=<num>] [hostid=<num>] [failure-policy=<ignore|stop|reset|panic>] [master=<master_ldom1,...,master_ldom4>] <ldom>) remove-domain (-a | <ldom>...) list-domain [-e] [-l] [-o <format>] [-p] [<ldom>...] ’format’ is one or more of: console,cpu,crypto,disk,domain,memory,network,physio, resmgmt,serial,status start-domain (-a | -i <file> | <ldom>...) stop-domain [-f] (-a | <ldom>...) bind-domain (-i <file> | <ldom>) unbind-domain <ldom> panic-domain <ldom> migrate-domain [-n] [-p <password_file>] <source_ldom> [<user>@]<target_host>[:<target_ldom>]
io add-io [bypass=on] <bus> <ldom> remove-io <bus> <ldom>
crypto ( mau ) add-crypto <number> <ldom> set-crypto <number> <ldom> remove-crypto <number> <ldom>
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
The Logical Domains Manager ldmCommand
Installing Logical Domains Software 2-17Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
memory ( mem ) add-memory <number>[GMK] <ldom> set-memory <number>[GMK] <ldom> remove-memory <number>[GMK] <ldom>
operation cancel-operation (migration | reconf) <ldom>
policy add-policy [enable=yes|no] [priority=<value>] [attack=<value>] [decay=<value>] [elastic-margin=<value>] [sample-rate=<value>] [tod-begin=<hh>:<mm>[:<ss>]] [tod-end=<hh>:<mm>[:<ss>]] [util-lower=<percent>] [util-upper=<percent>] [vcpu-min=<value>] [vcpu-max=<value>] name=<policy-name> <ldom>... set-policy [enable=[yes|no]] [priority=[<value>] [attack=[<value>]] [decay=[<value>]] [elastic-margin=[<value>]] [sample-rate=[<value>]] [tod-begin=[<hh>:<mm>:<ss>]] [tod-end=[<hh>:<mm>:<ss>]] [util-lower=[<percent>]] [util-upper=[<percent>]] [vcpu-min=[<value>]] [vcpu-max=[<value>]] name=<policy-name> <ldom>... remove-policy [name=]<policy-name>... <ldom>
reconf cancel-reconf <ldom>
spconfig ( config ) add-spconfig [-r <autosave>] <config_name> set-spconfig <config_name> remove-spconfig [-r] <config_name> list-spconfig [-r [<autosave>]]
variable ( var ) add-variable <var_name>=<value>... <ldom> set-variable <var_name>=<value>... <ldom> remove-variable <var_name>... <ldom> list-variable [<var_name>...] <ldom>
vconscon ( vcc ) add-vconscon port-range=<x>-<y> <vcc_name> <ldom> set-vconscon port-range=<x>-<y> <vcc_name> remove-vconscon [-f] <vcc_name>
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
The Logical Domains Manager ldmCommand
2-18 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
vconsole ( vcons ) set-vconsole [port=[<port-num>]] [group=<group>][service=<vcc_server>] <ldom>
vcpu add-vcpu <number> <ldom> set-vcpu <number> <ldom> remove-vcpu <number> <ldom>
vdisk add-vdisk [timeout=<seconds>] [id=<diskid>]<disk_name> <volume_name>@<service_name> <ldom> set-vdisk [timeout=<seconds>][volume=<volume_name>@<service_name>] <disk_name> <ldom> remove-vdisk [-f] <disk_name> <ldom>
vdiskserver ( vds ) add-vdiskserver <service_name> <ldom> remove-vdiskserver [-f] <service_name>
vdpcc ( ndpsldcc ) add-vdpcc <vdpcc_name> <service_name> <ldom> remove-vdpcc [-f] <vdpcc_name> <ldom>
vdpcs ( ndpsldcs ) add-vdpcs <vdpcs_name> <ldom> remove-vdpcs [-f] <vdpcs_name>
vdiskserverdevice ( vdsdev ) add-vdiskserverdevice [-f] [options={ro,slice,excl}][mpgroup=<mpgroup>] <backend> <volume_name>@<service_name> set-vdiskserverdevice [-f] [options=[{ro,slice,excl}]][mpgroup=[<mpgroup>]]<volume_name>@<service_name> remove-vdiskserverdevice [-f] <volume_name>@<service_name>
vnet add-vnet [mac-addr=<num>] [mode=hybrid] [pvid=<pvid>] [vid=<vid1,vid2,...>] [mtu=<mtu>] [linkprop=phys-state] [id=<networkid>] <if_name> <vswitch_name> <ldom> set-vnet [mac-addr=<num>] [mode=[hybrid]] [pvid=[<pvid>]] [vid=[<vid1,vid2,...>]] [mtu=[<mtu>]] [linkprop=[phys-state]] [vswitch=<vswitch_name>] <if_name> <ldom> remove-vnet [-f] <if_name> <ldom>
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
The Logical Domains Manager ldmCommand
Installing Logical Domains Software 2-19Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
vswitch ( vsw ) add-vswitch [default-vlan-id=<vid>] [pvid=<pvid>][vid=<vid1,vid2,...>] [mac-addr=<num>] [net-dev=<device>] [linkprop=phys-state] [mode=<mode>] [mtu=<mtu>] [id=<switchid>] <vswitch_name><ldom> set-vswitch [pvid=[<pvid>]] [vid=[<vid1,vid2,...>]] [mac-addr=<num>] [net-dev=[<device>]] [mode=[<mode>]] [mtu=[<mtu>]] [linkprop=[phys-state]] <vswitch_name> remove-vswitch [-f] <vswitch_name>
Verb aliases: Alias Verb ----- ------- rm remove ls list
Command aliases: Alias Command ----- ------- cancel-op cancel-operation create add-domain modify set-domain destroy remove-domain remove-reconf cancel-reconf start start-domain stop stop-domain bind bind-domain unbind unbind-domain panic panic-domain migrate migrate-domain#
Note – You can also find the ldm command and subcommand informationin the Logical Domains 1.3 Reference Manual located in the files installed onyour workstation for this class.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
2-20 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Applying What You Have Learned – Lab Exercise
Now that you know how to install the Logical Domains software and arefamiliar with the ldm command, try applying what you have learned inthe lab exercise that follows.
In this exercise, you will perform the following tasks:
● Gather system hardware and software configuration information.
● Upgrade the system controller firmware.
● Install operating system patches.
● Install the Logical Domains Management software.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
Installing Logical Domains Software 2-21Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Preparation
During this exercise you work with lab equipment located in Sun’sRemote Lab Data Center (RLDC). The RLDC is remote from your presentlocation. To successfully complete the following tasks, you shouldfamiliarize yourself with the RLDC lab topology. Figure 2-1 shows themajor components that make up the lab topology.
Figure 2-1 Course SA-345-S10 Lab Topology
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
2-22 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Table 2-1 shows the IP addresses assigned to the RLDC lab host machine’ssystem controller (SC) network management (net mgmt) port, the SClogin credentials, and the server login credentials. Note that the IPaddress subnet assignment varies based on the lab to which you areassigned. Please contact your instructor for IP address information.
Before You Begin
Before you begin Task 1, complete the following lab configurationinformation. See your instructor if you need help.
Your assigned host machine:
● Host machine assignment: machine # _____
● Solaris™ login credentials: root/cangetin
● System Controller (SC) IP address _______________
● SC login credentials root/cangetin
Note – Examples shown in this exercise are from lab machine 4.Depending upon your lab configuration, the responses to the commandsin the labs might vary slightly.
Accessing the Lab Equipment
Before you perform the following tasks, here is an overview on how toaccess your lab equipment.
Table 2-1 Host Machine’s System Controller IP Address Assignments
Sun SPARCEnterpriseT5140
SC IP Address SC LoginCredentials
ServerHostName
OS LoginCredentials
Machine1 192.168.XX.10 root/cangetin host01 root/cangetin
Machine2 192.168.XX.20 root/cangetin host02 root/cangetin
Machine3 192.168.XX.30 root/cangetin host03 root/cangetin
Machine4 192.168.XX.40 root/cangetin host04 root/cangetin
Machine5 192.168.XX.50 root/cangetin host05 root/cangetin
Machine6 192.168.XX.60 root/cangetin host06 root/cangetin
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
Installing Logical Domains Software 2-23Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Sun uses the Sun Secure Global Desktop (SGD) to provide you with accessto the remote lab environment. To access the SGD, open the followingpath in your Web browser:
http://rldc.sun.net
Click the LOGIN button and enter the user name and password providedby your instructor. When the Security Warning dialog box appears, clickthe Accept button. Figure 2-2 shows a typical SGD session.
Figure 2-2 Sun Secure Global Desktop
The SGD places you on the lab “landing pad” from which you can accessyour lab equipment.
The SGD left panel contains tools that allow you to access your labsystems. The Gnome tools open remote desktops on the landing pad or labsystems. The Terminal tools open terminal windows on the landing pad orlab systems. The Console tool opens a remote console on the lab system.The Administration Console is for shadowing your lab partner.
Caution – While performing the exercises in this course, do not changethe passwords to the system controller or the Solaris 10 operating system.Changing the passwords will cause the labs to function incorrectly.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
2-24 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Task 1 – Gather System Hardware and SoftwareConfiguration Information
In this task you explore your assigned lab equipment and determine if thehardware and software meet the requirements necessary for creatinglogical domains. Figure 2-3 shows the major components of a host server.
Figure 2-3 Host Server Major Components
Note – The sample command output shown for the following commandsare from a Sun SPARC Enterprise T5140 server. The server details anddevice pathing information might differ based on the server’s systemdisks and server architecture of the machine you are using.
Perform the following steps:
1. Log in to your assigned system in the classroom. From the classroomsystem, open a network browser and connect to the Sun SecureGlobal Desktop URL http://rldc.sun.net.
Enter your assigned SGD login credentials to access the lab.
2. From the SGD session interface, click the landing pad Gnomeapplication to open a desktop session on the landing pad.
3. Open a terminal window on the desktop on the landing pad.
4. Verify the following file is located in the /opt/ses/firmwaredirectory on the lab landing pad system:
Sun_System_Firmware-7_2_7-SPARC_Enterprise_T5140+T5240.pkgThe Sun SPARC Enterprise T5140 firmware package.
Operating System
Physical Resourses(CPUs, LANs, Storage)
SystemController
Hypervisor
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
Installing Logical Domains Software 2-25Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
5. In the landing pad desktop session, open a Web browser and enterthe IP address of the system controller in your assigned lab server toopen the Sun Integrated Lights Out Manager WebGUI.
Log in using the appropriate credentials shown in Table 2-1.
6. Click the System Information tab to determine the following:
Product Name: T5140
System Firmware: Sun System Firmware 7.2.6
Do the server model and firmware release meet the requirements forcreating logical domains? Yes
7. Click the Remote Control tab and Remote Power Control tab. Verifythat the host is currently on. If not, select the Power On action andclick Save. Click the OK button in the confirmation dialog box.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
2-26 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
8. Click the Redirection tab and start the remote console.
9. Log in to the operating system as root.
10. Display the contents of the /etc/release file.
# cat /etc/release Solaris 10 10/09 s10s_u8wos_08a SPARC Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms. Assembled 16 September 2009
Does this OS release meet the requirement for installing the LogicalDomains Manager 1.3 software? Yes
11. Run the prtdiag|more command to determine the followingconfiguration information:
# prtdiag|moreSystem Configuration: Sun Microsystems sun4v T5140Memory size: 7968 Megabytes
========================== Virtual CPUs ==============================CPU ID Frequency Implementation Status------ --------- ---------------------- -------0 1165 MHz SUNW,UltraSPARC-T2+ on-line1 1165 MHz SUNW,UltraSPARC-T2+ on-line2 1165 MHz SUNW,UltraSPARC-T2+ on-line3 1165 MHz SUNW,UltraSPARC-T2+ on-line...
● Platform group: sun4v
● Memory size: 8 GB
● Number of available CPU strands: 64
12. Run the more /etc/path_to_inst command to determine thesystem PCI configuration.
# more /etc/path_to_inst## Caution! This file contains critical kernel state#"/iscsi" 0 "iscsi""/pseudo" 0 "pseudo""/scsi_vhci" 0 "scsi_vhci""/options" 0 "options""/ramdisk-root" 0 "ramdisk""/virtual-devices@100" 0 "vnex""/virtual-devices@100/channel-devices@200" 0 "cnex""/virtual-devices@100/channel-devices@200/virtual-channel@3" 0 "vldc""/virtual-devices@100/channel-devices@200/virtual-channel-client@2" 1 "vldc"
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
Installing Logical Domains Software 2-27Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
"/virtual-devices@100/channel-devices@200/virtual-channel@0" 2 "vldc""/virtual-devices@100/channel-devices@200/virtual-channel-client@1" 3 "vldc""/virtual-devices@100/console@1" 0 "qcn""/virtual-devices@100/ncp@6" 0 "ncp""/virtual-devices@100/random-number-generator@e" 0 "n2rng""/virtual-devices@100/n2cp@7" 0 "n2cp""/pci@400" 0 "px""/pci@400/pci@0" 0 "pxb_plx""/pci@400/pci@0/pci@1" 1 "pxb_plx""/pci@400/pci@0/pci@1/pci@0" 0 "px_pci""/pci@400/pci@0/pci@1/pci@0/usb@0,2" 0 "ehci""/pci@400/pci@0/pci@1/pci@0/usb@0,2/storage@2" 1 "scsa2usb""/pci@400/pci@0/pci@1/pci@0/usb@0,2/storage@2/disk@0,0" 2 "sd""/pci@400/pci@0/pci@1/pci@0/usb@0,2/hub@4" 0 "hubd""/pci@400/pci@0/pci@1/pci@0/usb@0" 0 "ohci""/pci@400/pci@0/pci@1/pci@0/usb@0,1" 1 "ohci""/pci@400/pci@0/pci@8" 2 "pxb_plx""/pci@400/pci@0/pci@8/scsi@0" 0 "mpt""/pci@400/pci@0/pci@8/scsi@0/sd@0,0" 0 "sd""/pci@400/pci@0/pci@8/scsi@0/sd@1,0" 1 "sd""/pci@400/pci@0/pci@8/scsi@0/sd@2,0" 3 "sd""/pci@400/pci@0/pci@9" 3 "pxb_plx""/pci@400/pci@0/pci@c" 4 "pxb_plx""/pci@400/pci@0/pci@c/network@0" 0 "e1000g""/pci@400/pci@0/pci@c/network@0,1" 1 "e1000g""/pci@400/pci@0/pci@d" 5 "pxb_plx""/pci@500" 1 "px""/pci@500/pci@0" 6 "pxb_plx""/pci@500/pci@0/pci@8" 7 "pxb_plx""/pci@500/pci@0/pci@8/network@0" 0 "nxge""/pci@500/pci@0/pci@8/network@0,1" 1 "nxge""/pci@500/pci@0/pci@8/network@0,2" 2 "nxge""/pci@500/pci@0/pci@8/network@0,3" 3 "nxge""/pci@500/pci@0/pci@9" 8 "pxb_plx""/pci@500/pci@0/pci@c" 9 "pxb_plx""/pci@500/pci@0/pci@d" 10 "pxb_plx""/ebus@c0" 0 "ebus""/ebus@c0/serial@0,ca0000" 0 "su""/pci-performance-counters@400" 0 "n2piupc""/pci-performance-counters@500" 1 "n2piupc"#
How many PCI buses are configured in the system? Two PCI buses,pci@400 and pci@500.
PCI bus 400 configuration:
How many of the disk drives reside on PCI bus 400? Three
How many network interfaces reside on PCI bus 400? Two
Which network interfaces reside on PCI bus 400? e1000g0, e1000g1
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
2-28 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
PCI bus 500 configuration:
How many of the disk drives reside on PCI bus 500? None
How many network interfaces reside on PCI bus 500? Four
Which network interfaces reside on PCI bus 500? nxge0, nxge1,nxge2, nxge3
13. Run the format command to determine the disk drives available onyour lab system.
# formatSearching for disks...done
c1t2d0: configured with capacity of 279.38GB
AVAILABLE DISK SELECTIONS: 0. c1t0d0 <SUN300G cyl 46873 alt 2 hd 20 sec 625> /pci@400/pci@0/pci@8/scsi@0/sd@0,0 1. c1t1d0 <SUN300G cyl 46873 alt 2 hd 20 sec 625> /pci@400/pci@0/pci@8/scsi@0/sd@1,0 2. c1t2d0 <SUN300G cyl 46873 alt 2 hd 20 sec 625> /pci@400/pci@0/pci@8/scsi@0/sd@2,0Specify disk (enter its number):^D
14. Use the dladm show-link command to verify the network devicesare compliant with logical domain requirements.
# dladm show-linke1000g0 type: non-vlan mtu: 1500 device: e1000g0e1000g1 type: non-vlan mtu: 1500 device: e1000g1nxge0 type: non-vlan mtu: 1500 device: nxge0nxge1 type: non-vlan mtu: 1500 device: nxge1nxge2 type: non-vlan mtu: 1500 device: nxge2nxge3 type: non-vlan mtu: 1500 device: nxge3
If the network interface is non-vlan or vlan, the interface meets logicaldomain requirements. If the network interface is legacy, the interface isnot compliant. In this example, all network interfaces are compliant.
15. Use the dladm show-dev command to determine which networkdevices are currently up.
# dladm show-deve1000g0 link: unknown speed: 0 Mbps duplex: halfe1000g1 link: unknown speed: 0 Mbps duplex: halfnxge0 link: up speed: 100 Mbps duplex: fullnxge1 link: up speed: 100 Mbps duplex: fullnxge2 link: down speed: 0 Mbps duplex: unknownnxge3 link: down speed: 0 Mbps duplex: unknown
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
Installing Logical Domains Software 2-29Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Note – At this point, you have gathered the configuration informationrequired to complete the remaining tasks in this exercise. This informationwill be required in later exercises.
Task 2 – Upgrade the System Controller Firmware
In this task you upgrade the system controller firmware on your assignedlab equipment. Upgrading the system controller firmware can beperformed by three methods:
● Load the firmware from a remote host using the Sun IntegratedLights Out Manager WebGUI
● Load the firmware from a local TFTP server using system controllercommands
● Load the firmware from the operating system
In this task, you can choose to either upgrade the system controllerfirmware from the “landing pad” system using the Sun Integrated LightsOut Manager WebGUI (see “Loading Firmware Using the Sun IntegratedLights Out Manager WebGUI” on page 29) or load the firmware from theoperating system (see “Loading Firmware From the Operating System”on page 32).
Loading Firmware Using the Sun Integrated Lights Out ManagerWebGUI
If you wish to load the system controller firmware using the SunIntegrated Lights Out Manager WebGUI, perform the following steps:
Note – These steps are specific to the Sun SPARC Enterprise T5140 server,which is used as an example in this exercise. To see the patchrequirements and installation instructions for other servers, please readthe README file associated with the patch file of your server and followthe instructions given.
1. Verify that you have the landing pad Web browser open to the SunIntegrated Lights Out Manager WebGUI. If not, open a browsersession at this time.
If the Redirection (Sun ILOM Remote Console) window is open, clickthe Redirection pull down menu and select Quit.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
2-30 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
2. In the Sun Integrated Lights Out Manager WebGUI, click the RemoteControl tab and Remote Power Control tab. Select the GracefulShutdown and Power Off action and click Save. Click the OK buttonin the confirmation dialog box.
3. Click the Keyswitch tab and verify that the keyswitch is in theNormal position.
4. Click the Maintenance tab and from the Firmware Upgrade tab selectEnter Upgrade Mode. Click the OK button in the confirmation dialogbox.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
Installing Logical Domains Software 2-31Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
5. Browse to the location of the firmware package file. For this lab, thelocation is /opt/ses/firmware. Select the version 7.2.7 firmwarepackage for T5140 systems and click Upload.
6. Verify that the Preserve Configuration option is selected and clickStart Upgrade. Click the OK button in the confirmation dialog box.
7. After the firmware upgrade is complete, click the Reconnect link.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
2-32 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Note – At the end of the firmware upgrade process, the system controlleris reset. It might take a few minutes before you can access Sun IntegratedLights Out Manager WebGUI.
8. After the system has reconnected, log back in to the Sun IntegratedLights Out Manager WebGUI.
9. Click the Remote Control tab and Remote Power Control tab. Powerthe system on.
10. Verify that the system firmware is now at a version appropriate forrunning LDoms 1.3 software by navigating to the SystemInformation tab, Overview tab.
11. Log out of the Sun Integrated Lights Out Manager WebGUI andclose the Web browser.
Loading Firmware From the Operating System
In this task you download the system controller firmware from theoperating system (on the local host) to the system controller memory andinstall it. This procedure requires that you use the system controllerALOM command set.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
Installing Logical Domains Software 2-33Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
On systems that run ILOM, you can switch to ALOM compatibility modeby running these commands on the system controller:
-> cd /SP/users/SC_User_Name-> set cli_mode=alom
The next time you log in to the system controller, you will be able to runALOM commands.
If you wish to load the firmware from the operating system on the localhost, perform these steps:
1. In the system console window, access the system controller.
If you are at the system controller prompt, log in as alom with thepassword cangetin.
If you are at the operating system or OpenBoot prompt, enter the #.escape sequence. Run the exit command to log out of the systemcontroller. Log in as alom with the password cangetin.
Note that the alom account used in this lab was created for trainingpurposes only. This account has the ALOM compatibility modealready set.
2. From the system controller, open a console session on the system.
sc> console -f
3. Log in to the operating system as root.
Console Window: rootPassword: cangetin...
4. Navigate to the /opt/ses/firmware directory.
# cd /opt/ses/firmware
5. Copy the firmware package 139444-07.zip to the /var/tmpdirectory and unzip the file.
# cp 139444-07.zip /var/tmp# cd /var/tmp# unzip 139444-07.zip
6. Change to the 139444-07 directory.
# cd 139444-07# lscopyrightInstall.infoLegalLEGAL_LICENSE.TXT
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
2-34 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
README.139444-07Sun_System_Firmware-7_2_7_b-SPARC_Enterprise_T5140+T5240.pkgsysfw720_README_docs.csssysfw720_README_docs.htmlsysfwdownloadsysfwdownload.READMETPM-Feature-README.txt
Note that the Sun_System_Firmware-7_2_7_b-SPARC_Enterprise_T5140+T5240.pkg file contains the systemcontroller firmware.
7. Run the sysfwdownload -u command to download and update thesystem controller firmware.
The -u option automatically performs these tasks:
● Downloads the system firmware image
● Powers down the host
● Updates the system firmware
● Resets the system controller
● Powers the host back on# ./sysfwdownload -u Sun_System_Firmware-7_2_7_b-SPARC_Enterprise_T5140+T5240.pkgWARNING: Host will be powered down for automatic firmware update whendownload is completed.Do you want to continue(yes/no)? yes
.......... (6%).......... (12%).......... (19%).......... (25%)..........(32%).......... (38%).......... (45%).......... (51%)..........(58%).......... (64%).......... (71%).......... (77%)..........(83%).......... (90%).......... (96%)..... (100%)
Download completed successfully.
# Feb 25 16:03:40 ldom01 unix: WARNING: Power-off requested, system willnow shutdown.
Shutdown started. Thursday, February 25, 2010 4:03:40 PM MST
Changing to init state 5 - please waitBroadcast Message from root (msglog) on ldom01 Thu Feb 25 16:03:43...THE SYSTEM ldom01 IS BEING SHUT DOWN NOW ! ! !Log off now or risk your files being damaged
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
Installing Logical Domains Software 2-35Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
svc.startd: The system is coming down. Please wait.svc.startd: 128 system services are now being stopped.Feb 25 16:03:58 ldom01 syslogd: going down on signal 15svc.startd: The system is down.syncing file systems... done
8. Use the #. escape sequence to return to the system controller.
Note that the system controller takes a few minutes to complete thefirmware update operation.
9. When the system controller prompt is available, log back in as rootwith the password cangetin.
Task 3 – Install the Logical Domains ManagementSoftware
In this task you install the Logical Domains Manager 1.3 software on theSun SPARC Enterprise server. Before you begin this task, you must firsthave successfully completed tasks 1 and 2 in this exercise.
Perform the following steps:
1. On the SGD desktop, click the console link for your assigned server.
If you see the SC -> prompt, start the SC serial console to access theSolaris OS. For example:
-> start /SP/console
When you see the Solaris OS login prompt, log in as root.
console login: rootPassword: cangetin...
If a prompt does not appear, try entering the #. sequence to enter thesystem controller. Then run the start /SP/console command to open aconsole session on the system.
2. Copy the LDoms_Manager-1_3.zip archive located in the/opt/ses/software directory to the /var/tmp directory. Unzip theLDoms_Manager-1_3.zip file.
# pwd/var/tmp# cp /opt/ses/software/LDoms_Manager-1_3.zip .# unzip LDoms_Manager-1_3.zipArchive: LDoms_Manager-1_3.zip creating: LDoms_Manager-1_3/
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
2-36 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
creating: LDoms_Manager-1_3/Install/ inflating: LDoms_Manager-1_3/Install/install-ldm creating: LDoms_Manager-1_3/Legal/ inflating: LDoms_Manager-1_3/Legal/CDDL.LICENSE inflating: LDoms_Manager-1_3/Legal/Ldoms_MIB_1.0.1_Entitlement.txt inflating: LDoms_Manager-1_3/Legal/Ldoms_MIB_1.0.1_SLA_Entitlement.txt...# ls -d LDoms_Manager-1_3*LDoms_Manager-1_3 LDoms_Manager-1_3.zip
3. Change to the LDoms_Manager-1_3/Install directory and run theinstall-ldm installation script to install the Logical DomainsManager 1.3 software.
# cd LDoms_Manager-1_3/Install# ./install-ldmWelcome to the LDoms installer.
You are about to install the Logical Domains Manager package that willenable you to create, destroy and control other domains on your system.
You will also be given the option of running the LDoms ConfigurationAssistant (ldmconfig) to setup the control domain and create guestdomains.
If the Sun Security Toolkit (SST) is installed, you will be prompted tooptionally harden your control domain.
Installing LDoms packages.pkgadd -n -d "/var/tmp/LDoms_Manager-1_3/Product" -a pkg_admin SUNWldm.vCopyright 2010 Sun Microsystems, Inc. All rights reserved....
Installation of <SUNWldm> was successful.pkgadd -n -d "/var/tmp/LDoms_Manager-1_3/Product" -a pkg_admin SUNWldmp2vCopyright 2010 Sun Microsystems, Inc. All rights reserved.Use is subject to license terms....Installation of <SUNWldmp2v> was successful.
LOGICAL DOMAINS CONFIGURATION
Once installed, you may configure your system for a basic LogicalDomains deployment. If you select "y" for the following question, theLogical Domains Configuration Assistant will be launched following asuccessful installation of packages.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
Installing Logical Domains Software 2-37Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
(You may launch the LDoms Configuration Assistant at a later time withthe command /usr/sbin/ldmconfig, or use the GUI Configuration Assistantwhich is bundled in the LDoms zip file - see README.GUI for moredetails)
Select an option for configuration:
y) Yes, launch the LDoms Configuration Assistant after installn) No thanks, I will configure LDoms myself later
Enter y or n [y]: n
The Logical Domains Configuration Assistant is delivered as part of theLogical Domains zip bundle.
In this exercise, you will not be using the Logical Domains ConfigurationAssistant. You will configure logical domains using the command-line.
Note – The installation script loads the Logical Domains Managercommands in the /usr/sbin directory.
4. Verify that the logical domains daemon (ldmd) has beenautomatically started.
# svcs -l ldmdfmri svc:/ldoms/ldmd:defaultname Logical Domains Managerenabled truestate onlinenext_state nonestate_time January 11, 2010 2:21:01 PM MSTlogfile /var/svc/log/ldoms-ldmd:default.logrestarter svc:/system/svc/restarter:defaultcontract_id 43dependency require_all/none svc:/system/filesystem/local (online)
The state should be “online”.
Note that the install-ldm installation script automatically enables theLogical Domains Manager daemon (ldmd). When enabled, you can create,modify, and control the logical domains.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
2-38 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
5. Verify the Logical Domains Management utility is operational byrunning the ldm list-domain command. Also, verify that the ldmman page can be viewed.
primary# ldm list-domainNAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIMEprimary active -n-c-- SP 64 7968M 0.1% 5mprimary# man ldmReformatting page. Please Wait... done...
Lab Exercise Summary
?!
Discussion – Take a few minutes to discuss the experiences, issues, ordiscoveries you had during the lab exercise.
● Experiences
● Interpretations
● Conclusions
● Applications
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
3-1Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Module 3
Configuring the Control andService Domain
Objectives
This module describes how to configure the control domain.
Upon completion of this module, you should be able to:
● Configure the control domain.
● Configure the control domain as a service domain by adding virtualservices.
● Save a configuration to the service controller.
● Enable networking between the control/service domain and otherdomains.
● Enable the virtual network terminal server daemon.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Additional Resources
3-2 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Additional Resources
The following reference provides additional information about the topicsdescribed in this module:
● Logical Domains 1.3 Administration Guide, Part No: 821-0406-10
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Introduction
Configuring the Control and Service Domain 3-3Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Introduction
After you have installed the Logical Domains software, your next task isto create and configure the logical domains that will constitute yourLogical Domains environment.
In this module you will be shown how to configure the control domain(specifically the control domain’s resources) and then how to configurethe control domain as a service domain. After you have been shown howto configure the control and service domain, you will be given theopportunity to apply what you have learned by completing a lab exercise.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Configuring the Control Domain’s Resources
3-4 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Configuring the Control Domain’s Resources
The Logical Domains’ control or primary domain is created as part of theLogical Domains software installation. Initially, all system resources areallocated to the control domain. To create other logical domains, you mustrelease some of these resources. In this section you will be shown how toassign the following control domain resources (see Figure 3-1):
● CPUs
● Cryptographic devices (MAUs)
● System memory
Figure 3-1 Control Domain Initial Configuration
By assigning fewer resources to the control domain, you “release” (ormake available) the remaining resources to other logical domains.
The following examples show you how to assign each resource type to thecontrol domain. You should have determined the allocation of eachresource as part of your Logical Domains planning, so that when youcome to this task, you know exactly how many resources to allocate to thecontrol domain and why.
Control Domain
Physical Resources(CPUs, MAU, Memory, I/O)
Hypervisor
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Configuring the Control Domain’s Resources
Configuring the Control and Service Domain 3-5Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Determining How Many Resources are Available
Before you assign resources to the control domain, it is a good practice todetermine how many resources you have available.
To determine how many resources you have available on the controldomain, run the following command:
primary# ldm list-devices -a
Note – The output may differ due to varying hardware configurations.
Review and make note of how many of each resource you have,specifically virtual CPUs, MAUs, and memory.
In the sections that follow you are shown how to set the virtual CPUs,MAUs, and memory for the control domain.
Setting Virtual CPUs for the Control Domain
The first resources you want to set for the control domain are the virtualCPUs. In the example that follows eight virtual CPUs are assigned to thecontrol domain, primary. This leaves the remainder of the virtual CPUsavailable for other domains.
To set the virtual CPUs for the control domain, run the followingcommand:
primary# ldm set-vcpu 8 primary
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Configuring the Control Domain’s Resources
3-6 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Setting Cryptographic Resources for the ControlDomain
After you have set the virtual CPUs for the control domain, the next taskis to assign the cryptographic resources. The UltraSPARC T2 processor isequipped with eight cryptographic units or Modular Arithmetic Units(MAUs). You may recall from Module 1 that the number of MAUs boundto a domain should not be more than the number of cores assigned to thedomain as part of virtual CPU allocation. The number of MAUs bound toa domain can, however, be less than the number of cores assigned for thatdomain. In the example that follows one cryptographic resource has beenassigned to the control domain, primary. This leaves the remainder of thecryptographic resources available for other domains.
To assign a cryptographic resource (MAU) to the control domain, run thefollowing command:
primary# ldm set-mau 1 primary
Note – Adding a MAU to the control domain is useful because having thisresource can speed up warm migration by taking advantage of thecryptographic unit when transferring data (transfer is done usingencryption). You will learn more about warm migration in Module 6.
Setting Memory for the Control Domain
After you have assigned the cryptographic resources to the controldomain, the next task is to set memory for the control domain. In theexample that follows two gigabytes of memory are assigned to the controldomain, primary. This leaves the remainder of the memory available forother domains.
primary# ldm set-memory 2G primaryO
racl
e U
nive
rsity
and
BO
S-it
Gm
bH &
Co.
KG u
se o
nly
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Configuring the Control Domain’s Resources
Configuring the Control and Service Domain 3-7Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Verifying the Resources Assigned to the ControlDomain
After you have completed all your resource assignments, it is a goodpractice to verify that the resources have been assigned correctly.
To verify that the resources have been assigned correctly to the controldomain, run the following command:
primary# ldm list-constraints primary
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Adding Virtual Services
3-8 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Adding Virtual Services
You may recall from Module 1 that a control domain can also serve as aservice domain. In this section you will be shown how to configure thecontrol domain as a service domain.
The control domain is configured as a service domain by enabling thefollowing virtual services:
● vdiskserver – Virtual disk server
● vswitch – Virtual switch service
● vconscon – Virtual console concentrator service
You must enable these virtual services initially to be able to use them later.
Note – You can add more than one disk or switch service if desired.
To enable a virtual service, you add it to the domain. In the sections thatfollow you will be shown how to add each of the virtual services.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Adding Virtual Services
Configuring the Control and Service Domain 3-9Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Adding a Virtual Disk Server
The virtual disk server (vdiskserver or vds) enables domains to accessblock level storage that is not directly connected to them through a client-server model. It consists of two components: a virtual disk client (vdc)running in the guest domain and a virtual disk server (vds) running in theservice domain. The virtual disk server processes disk requests on behalfof the virtual disk client and submits them to the physical storage residingon the service / I/O domain (see Figure 3-2). Although the virtual disksappear as regular disks on the client domain, disk operations areforwarded to the physical disk through the virtual disk service.
Figure 3-2 Virtual Disk Server
To allow configuring virtual disks into a logical domain, you must add avirtual disk server (vds). In the example that follows a virtual disk server(primary-vds0) is being added to the control domain (primary), whichwill also serve as a service domain.
To add a virtual disk server, enter the following command:
primary# ldm add-vdiskserver primary-vds0 primary
Note – The alias for vdiskserver is vds.
Logical Domain 1
V-DiskDriver
Logical Domain 2
V-DiskDriver
Logical Domain 3
V-DiskDriver
V-DiskServer V-Disk
Server
DeviceDriver
Service Domain
AppApp App
App
AppApp App
App
AppApp App
App
Virtual SAN 1
Virtual SAN 2
I/O Bridge
Hypervisor
StorageDevices
DeviceDriver
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Adding Virtual Services
3-10 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Adding a Virtual Switch Service
The virtual switch service (vswitch or vsw) enables networking betweenvirtual network (vnet) devices in domains. This service is implementedusing two components: the virtual network (vnet) device and the virtualnetwork switch (vsw) device. The vnet device emulates an Ethernetdevice and communicates with other virtual network devices in thesystem using a point-to-point channel.
The vsw device mainly functions as a multiplexor of all the virtualnetwork’s incoming and outgoing packets. The vsw device can interfacedirectly with a physical network adapter in an I/O domain. The virtualswitch device sends and receives packets on a virtual network’s behalf(see Figure 3-3). The vsw device also functions as a simple layer-2 switchand switches packets between the vnet devices connected to it within thesystem. Guest domains can share the same virtual switch to access thenetwork.
Figure 3-3 Virtual Switch Service
In the example that follows a virtual switch service (primary-vsw0)connected to network adapter nxge0 is being added to the control domain(primary).
Note – The virtual switch should be connected to a GLDv3-compliantnetwork adapter if you want the logical domains using that virtual switchto be able to communicate with a physical network connected to the box.
Logical Domain 1
V-EtherDriver
Logical Domain 2
V-EtherDriver
Logical Domain 3
V-EtherDriver
V-EtherSwitch V-Ether
Switch
DeviceDriver
Service Domain
AppApp App
App
AppApp App
App
AppApp App
App
Virtual LAN 2: 192.168.100/24
I/O Bridge
Hypervisor
GbEther I/F
Virtual LAN 1: 192.168.200/24
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Adding Virtual Services
Configuring the Control and Service Domain 3-11Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
To add a virtual switch service, enter the following command:
primary# ldm add-vswitch net-dev=nxge0 primary-vsw0 \primary
Note – The alias for vswitch is vsw.
This command automatically allocates a MAC address to the virtualswitch. You can specify your own MAC address as an option to the ldmadd-vsw command. However, in that case, it is your responsibility toensure that the MAC address specified does not conflict with an alreadyexisting MAC address.
Adding a Virtual Console Concentrator Service
The virtual console concentrator service (vconscon or vcc) functions as aconcentrator for all logical domains’ console traffic. It interfaces with thevirtual network terminal server daemon (vntsd) and exports access toeach console through a UNIX socket.
With a virtual console service, console I/O from all domains, except theprimary domain, is redirected to a service domain running the virtualconsole concentrator (vcc) service and virtual network terminal serverdaemon (vntsd), instead of to the systems controller.
In the example that follows a virtual console concentrator service(primary-vcc0) with a port range from 5000 to 5100 is being added to thecontrol domain (primary).
To add a virtual console concentrator service, enter the followingcommand:
primary# ldm add-vconscon port-range=5000-5100 \primary-vcc0 primary
Note – The alias for vconscon is vcc.
To provide access to the virtual console of each logical domain, you mustenable the virtual network terminal server daemon (vntsd). You areshown how to complete this task in the “Enabling the Virtual NetworkTerminal Server Daemon” section of this module.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Adding Virtual Services
3-12 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Verifying the Virtual Services Have Been Created
After you have added each of the virtual services, you should verify theservices have been created.
To verify the services have been created, run the following command:
primary# ldm list-services primaryVCCNAME LDOM PORT-RANGEprimary-vcc0 primary 5000-5100
VSWNAME LDOM MAC NET-DEV ID DEVICE LINKPROP DEFAULT-VLAN-ID PVID VID MTU MODEprimary-vsw0 primary 00:14:4f:fb:79:88 nxge0 0 switch@0 1 1 1500
VDSNAME LDOM VOLUME OPTIONS MPGROUP DEVICEprimary-vds0 primary
At this point the control domain is configured as a service domain. Beforethe new configuration can take effect, you must save it to the systemcontroller and reboot the operating system.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Saving the Configuration to the System Controller
Configuring the Control and Service Domain 3-13Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Saving the Configuration to the System Controller
After you have allocated the control domain resources and haveconfigured the control domain as a service domain by enabling the virtualservices, you need to save the configuration to the system controller.
To save the configuration, run the following command:
primary# ldm add-spconfig config_initial
This configuration contains the information used to set up the controldomain hardware. The saved configuration will be used during the nextpowercycle of the system. However, if you have a single domain running(as in our example), a reboot of that domain will trigger a powercycle. Ifyou have multiple domains running, a reboot of a domain will not triggera powercycle.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Verifying the Configuration is Ready to be Used at the Next Reboot
3-14 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Verifying the Configuration is Ready to be Used at the NextReboot
After you have saved the configuration, take a moment to verify theconfiguration is ready to be used at the next reboot.
To verify the configuration is ready to be used at the next reboot, enter thefollowing command:
primary# ldm list-spconfigfactory-default [current]config_initial [next]primary#
Note – The alias for list-spconfig is list-config.
This list command shows the initial configuration set will be used onceyou powercycle.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Rebooting the Control Domain
Configuring the Control and Service Domain 3-15Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Rebooting the Control Domain
You must reboot the control domain for the configuration changes to takeeffect and for the resources to be released for other logical domains to use.
To reboot the control domain, enter the following command:
primary# shutdown -i6 -g0 -y
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Enabling Networking Between the Control/Service Domain and Other Domains
3-16 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Enabling Networking Between the Control/Service Domainand Other Domains
By default, networking between the control domain and other domains inthe system is disabled. To enable inter-domain networking, the virtualswitch device (vsw) should be configured as a network device. The virtualswitch can either replace the underlying physical device (nxge0 in thisexample) as the primary interface or be configured as an additionalnetwork interface in the domain.
To configure the virtual switch as the primary interface:
1. Print out the addressing information for all interfaces.
primary# ifconfig -a
2. Unplumb the physical network device assigned to the virtual switch(net-dev).
primary# ifconfig nxge0 unplumb
3. Plumb the virtual switch. In this example, vsw0 is the virtual switchbeing configured. vsw0 has to be plumbed to enable networkingbetween the control domains and other domains connected to thatvirtual switch.
primary# ifconfig vsw0 plumb
4. (Optional) To obtain the list of all virtual switch instances in adomain, you can list them.
primary# dladm show-link | grep vswvsw0 type: non-vlan mtu: 1500 device: vsw0
5. To migrate properties of the physical network device (nxge0) to thevirtual switch (vsw0) do one of the following:
● If networking is configured using a static IP address, reuse theIP address and netmask from nxge0 for vsw0.
primary# ifconfig vsw0 IP_of_nxge0 netmask \netmask_of_nxge0 broadcast + up
● If networking is configured using DHCP, enable DHCP forvsw0.
primary# ifconfig vsw0 dhcp start
6. Make the required configuration file modifications to make thischange permanent.
primary# mv /etc/hostname.nxge0 /etc/hostname.vsw0primary# mv /etc/dhcp.nxge0 /etc/dhcp.vsw0
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Enabling Networking Between the Control/Service Domain and Other Domains
Configuring the Control and Service Domain 3-17Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Note – If a net-dev is defined, the vsw will be connected with that net-dev, and packets can be exchanged between that net-dev and otherdomains connected to that vsw. Plumbing vsw allows the domain with thevsw to communicate with other domains connected to that vsw.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Enabling the Virtual Network Terminal Server Daemon
3-18 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Enabling the Virtual Network Terminal Server Daemon
You must enable the virtual network terminal server daemon (vntsd) toprovide access to the virtual console of each logical domain. Refer to thevntsd(1M) man page for information about how to use this daemon.
Note – Be sure that you have created the virtual console concentrator(vcc) service on the control domain before you enable vntsd.
To enable the virtual network terminal server daemon:
1. Use the svcadm(1M) command to enable the virtual networkterminal server daemon, vntsd(1M).
primary# svcadm enable vntsd
2. Use the svcs(1) command to verify that the vntsd daemon isenabled. The state should be online.
primary# svcs -l vntsdfmri svc:/ldoms/vntsd:defaultname virtual network terminal serverenabled truestate onlinenext_state nonestate_time January 19, 2010 9:01:39 AM MSTlogfile /var/svc/log/ldoms-vntsd:default.logrestarter svc:/system/svc/restarter:defaultcontract_id 121dependency optional_all/error svc:/milestone/network(online)dependency optional_all/none svc:/system/system-log(online)
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
Configuring the Control and Service Domain 3-19Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Applying What You Have Learned – Lab Exercise
Now that you know how to assign the control domain resources andconfigure the control domain as a service domain by adding the virtualservices, try applying what you have learned in the lab exercise thatfollows.
In this exercise, you will perform the following tasks:
● Set up the control domain hardware resources.
● Create virtual services.
● Configure the virtual switch as a network interface.
● Enable the virtual network terminal server.
Preparation
To prepare for this lab exercise:
● Review the Preparation section in the previous lab.
● Review the hardware and software configuration information yougathered in Task 1 of the previous lab.
● When performing this exercise, use the following system logininformation. See your instructor if you need help.
Control domain operating system:
● Login name root
● Login password cangetin
Note – Examples shown in this exercise are from lab machine 4. Thecommand responses shown in this lab are examples only. Dependingupon your lab configuration, the responses to the commands in the labsmight vary slightly.
Note – The sample command output shown for the following commandsare from a Sun SPARC Enterprise T5140 server. The server details anddevice pathing information might differ based on the server’s systemdisks and server architecture of the machine you are using.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
3-20 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Note – In the following examples, the IP subnet field is shown as XX inthe IP addresses. Replace XX with the subnet of the system you areworking on. You can use ifconfig -a to determine the subnet address.
Note – In the examples shown in this lab, commands run on the primarydomain are indicated by the primary# prompt. The primary domain isthe domain in which the Logical Domains Manager software is running.
Task 1 – Set Up the Control Domain
This task is to perform the initial setup of the control (primary) domain.This involves assigning system resources (Figure 3-4) to be used by thecontrol domain. The remaining system resources can be used by otherguest domains in the system. Finally, after you configure the controldomain, you save the configuration to the system controller.
In this task you allocate the following resources to the control domain:
● vcpu – The virtual CPUs representing the processor strands of theserver to be used by the control domain.
● mau – The modular arithmetic unit to be used by the control domain.
● memory – The amount of memory to be used by the control domain.
Figure 3-4 Initial Configuration Resource Set
Control Domain
Physical Resources(CPUs, MAU, Memory, I/O)
Hypervisor
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
Configuring the Control and Service Domain 3-21Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Perform the following steps
1. List all the server resources.
primary# ldm list-devices -aVCPU PID %FREE PM 0 0 no 1 0 no 2 0 no 3 0 no 4 0 no 5 0 no 6 0 no 7 0 no 8 0 no 9 0 no 10 0 no 11 0 no 12 0 no 13 0 no 14 0 no 15 0 no 16 0 no 17 0 no 18 0 no 19 0 no 20 0 no 21 0 no 22 0 no 23 0 no 24 0 no 25 0 no 26 0 no 27 0 no 28 0 no 29 0 no 30 0 no 31 0 no 64 0 no 65 0 no 66 0 no 67 0 no 68 0 no 69 0 no 70 0 no 71 0 no
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
3-22 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
72 0 no 73 0 no 74 0 no 75 0 no 76 0 no 77 0 no 78 0 no 79 0 no 80 0 no 81 0 no 82 0 no 83 0 no 84 0 no 85 0 no 86 0 no 87 0 no 88 0 no 89 0 no 90 0 no 91 0 no 92 0 no 93 0 no 94 0 no 95 0 no
MAU ID CPUSET BOUND 0 (0, 1, 2, 3, 4, 5, 6, 7) primary 1 (8, 9, 10, 11, 12, 13, 14, 15) primary 2 (16, 17, 18, 19, 20, 21, 22, 23) primary 3 (24, 25, 26, 27, 28, 29, 30, 31) primary 4 (64, 65, 66, 67, 68, 69, 70, 71) primary 5 (72, 73, 74, 75, 76, 77, 78, 79) primary 6 (80, 81, 82, 83, 84, 85, 86, 87) primary 7 (88, 89, 90, 91, 92, 93, 94, 95) primary
MEMORY PA SIZE BOUND 0x0 512K _sys_ 0x80000 1536K _sys_ 0x200000 94M _sys_ 0x6000000 32M _sys_ 0x8000000 96M _sys_ 0xe000000 7968M primary
IO
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
Configuring the Control and Service Domain 3-23Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
DEVICE PSEUDONYM BOUND OPTIONS pci@400 pci_0 yes pci@500 pci_1 yes
2. List the resources that are bound to the control domain.
primary# ldm list-bindings primaryNAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIMEprimary active -n-c-- SP 64 7968M 0.1% 17h 55m
MAC 00:14:4f:46:3e:4e
HOSTID 0x84463e4e
CONTROL failure-policy=ignore
DEPENDENCY master=
VCPU VID PID UTIL STRAND 0 0 0.6% 100% 1 1 0.1% 100% 2 2 0.0% 100% 3 3 0.0% 100% 4 4 0.0% 100% 5 5 0.0% 100% 6 6 0.0% 100% 7 7 0.0% 100% 8 8 0.0% 100% 9 9 0.0% 100% 10 10 0.0% 100% 11 11 0.0% 100% 12 12 0.0% 100% 13 13 0.0% 100% 14 14 0.0% 100% 15 15 0.0% 100% 16 16 0.0% 100% 17 17 0.0% 100% 18 18 0.0% 100% 19 19 0.0% 100% 20 20 0.0% 100% 21 21 0.0% 100% 22 22 0.0% 100%
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
3-24 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
23 23 4.1% 100% 24 24 0.0% 100% 25 25 0.0% 100% 26 26 0.0% 100% 27 27 0.5% 100% 28 28 0.0% 100% 29 29 0.0% 100% 30 30 0.0% 100% 31 31 0.0% 100% 64 64 0.0% 100% 65 65 0.0% 100% 66 66 0.0% 100% 67 67 0.0% 100% 68 68 0.0% 100% 69 69 0.0% 100% 70 70 0.0% 100% 71 71 0.0% 100% 72 72 0.0% 100% 73 73 0.0% 100% 74 74 0.1% 100% 75 75 0.0% 100% 76 76 0.0% 100% 77 77 0.0% 100% 78 78 0.0% 100% 79 79 0.0% 100% 80 80 0.0% 100% 81 81 0.0% 100% 82 82 0.0% 100% 83 83 0.0% 100% 84 84 0.0% 100% 85 85 0.0% 100% 86 86 0.0% 100% 87 87 0.0% 100% 88 88 0.0% 100% 89 89 0.0% 100% 90 90 0.0% 100% 91 91 0.0% 100% 92 92 0.0% 100% 93 93 0.0% 100% 94 94 0.0% 100% 95 95 0.0% 100%
MAU ID CPUSET 0 (0, 1, 2, 3, 4, 5, 6, 7) 1 (8, 9, 10, 11, 12, 13, 14, 15)
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
Configuring the Control and Service Domain 3-25Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
2 (16, 17, 18, 19, 20, 21, 22, 23) 3 (24, 25, 26, 27, 28, 29, 30, 31) 4 (64, 65, 66, 67, 68, 69, 70, 71) 5 (72, 73, 74, 75, 76, 77, 78, 79) 6 (80, 81, 82, 83, 84, 85, 86, 87) 7 (88, 89, 90, 91, 92, 93, 94, 95)
MEMORY RA PA SIZE 0xe000000 0xe000000 7968M
IO DEVICE PSEUDONYM OPTIONS pci@400 pci_0 pci@500 pci_1
VCONS NAME SERVICE PORT SP
How many virtual CPUs are currently available for creating guestdomains? 0 vCPUs
How much memory is currently available for creating guestdomains?0 memory
3. Assign one modular arithmetic unit to the primary domain.
primary# ldm set-mau 1 primary
4. Assign eight virtual CPUs to the primary domain.
primary# ldm set-vcpu 8 primary
5. Assign two gigabytes of memory to the primary domain.
primary# ldm set-memory 2G primaryInitiating delayed reconfigure operation on LDom primary. Allconfiguration changes for other LDoms are disabled until the LDomreboots, at which time the new configuration for LDom primary will alsotake effect.
6. Verify the resources assigned to the control domain by running theldm list-bindings command.
primary# ldm list-bindings primaryNAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIMEprimary active -ndc-- SP 8 2G 0.1% 17h 57m
MAC 00:14:4f:46:3e:4e
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
3-26 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
HOSTID 0x84463e4e
CONTROL failure-policy=ignore
DEPENDENCY master=
VCPU VID PID UTIL STRAND 0 0 0.2% 100% 1 1 0.1% 100% 2 2 0.1% 100% 3 3 0.1% 100% 4 4 0.1% 100% 5 5 0.2% 100% 6 6 0.2% 100% 7 7 0.1% 100%
MAU ID CPUSET 0 (0, 1, 2, 3, 4, 5, 6, 7)
MEMORY RA PA SIZE 0xe000000 0xe000000 2G
IO DEVICE PSEUDONYM OPTIONS pci@400 pci_0 pci@500 pci_1
VCONS NAME SERVICE PORT SP
Note that the status flags indicate that the primary domain is now in adelayed configuration state. The system must be rebooted for theconfiguration changes to take effect.
7. Reboot the control domain.
primary# shutdown -i6 -g0 -y...
You will have to wait a few minutes until the login prompt is available.
8. After the control domain has rebooted, log in as root.
console login: root
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
Configuring the Control and Service Domain 3-27Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Password: cangetin...
9. Generate a long listing of the primary domain to verify the newconfiguration was created correctly.
primary# ldm list-domain -l primaryNAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIMEprimary active -n-c-- SP 8 2G 37% 2m
SOFTSTATESolaris running
MAC 00:14:4f:46:3e:4e
HOSTID 0x84463e4e
CONTROL failure-policy=ignore
DEPENDENCY master=
VCPU VID PID UTIL STRAND 0 0 12% 100% 1 1 25% 100% 2 2 38% 100% 3 3 19% 100% 4 4 35% 100% 5 5 55% 100% 6 6 21% 100% 7 7 6.6% 100%
MAU ID CPUSET 0 (0, 1, 2, 3, 4, 5, 6, 7)
MEMORY RA PA SIZE 0xe000000 0xe000000 2G
IO DEVICE PSEUDONYM OPTIONS pci@400 pci_0 pci@500 pci_1
VCONS NAME SERVICE PORT SP
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
3-28 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Additionally, you can run the psrinfo and prtconf|grep Memcommands to view the results of your work.
Task 2 – Create Virtual Services
In this task you use the Logical Domains Management utility to createvirtual services to be used by guest domains.
You set up the following (Figure 3-5) virtual services:
● vdiskserver – The virtual disk server
● vswitch – The virtual switch service
● vconscon – The virtual console concentrator service
Figure 3-5 Logical Domain Virtual Services
Perform the following steps:
1. List the virtual services currently configured on the control domain.
primary# ldm list-services
There should be no services defined at this time.
2. Add a virtual disk service named primary-vds0 to the primarydomain.
primary# ldm add-vdiskserver primary-vds0 primary
vdiskserver is a virtual disk server that allows you to configure virtualdisks into a logical domain. Note that currently no volumes, partitions, orimage files have been bound to disk service primary-vds0.
3. Add a virtual console service named primary-vcc0 with a portrange of 5000 - 5100 to the primary domain.
primary# ldm add-vconscon port-range=5000-5100 primary-vcc0 primary
Service Domainvswitch vdiskserver vconscon
Hypervisor
DiskStorage
NetworkInterfaces
Hardware Resources
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
Configuring the Control and Service Domain 3-29Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
vconscon is a virtual console concentrator service with a specific range ofTCP ports to assign to each guest domain at the time it is created.
4. Add a virtual network switch service named primary-vsw0 to theprimary domain. Bind this virtual network switch to networkinterface nxge0.
primary# ldm add-vswitch net-dev=nxge0 primary-vsw0 primary
vswitch is a virtual network switch that connects the virtual networkdevices to the external network and also switches packets between them.
5. List the services to ensure they are configured correctly.
primary# ldm list-services primaryVCCNAME LDOM PORT-RANGEprimary-vcc0 primary 5000-5100
VSWNAME LDOM MAC NET-DEV ID DEVICE LINKPROP DEFAULT-VLAN-ID PVID VID MTU MODEprimary-vsw0 primary 00:14:4f:fb:79:88 nxge0 0 switch@0 1 1 1500
VDS NAME LDOM VOLUME OPTIONS MPGROUP DEVICE primary-vds0 primary
6. List the logical domain configurations currently stored on the systemcontroller.
primary# ldm list-spconfigfactory-default [next poweron]...
If configurations other than factory-default are listed, use theldm remove-spconfig config_name command to remove them atthis time. Do not remove the factory-default configuration.
primary# ldm remove-spconfig config_nameprimary# ldm list-spconfigfactory-default [next poweron]
7. Save the new configuration to the system controller. Name theconfiguration config_initial.
primary# ldm add-spconfig config_initial
8. List the configurations stored on the system controller.
primary# ldm list-spconfigfactory-defaultconfig_initial [current]
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
3-30 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
9. Generate a long listing of the primary domain to verify the newconfiguration was created correctly.
primary# ldm list-domain -l primaryNAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIMEprimary active -n-cv- SP 8 2G 0.2% 7m
SOFTSTATESolaris running
MAC 00:14:4f:46:3e:4e
HOSTID 0x84463e4e
CONTROL failure-policy=ignore
DEPENDENCY master=
VCPU VID PID UTIL STRAND 0 0 0.4% 100% 1 1 0.2% 100% 2 2 0.6% 100% 3 3 0.1% 100% 4 4 0.1% 100% 5 5 0.0% 100% 6 6 0.1% 100% 7 7 0.2% 100%
MAU ID CPUSET 0 (0, 1, 2, 3, 4, 5, 6, 7)
MEMORY RA PA SIZE 0xe000000 0xe000000 2G
IO DEVICE PSEUDONYM OPTIONS pci@400 pci_0 pci@500 pci_1
VCC NAME PORT-RANGE primary-vcc0 5000-5100
VSW NAME MAC NET-DEV ID DEVICE LINKPROP DEFAULT-VLAN-ID PVID VID MTU MODE primary-vsw0 00:14:4f:f9:bf:47 nxge0 0 switch@0 1 1 1500
VDS NAME VOLUME OPTIONS MPGROUP DEVICE primary-vds0
VCONS NAME SERVICE PORT SP
Additionally, you can run the psrinfo and prtconf|grep Memcommand to view the results of your work.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
Configuring the Control and Service Domain 3-31Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Task 3 – Configure the Virtual Switch as a PrimaryNetwork Interface
A virtual switch can serve as the primary network interface to the controldomain. This task demonstrates how the virtual switch can be configuredas the primary network interface for the control domain.
In this task you configure the virtual switch created in ‘‘Task 2 – CreateVirtual Services’’ on page 3-28 to access the subnet discovered in theprevious task. See Figure 3-6.
Figure 3-6 Virtual Switch Configuration
Perform the following steps:
1. Display the IP addressing information for all network interfaces.
This example uses machine # 4.
primary# ifconfig -alo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu8232 index 1 inet 127.0.0.1 netmask ff000000nxge0: flags=1000803<UP,BROADCAST,MULTICAST,IPv4> mtu 1500 index 7 inet 192.168.XX.104 netmask ffffff00 broadcast 192.168.XX.255 ether 0:15:17:8f:ec:4a
Subnet 192.168.xx.0
Hypervisor
Resource
Service Domain
vsw0
pci@500/../network@0
nxge0
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
3-32 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
2. Unplumb the current primary network interface (nxge0).
primary# ifconfig nxge0 unplumb
3. Plumb the virtual switch vsw0.
primary# ifconfig vsw0 plumb
4. Manually configure the IP addressing information for the vsw0network interface. Use the IP address information originallyassigned to the nxge0 interface (see the results from Step 1). Be sureto set the up flag.
The following example shows network configuration information formachine 4.
primary# ifconfig vsw0 192.168.XX.104 netmask 255.255.255.0 \broadcast + up
5. Use the ifconfig -a command to verify the new IP configuration.
primary# ifconfig -alo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu8232 index 1 inet 127.0.0.1 netmask ff000000vsw0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3 inet 192.168.XX.104 netmask ffffff00 broadcast 192.168.XX.255 ether 0:14:4f:f9:da:3b
6. Use the ping command to verify the vsw0 interface can access thesubnet discovered in the previous step.
primary# ping -s 192.168.XX.255
You should see responses from other systems on the subnet.
7. Rename the /etc/hostname.nxge0 file to /etc/hostname.vsw0 sothat the virtual switch will automatically be configured as theprimary interface after the next OS reboot.
primary# mv /etc/hostname.nxge0 /etc/hostname.vsw0 Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
Configuring the Control and Service Domain 3-33Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Task 4 – Enable the Virtual Network Terminal Server
The virtual network terminal server daemon (vntsd) provides access tothe virtual console for each guest domain. By default, this daemon isdisabled.
In this task you enable the vntsd daemon.
Perform the following steps:
1. Run the svcs vntsd command to determine the current state of thevntsd daemon.
primary# svcs -l vntsd..state: disabled...
The state should be “disabled”.
When the vntsd daemon is disabled, you will experience telnetfailures when opening a console session on guest domains. Forexample:
# telnet localhost 5000Trying 127.0.0.1...telnet: Unable to connect to remote host: Connectionrefused
2. Use the svcadm command to enable the virtual network terminalserver daemon, vntsd.
primary# svcadm enable vntsd
3. Use the svcs command to verify that the vntsd daemon is enabled.
primary# svcs -l vntsd...state online...
The state should be “online”.O
racl
e U
nive
rsity
and
BO
S-it
Gm
bH &
Co.
KG u
se o
nly
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
3-34 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Lab Exercise Summary
?!
Discussion – Take a few minutes to discuss the experiences, issues, ordiscoveries you had during the lab exercise.
● Experiences
● Interpretations
● Conclusions
● Applications
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
4-1Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Module 4
Creating aGuestDomain
Objectives
This module describes how to create a guest domain.
Upon completion of this module, you should be able to:
● Determine which resources are available to assign to a guest domain.
● Create and start a guest domain.
● Install the Solaris OS on a guest domain using JumpStart.
● Verify a guest domain configuration.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Additional Resources
4-2 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Additional Resources
The following reference provides additional information on the topicsdescribed in this module:
● Logical Domains 1.3 Administration Guide, Part No: 821-0406-10
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Introduction
Creating a Guest Domain 4-3Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Introduction
After you have configured the control and service domain, your next taskis to create the appropriate number of guest domains needed to supportyour Logical Domains environment requirements. You may recall fromModule 1 that each guest domain runs an operating system instance andleverages the services provided by a service domain to run applicationsand user services.
In this module you will be shown how to create and start a guest domain.After you have been shown how to create a guest domain, you will begiven the opportunity to apply what you have learned by completing alab exercise.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Creating and Starting a Guest Domain
4-4 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Creating and Starting a Guest Domain
A guest domain must run an operating system that understands both thesun4v platform and the virtual devices presented by the hypervisor.Currently, for Logical Domains 1.3 this means that you must run at leastthe Solaris 10 8/07 OS. However, to have all the Logical Domains 1.3features, you need to run the Solaris 10 10/09 OS.
In this section you are shown how to determine which resources areavailable to assign to a guest domain, how to create the domain using theavailable resources, and how to start the domain.
Determining Available Resources
Before you create a guest domain, you will need to determine whatresources are available to assign to the domain. To do this, you will needto look at which domains are currently configured, what devices are beingused by those domains, what services are being used by the servicedomain, and what resources are bound to which logical domains.
You can use the following commands to gather this information:
● ldm list-domain – This command shows you which logicaldomains are currently configured.
● ldm list-devices – This command shows you the system devicescurrently configured in the system. These devices are resources youassign to logical domains and include CPU threads, MAUs, memory,and PCI buses.
● ldm list-services – This command shows you the servicescurrently provided by the service domain.
● ldm list-bindings – This command shows you the resourcesbound to the currently configured logical domains.
Once you know what resources are available and how you are going toassign those resources, you can create the guest domain.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Creating and Starting a Guest Domain
Creating a Guest Domain 4-5Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Creating the Guest Domain
The process for creating and starting a guest domain is as follows:
● Add the guest domain.
● Add the CPU and memory resources.
● Add cryptographic resources (optional).
● Add virtual devices.
● Set the auto-boot? and boot-device variables (optional).
● Bind the resources to the guest domain.
● Start the guest domain.
● Connect to the console of the guest domain.
In the example that follows, you are shown how to create and start guestdomain ldom1 using the process presented above.
To create a guest domain and then start it, enter the following commands:
1. Add a guest domain.
primary# ldm add-domain ldom1
Note – The subcommand shortcut for add-domain is create.
2. Add CPUs to the guest domain. For example, to add eight virtualCPUs to guest domain ldom1, type:
primary# ldm add-vcpu 8 ldom1
3. Add memory to the guest domain. For example, to add twogigabytes of memory to guest domain ldom1, type:
primary# ldm add-memory 2G ldom1
4. Add a virtual network device to the guest domain. For example, thefollowing command would add a virtual network device with thesespecifics to the guest domain ldom1:
primary# ldm add-vnet vnet0 primary-vsw0 ldom1
● vnet0 is a unique interface name to the logical domain,assigned to this virtual network device instance for reference onsubsequent set-vnet or remove-vnet subcommands.
● primary-vsw0 is the name of an existing network service(virtual switch) to which to connect.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Creating and Starting a Guest Domain
4-6 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Note – You also have the option of setting a specific MAC address for thisvirtual network device. You will have the opportunity to do this as part ofthe lab exercise at the end of this module.
5. Specify the device to be exported by the virtual disk server as avirtual disk to the guest domain.
You can export a physical disk, disk slice, volumes, or file as a blockdevice. The following examples show a physical disk and a file.
● Physical Disk Example. The first example adds a physical diskwith these specifics.
primary# ldm add-vdiskserverdevice \/dev/dsk/c2t1d0s2 vol0@primary-vds0
Note – Make sure you use slice 2 and not slice 0.
● File Example. This second example is exporting a file as a blockdevice.
primary# ldm add-vdiskserverdevice \/var/tmp/backend vol1@primary-vds0
Note – The alias for vdiskserverdevice is vdsdev.
6. Add a virtual disk to the guest domain.
primary# ldm add-vdisk vdisk0 vol0@primary-vds0 ldom1
7. Set the auto-boot? variable for the guest domain. For example, toset auto-boot? to false, type:
primary# ldm set-variable auto-boot\?=false ldom1
Note – The alias for set-variable is set-var.
Note – You do not need to set a boot-device variable because a guestdomain will boot on the first virtual disk.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Creating and Starting a Guest Domain
Creating a Guest Domain 4-7Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
8. Bind the resources to the guest domain.
primary# ldm bind-domain ldom1
Note – The subcommand shortcut for bind-domain is bind.
9. Start the guest domain.
primary# ldm start-domain ldom1
Note – The subcommand shortcut for start-domain is start.
10. To find the console port of the guest domain, you can look at theoutput of the list-domain subcommand.
primary# ldm list-domain ldom1
Note – The subcommand shortcut for list-domain is list.
11. Connect to the console of the guest domain. There are several waysyou can do this:
● By default, you can you can access a guest domain’s consolefrom the control domain by running the following command:
primary# telnet localhost 5000
● Or you can configure the vntsd service so that it can beaccessed remotely (that is, from outside of the control domain).Once the vntsd service is properly configured for remoteaccess, you can access the domain’s console from a systemdifferent from the control domain by running the command:
# telnet hostname-of-the-control-domain 5000
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Creating and Starting a Guest Domain
4-8 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Figure 4-1 shows the logical interconnections for a guest domain after ithas been created. The device path information may differ on your server.
Figure 4-1 Guest Domain Configuration
Internal Disk 1Network
Hypervisor
Service Domain
primary-vsw0
primary-vds0
/pci@400/../sd@1,0/pci@500/../network@0
c0d0
vnet0
vnet0CPUs
Memory
MemoryCPUs
Guest Domain
nxge0
vol0
c1t1d0s2
vdisk0
Resources
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Installing the Solaris OS on a Guest Domain Using JumpStart
Creating a Guest Domain 4-9Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Installing the Solaris OS on a Guest Domain UsingJumpStart
After you have created and started a guest domain, you will need toinstall the Solaris OS on that domain. There are several different ways youcan install the Solaris OS on a guest domain:
● From a DVD
● From a Solaris ISO file
● Using JumpStart
In this class you are shown how to install the Solaris OS on a guestdomain using JumpStart. For instructions on how to install the Solaris OSon a guest domain from a DVD or from a Solaris ISO file, see “InstallingSolaris OS on a Guest Domain” in the Logical Domains 1.3 AdministrationGuide.
To jumpstart a guest domain, you must first modify the basic SolarisJumpStart profile as follows:
Normal JumpStart profile:
filesys c1t1d0s0 free /filesys c1t1d0s1 2048 swapfilesys c1t1d0s5 120 /spare1filesys c1t1d0s6 120 /spare2
Virtual disk device names in a logical domain differ from physical diskdevice names in that they do not contain a target ID (tN) in the devicename. Instead of the normal cNtNdNsN format, virtual disk device namesare of the format cNdNsN, where cN is the virtual controller, dN is thevirtual disk number, and sN is the slice. Modify your JumpStart profile toreflect this change as in the following profile example:
JumpStart profile used for a logical domain:
filesys c0d0s0 free /filesys c0d0s1 2048 swapfilesys c0d0s5 120 /spare1filesys c0d0s6 120 /spare2
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Installing the Solaris OS on a Guest Domain Using JumpStart
4-10 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
In order to JumpStart the Solaris Operating System aliases must exist forthe virtual devices. Aliases are now automatically created based on thename of the virtual device (name used with ldm add-vnet or ldm add-vdisk).
You can directly JumpStart the Solaris operating system by using thefollowing command:
{1} ok boot vnet0 -v install
Note – Because the devalias net is also defined to be the first virtualnetwork interface, you could use boot net -v install as well.
Figure 4-2 shows an example of the logical path the operating systeminstallation takes through the system.
Figure 4-2 JumpStart Installation Path
Internal Disk 1
Hypervisor
Service Domain
primary-vsw0
primary-vds0
���������������������������� ��������
c0d0 vnet0vnet0
Guest Domain
nxge0
vol0
c1t1d0s2
vdisk0
Resources
JumpStart Server
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Verifying a Guest Domain Configuration
Creating a Guest Domain 4-11Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Verifying a Guest Domain Configuration
After you have created the guest domain, you will ensure theconfiguration is correct.
You can get the information you need from the Logical Domains Managerby running the ldm command with the appropriate subcommands and bylogging into the guest domain and running OpenBoot PROM and Solarisoperating system commands. Table 4-1 summarizes the commands youwill use to verify the guest domain configuration.
Table 4-1 Guest Domain Verification Commands
Property Command
Number ofdomains
primary# ldm list-domain
Domainnames
primary# ldm list-domain
Operatingenvironment
guest# uname -aandguest# more /etc/release
CPUresources
primary# ldm list-domain -l ldom1and{0} show-devsandguest# psrinfo -vp
Memoryresources
primary# ldm list-domain -l ldom1andguest# prtdiag|grep Mem
Networkresources
{0} ok show-netsandguest# ifconfig -a
Diskresources
{0} ok show-disksandguest# format
Auto bootvariable
primary# ldm list-variable auto-boot\? ldom1and{0} ok printenv auto-boot?andguest# eeprom auto-boot\?
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Verifying a Guest Domain Configuration
4-12 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
You should now have a basic understanding of how to build thefoundation for a Logical Domains environment. After you complete thelab exercise that concludes this module, you will be shown how toperform a series of more advanced administration tasks in modules 5 and6.
Boot devicevariable
primary# ldm list-variable boot-device ldom1and{0} ok printenv boot-deviceandguest# eeprom boot-device
Table 4-1 Guest Domain Verification Commands (Continued)
Property Command
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
Creating a Guest Domain 4-13Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Applying What You Have Learned – Lab Exercise
Now that you know how to create and start a guest domain, try applyingwhat you have learned in the lab exercise that follows.
In this exercise, you will perform the following tasks:
● Create a guest domain.
● Switch between control and guest domains.
● JumpStart the guest domain.
● Explore the guest domain.
Preparation
To prepare for this lab exercise:
● Review the LDom services you configured in the previous exercise.
● When performing this exercise, use the following system logininformation. See your instructor if you need help.
Control domain operating system:
● Login name root
● Login password cangetin
Guest domain operating system:
● Login name root
● Login password cangetin
Note – Examples shown in this exercise are from lab machine 4. Thecommand responses shown in the lab are examples only. Depending uponyour lab configuration, the responses to the commands in the labs mightvary slightly.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
4-14 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Task 1 – Create a Guest Domain
In this task you use the logical domain management utility to create aguest domain.
You add the following resources (Figure 4-3) to your new guest domain:
● Eight virtual CPUs
● Two gigabytes of memory
● One virtual network interface
● One virtual disk drive
Figure 4-3 Guest Domain Configuration
Internal Disk 1Network
Hypervisor
Service Domain
primary-vsw0
primary-vds0
/pci@400/../sd@1,0/pci@500/../network@0
c0d0
vnet0
vnet0CPUs
Memory
MemoryCPUs
Guest Domain
nxge0
vol0
c1t1d0s2
vdisk0
Resources
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
Creating a Guest Domain 4-15Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Perform the following steps:
1. Verify you are logged in to the host machine’s control domain asroot.
2. List the control domain services.
primary# ldm list-services primaryVCCNAME LDOM PORT-RANGEprimary-vcc0 primary 5000-5100
VSWNAME LDOM MAC NET-DEV ID DEVICE LINKPROP DEFAULT-VLAN-ID PVID VID MTU MODEprimary-vsw0 primary 00:14:4f:fb:79:88 nxge0 0 switch@0 1 1 1500
VDS NAME LDOM VOLUME OPTIONS MPGROUP DEVICE primary-vds0 primary
Are there sufficient services available to create the new guest domainthat has a boot disk and network interface? Yes
3. List all the host server devices to identify the resources available forcreating a new guest domain.
primary# ldm list-devices -aVCPU PID %FREE PM 0 0 no 1 0 no 2 0 no 3 0 no 4 0 no 5 0 no 6 0 no 7 0 no 8 100 --- 9 100 --- 10 100 --- 11 100 --- 12 100 --- 13 100 --- 14 100 --- 15 100 --- 16 100 --- 17 100 --- 18 100 --- 19 100 --- 20 100 --- 21 100 --- 22 100 ---
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
4-16 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
23 100 --- 24 100 --- 25 100 --- 26 100 --- 27 100 --- 28 100 --- 29 100 --- 30 100 --- 31 100 --- 64 100 --- 65 100 --- 66 100 --- 67 100 --- 68 100 --- 69 100 --- 70 100 --- 71 100 --- 72 100 --- 73 100 --- 74 100 --- 75 100 --- 76 100 --- 77 100 --- 78 100 --- 79 100 --- 80 100 --- 81 100 --- 82 100 --- 83 100 --- 84 100 --- 85 100 --- 86 100 --- 87 100 --- 88 100 --- 89 100 --- 90 100 --- 91 100 --- 92 100 --- 93 100 --- 94 100 --- 95 100 ---
MAU ID CPUSET BOUND 0 (0, 1, 2, 3, 4, 5, 6, 7) primary 1 (8, 9, 10, 11, 12, 13, 14, 15)
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
Creating a Guest Domain 4-17Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
2 (16, 17, 18, 19, 20, 21, 22, 23) 3 (24, 25, 26, 27, 28, 29, 30, 31) 4 (64, 65, 66, 67, 68, 69, 70, 71) 5 (72, 73, 74, 75, 76, 77, 78, 79) 6 (80, 81, 82, 83, 84, 85, 86, 87) 7 (88, 89, 90, 91, 92, 93, 94, 95)
MEMORY PA SIZE BOUND 0x0 512K _sys_ 0x80000 1536K _sys_ 0x200000 94M _sys_ 0x6000000 32M _sys_ 0x8000000 96M _sys_ 0xe000000 2G primary 0x8e000000 5920M
IO DEVICE PSEUDONYM BOUND OPTIONS pci@400 pci_0 yes pci@500 pci_1 yes
Are there sufficient vCPU and memory resources available to createthe new guest domain? Yes
4. Use the ldm add-domain command to create the framework for anew guest domain named ldom1.
primary# ldm add-domain ldom1
5. Add eight virtual CPUs to the configuration of guest domain ldom1.
primary# ldm add-vcpu 8 ldom1
6. Add two gigabytes of memory to the configuration of guest domainldom1.
primary# ldm add-memory 2G ldom1
7. List the bindings for guest domain ldom1.
primary# ldm list-bindings ldom1NAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIMEldom1 inactive ------ 8 2G
CONTROL failure-policy=ignore
DEPENDENCY master=
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
4-18 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
8. Add a virtual network interface named vnet0 to the configuration ofguest domain ldom1. Bind vnet0 to the virtual switch primary-vsw0. Use the information in Table 4-2 to assign an Ethernet addressthat is associated with your lab machine to the vnet0 interface. Thevalid range of MAC addresses that can be assigned for logicaldomains are described in Table 4-2. Note that you must change thefifth octet to match the subnet address of your lab environment. Usethe ifconfig -a command to determine the correct subnet address.
primary# ldm add-vnet mac-addr=00:14:4F:FC:XX:04 vnet0 primary-vsw0ldom1
Note that you must use the appropriate Ethernet address from Table 4-2 toJumpStart the logical domain later in this exercise. The fifth octet in theEthernet address could vary depending on which lab “pod” you areassigned. See your instructor if you have any questions.
9. Add a disk named vol0 to the virtual disk service. Bind the seconddisk drive on your primary PCI bus to vol0. Refer to theconfiguration information you gathered earlier in the course.
For example:
primary# ldm add-vdiskserverdevice /dev/dsk/c1t1d0s2 \vol0@primary-vds0
10. Add a virtual disk named vdisk0 to the configuration of guestdomain ldom1. Use the volume currently bound to virtual diskservice vds0.
primary# ldm add-vdisk vdisk0 vol0@primary-vds0 ldom1
The virtual disk (vdisk0) exported to guest domain ldom1 will berepresented in the guest domain’s OpenBoot environment as device/virtual-devices@100/channel-devices@200/disk@0. You usethe show-disks OpenBoot command to determine this device name.
Table 4-2 Lab Ethernet Address Assignments
Assigned Machine Ethernet Address
machine1 00:14:4F:FC:XX:01
machine2 00:14:4F:FC:XX:02
machine3 00:14:4F:FC:XX:03
machine4 00:14:4F:FC:XX:04
machine5 00:14:4F:FC:XX:05
machine6 00:14:4F:FC:XX:06
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
Creating a Guest Domain 4-19Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Note that the boot-device variable for guest domain ldom1 will defaultto the first disk which is now vdisk0.
11. Set the auto-boot? variable for guest domain ldom1 to false.
primary# ldm set-variable auto-boot\?=false ldom1
12. Bind all the resources you configured in this task to the guestdomain ldom1.
primary# ldm bind-domain ldom1
13. List the logical domains.
primary# ldm list-domainNAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIMEprimary active -n-cv SP 8 2G 0.2% 6d 20h 4mldom1 bound ----- 5000 8 2G
Note that ldom1 is currently in the bound state.
14. List the constraints for guest domain ldom1 in machine-readableformat.
primary# ldm list-constraints -p ldom1VERSION 1.4DOMAIN|name=ldom1CONTROL|failure-policy=ignoreVCPU|count=8MEMORY|size=2147483648VARIABLES|auto-boot?=falseVNET|name=vnet0|dev=network@0|service=primary-vsw0|mac-addr=00:14:4f:fc:06:04|mode=|pvid=1|vid=|mtu=|linkprop=|id=0VDISK|name=vdisk0|vol=vol0@primary-vds0|timeout=|id=0VCONS|group=|service=|port=
15. Create a backup configuration file named /var/tmp/ldom1.xmlcontaining the constraints for guest domain ldom1 in XML format.
primary# ldm list-constraints -x ldom1 > /var/tmp/ldom1.xml
This XML-based file can be used to restore the logical domain (ldom1)configuration. For example, to restore the configuration for logical domainldom1, you run the ldm bind-domain -i ldom1.xml command.
16. Start logical domain ldom1.
primary# ldm start-domain ldom1LDom ldom1 started
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
4-20 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
17. Generate a long listing of all the logical domains in the system toverify your work.
primary# ldm list-domain -lNAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIMEprimary active -n-cv- SP 8 2G 0.2% 38m
SOFTSTATESolaris running
MAC 00:14:4f:46:3e:4e
HOSTID 0x84463e4e
CONTROL failure-policy=ignore
DEPENDENCY master=
VCPU VID PID UTIL STRAND 0 0 0.3% 100% 1 1 0.1% 100% 2 2 0.1% 100% 3 3 0.1% 100% 4 4 0.1% 100% 5 5 0.2% 100% 6 6 0.1% 100% 7 7 0.8% 100%
MAU ID CPUSET 0 (0, 1, 2, 3, 4, 5, 6, 7)
MEMORY RA PA SIZE 0xe000000 0xe000000 2G
IO DEVICE PSEUDONYM OPTIONS pci@400 pci_0 pci@500 pci_1
VCC NAME PORT-RANGE primary-vcc0 5000-5100
VSW NAME MAC NET-DEV ID DEVICE LINKPROP DEFAULT-VLAN-ID PVID VID MTU MODE primary-vsw0 00:14:4f:fb:79:88 nxge0 0 switch@0 1 1 1500
VDS NAME VOLUME OPTIONS MPGROUP DEVICE primary-vds0 vol0 /dev/dsk/c1t1d0s2
VCONS NAME SERVICE PORT SP
------------------------------------------------------------------------------NAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIMEldom1 active -t---- 5000 8 2G 12% 16s
SOFTSTATEOpenBoot Running
MAC 00:14:4f:fa:61:06
HOSTID 0x84fa6106
CONTROL failure-policy=ignore
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
Creating a Guest Domain 4-21Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
DEPENDENCY master=
VCPU VID PID UTIL STRAND 0 8 100% 100% 1 9 0.0% 100% 2 10 0.0% 100% 3 11 0.0% 100% 4 12 0.0% 100% 5 13 0.0% 100% 6 14 0.0% 100% 7 15 0.0% 100%
MEMORY RA PA SIZE 0xe000000 0x8e000000 2G
VARIABLES auto-boot?=false
NETWORK NAME SERVICE ID DEVICE MAC MODE PVID VID MTU LINKPROP vnet0 primary-vsw0@primary 0 network@0 00:14:4f:fc:06:04 1 1500
DISK NAME VOLUME TOUT ID DEVICE SERVER MPGROUP vdisk0 vol0@primary-vds0 0 disk@0 primary
VCONS NAME SERVICE PORT ldom1 primary-vcc0@primary 5000
Task 2 – Switch Between Control and Guest Domains
To move between the control domain and guest domain, perform thesesteps:
1. Log in to the guest domain.
primary# telnet localhost 5000Trying 127.0.0.1...Connected to localhost.Escape character is '^]'.
Connecting to console "ldom1" in group "ldom1" ....Press ~? for control options ...{0} ok
You can obtain the logical domain console port number from the “Cons”field when running the ldm list-domain command.
If you don’t see the ok prompt, tap the Enter key.
2. Move back to the control domain.
{0} ok ~.Connection to localhost closed by foreign host.primary#
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
4-22 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Note – For the remainder of this course, instead of using the telnet/~.method of navigating between logical domains, you will open a windowfor each logical domain and simply click the appropriate window to dowork. To open an additional window for the guest domain, click the hostterminal application on the SGD desktop. In the terminal window, run thetelnet localhost 5000 command to access the guest domain. Log in asroot. There will be times during the lab when the control domain must berebooted. This will cause the terminal window to close. When thishappens, simply reopen the terminal after the system has reboot.
Task 3 – JumpStart the Guest Domain
In this task you open a virtual console to the guest domain, configure thevirtual devices in the OpenBoot environment, and JumpStart theoperating system. See Figure 4-4.
Figure 4-4 JumpStart Guest Domain
Internal Disk 1
Hypervisor
Service Domain
primary-vsw0
primary-vds0
���������������������������� ��������
c0d0 vnet0vnet0
Guest Domain
nxge0
vol0
c1t1d0s2
vdisk0
Resources
JumpStart Server
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
Creating a Guest Domain 4-23Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Perform the following steps:
1. Verify that you have a terminal window open on the guest domainand a console window open on the control domain.
2. Move to the guest domain window.
3. Run the banner command to display the guest domain ldom1OpenBoot banner.
{0} ok bannerT5140, No KeyboardCopyright 2009 Sun Microsystems, Inc. All rights reserved.OpenBoot 4.30.6, 2048 MB memory available, Serial #83517702.Ethernet address 0:14:4f:fa:61:6, Host ID: 84fa6106.
4. Use the printenv command to display the OpenBoot environmentvariables.
{0} ok printenvVariable Name Value Default Value
ttya-rts-dtr-off false falsettya-ignore-cd true truekeyboard-layoutreboot-commandsecurity-mode none No defaultsecurity-password No defaultsecurity-#badlogins 0 No defaultverbosity min minpci-mem64? true truediag-switch? false falselocal-mac-address? true truefcode-debug? false falsescsi-initiator-id 7 7oem-logo No defaultoem-logo? false falseoem-banner No defaultoem-banner? false falseansi-terminal? true truescreen-#columns 80 80screen-#rows 34 34ttya-mode 9600,8,n,1,- 9600,8,n,1,-output-device virtual-console virtual-consoleinput-device virtual-console virtual-consoleauto-boot-on-error? false falseload-base 16384 16384auto-boot? false truenetwork-boot-arguments
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
4-24 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
boot-command boot bootboot-fileboot-device disk disk netmultipath-boot? false falseboot-device-index 0 0use-nvramrc? false falsenvramrcerror-reset-recovery boot boot{0} ok
Is the auto-boot? variable configured as specified in Task 1? Yes.
5. Use the show-devs command to display the guest domain ldom1devices. Type q to quit the command.
{0} ok show-devs/cpu@7/cpu@6/cpu@5/cpu@4/cpu@3/cpu@2/cpu@1/cpu@0/virtual-devices@100/virtual-memory/memory@m0,e000000/aliases/options/openprom/chosen/packages/virtual-devices@100/channel-devices@200/virtual-devices@100/console@1/virtual-devices@100/random-number-generator@e/virtual-devices@100/ncp@6/virtual-devices@100/n2cp@7/virtual-devices@100/flashprom@0/virtual-devices@100/channel-devices@200/virtual-domain-service@0/virtual-devices@100/channel-devices@200/disk@0/virtual-devices@100/channel-devices@200/network@0/openprom/client-services/packages/obp-tftp/packages/kbd-translator/packages/SUNW,asr/packages/dropins/packages/terminal-emulator/packages/disk-label
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
Creating a Guest Domain 4-25Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
/packages/deblocker/packages/SUNW,builtin-drivers
6. Use the show-disks command to display the guest domain ldom1disks. Type q to quit the command.
{0} ok show-disksa) /virtual-devices@100/channel-devices@200/disk@0q) NO SELECTIONEnter Selection, q to quit:q
7. Use the show-nets command to display the guest domain ldom1network devices. Select the virtual network by typing the letterassociated with it.
{0} ok show-netsa) /virtual-devices@100/channel-devices@200/network@0q) NO SELECTIONEnter Selection, q to quit: q
8. List the disk and network aliases. Use the network device nameobtained in the previous step.
Note that aliases for the virtual disk and network are automatically createdusing the names you provided.
{0} ok devaliasvdisk0 /virtual-devices@100/channel-devices@200/disk@0vnet0 /virtual-devices@100/channel-devices@200/network@0net /virtual-devices@100/channel-devices@200/network@0disk /virtual-devices@100/channel-devices@200/disk@0virtual-console /virtual-devices/console@1name aliases
{0} ok
9. JumpStart the guest domain ldom1 using the vnet0 device alias.
Note – Jumpstarting the Standard End User metacluster takesapproximately 30 minutes to complete.
{0} ok boot vnet0 -v installBoot device: /virtual-devices@100/channel-devices@200/network@0 File andargs: - installRequesting Internet Address for 0:14:4f:fc:XX:4Using RARP/BOOTPARAMS...Internet address is: 192.168.6.43hostname: machine4-vnet0domainname: brom.suned.com
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
4-26 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
...
Contact your instructor if the JumpStart does not begin to load thesoftware packages.
Note – After the OS has been installed and the SMF service descriptionshave been loaded, the JumpStart operation will run a postinstallationscript to set the root password to cangetin. This will cause the OS toreboot. After the OS has rebooted, you can log in as root with thepassword cangetin.
Task 4 – Explore the Guest Domain
In this task you open a virtual console to the guest domain, log in to theguest domain operating system, and explore the guest domain.
Perform the following steps:
1. After the Solaris 10 operating system has been completely installedin the guest domain ldom1, log in to the Solaris OS as root. Use thepassword cangetin.
machine4_vnet0 console login: rootPassword: cangetinJan 20 12:43:42 machine4-vnet0 login: ROOT LOGIN /dev/consoleSun Microsystems Inc. SunOS 5.10 Generic January 2005Welcome to SA345LDOM_B on machine4-vnet0
2. Check the /etc/path_to_inst file to determine if the networkinterfaces nxge and e1000g are present.
guest# more /etc/path_to_inst## Caution! This file contains critical kernel state#"/iscsi" 0 "iscsi""/pseudo" 0 "pseudo""/scsi_vhci" 0 "scsi_vhci""/options" 0 "options""/ramdisk-root" 0 "ramdisk""/virtual-devices@100" 0 "vnex""/virtual-devices@100/channel-devices@200" 0 "cnex""/virtual-devices@100/channel-devices@200/network@0" 0 "vnet""/virtual-devices@100/channel-devices@200/disk@0" 0 "vdc""/virtual-devices@100/channel-devices@200/virtual-domain-service@0" 0 "vlds""/virtual-devices@100/console@1" 0 "qcn"
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
Creating a Guest Domain 4-27Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
"/virtual-devices@100/ncp@6" 0 "ncp""/virtual-devices@100/random-number-generator@e" 0 "n2rng""/virtual-devices@100/n2cp@7" 0 "n2cp"
Are the on-board network interfaces present? No.
Why?
The network interfaces nxge and e1000g are not present in guest domainldom1 because neither the pci@400 PCI bus nor pci@500 PCI bus iscurrently bound to ldom1.
Verify that the virtual network interface vnet is present.
3. Run the dladm show-link command to view network linksavailable on the operating system.
guest# dladm show-linkvnet0 type: non-vlan mtu: 1500 device: vnet0
4. Verify the new IP configuration.
guest# ifconfig -alo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu8232 index 1 inet 127.0.0.1 netmask ff000000vnet0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index2 inet 192.168.XX.43 netmask ffffff00 broadcast 192.168.XX.255 ether 0:14:4f:fc:6:4
5. Verify that guest domain ldom1 can access the subnet discovered inthe previous step. For example:
guest# ping -s 192.168.XX.255...^C
You should see responses from other systems on the subnet.
6. Use the psrinfo command to determine how many virtual CPUscan be seen by the operating system.
guest# psrinfo0 on-line since 02/09/2010 12:42:251 on-line since 02/09/2010 12:42:262 on-line since 02/09/2010 12:42:263 on-line since 02/09/2010 12:42:264 on-line since 02/09/2010 12:42:265 on-line since 02/09/2010 12:42:266 on-line since 02/09/2010 12:42:267 on-line since 02/09/2010 12:42:26
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
4-28 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
7. Use the prtdiag command to determine how much memory can beseen by the operating system.
guest# prtdiag|grep MemMemory size: 2048 Megabytes
8. Run the format command to determine which disks are available onthe operating system. Be sure to view the partition table.
guest# formatSearching for disks...doneAVAILABLE DISK SELECTIONS:0. c0d0 <SUN300G cyl 46873 alt 2 hd 20 sec 625> /virtual-devices@100/channel-devices@200/disk@0Specify disk (enter its number): 0selecting c0d0[disk unformatted]Warning: Current Disk has mounted partitions./dev/dsk/c0d0s0 is currently mounted on /. Please see umount(1M)./dev/dsk/c0d0s1 is currently used by swap. Please see swap(1M)....format> partition...partition> printCurrent partition table (original):Total disk cylinders available: 46873 + 2 (reserved cylinders)
Part Tag Flag Cylinders Size Blocks0 root wm 84 - 46872 278.88GB (46789/0/0) 5848625001 swap wu 0 - 83 512.70MB (84/0/0) 10500002 backup wm 0 - 46872 279.38GB (46873/0/0) 5859125003 unassigned wm 0 0 (0/0/0) 04 unassigned wm 0 0 (0/0/0) 05 unassigned wm 0 0 (0/0/0) 06 unassigned wm 0 0 (0/0/0) 07 unassigned wm 0 0 (0/0/0) 0
partition> ^Dguest#
Note the disk name c0d0. Virtual disk device names in a logical domaindiffer from physical disk device names in that they do not contain a targetID (tN) in the device name. Instead of the normal cNtNdNsN format,virtual disk device names are of the format cNtNdNsN, where cN is thevirtual controller, dN is the virtual disk number, and sN is the slice.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
Creating a Guest Domain 4-29Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Lab Exercise Summary
?!
Discussion – Take a few minutes to discuss the experiences, issues, ordiscoveries you had during the lab exercise.
● Experiences
● Interpretations
● Conclusions
● Applications
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
4-30 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Notes:
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
5-1Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Module 5
PerformingLogicalDomains Administration
Objectives
This module shows you how to perform a variety of Logical Domainsadministration tasks.
Upon completion of this module, you should be able to:
● Reconfigure logical domains resources.
● Use virtual disks.
● Use virtual networks.
● Manage logical domains configurations.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Additional Resources
5-2 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Additional Resources
The following reference provides additional information about the topicsdescribed in this module:
● Logical Domains 1.3 Administration Guide, Part No: 821-0406-10
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Introduction
Performing Logical Domains Administration 5-3Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Introduction
In this module you will be shown how to perform several key LogicalDomains administrative tasks.
First, you will learn how to reconfigure the logical domain resources youset up during your initial configuration of the system. You will also learnabout dynamic and delayed reconfiguration.
In the second and third sections you will be shown how to use virtualdisks and configure virtual networks.
In the last section of this module you will learn how to manage the logicaldomain configurations you have set up. The tasks include removing andrestoring guest domain configurations and resetting a Logical Domainsconfiguration to either a user-defined or factory default configuration.
Note – There is no lab for this module. The tasks presented in this moduleare included in the lab exercise for Module 6.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Reconfiguring Logical Domain Resources
5-4 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Reconfiguring Logical Domain Resources
Reconfiguration operations on logical domains are handled by the LogicalDomains Manager as either a dynamic reconfiguration operation or adelayed reconfiguration operation, depending on the resource and thestate of the logical domain under reconfiguration.
In this section you are introduced to the concepts of dynamic and delayedreconfiguration and shown how to reconfigure virtual CPUs and memoryin logical domains.
Overview of Dynamic and Delayed ReconfigurationOperations
This section explains the differences between dynamic and delayedreconfiguration and provides a brief introduction to dynamic resourcemanagement (DRM).
Dynamic Reconfiguration
Dynamic reconfiguration (DR) is the ability to add or remove resourceswhile the operating system is running. The ability to perform dynamicreconfiguration of a particular resource type is dependent on havingsupport in the OS running in the logical domain.
This depends on the OS and on the Logical Domains (LDoms) version:
● Virtual CPUs: supported since LDoms 1.0 with at least Solaris 1011/06 OS
● Virtual device services: supported since LDoms 1.1 with at leastSolaris 10 10/08 OS
● Virtual I/O devices: supported since LDoms 1.1 with at least Solaris10 10/08 OS
● Cryptographic units: supported since LDoms 1.3 with at least Solaris10 10/09 OS
To use the dynamic reconfiguration capability, the Logical Domainsdynamic reconfiguration daemon, drd, must be running in the domainthat you want to change. See the drd(1M) man page for more information.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Reconfiguring Logical Domain Resources
Performing Logical Domains Administration 5-5Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
To reconfigure a resource that does not support dynamic reconfiguration,the domain has to be stopped before it can be reconfigured. This appliesto all domains except the control domain. On the control domain, aresource that does not support dynamic reconfiguration is reconfiguredusing delayed reconfiguration.
Note – A new feature introduced with the Logical Domains 1.3 software isdynamic resource management (DRM). DRM allows you to automaticallyperform dynamic reconfiguration activities. At this time, you can onlygovern the dynamic resource management of virtual CPUs. For moreinformation about using dynamic resource management to automaticallyadd and remove virtual CPUs from a logical domain, see the “UsingDynamic Resource Management Policies” section in Chapter 9 ManagingResources in the Logical Domains 1.3 Administration Guide.
Delayed Reconfiguration
Delayed reconfiguration is used to reconfigure a resource of the controldomain that cannot be reconfigured using dynamic reconfiguration (forexample, memory or physical I/O devices). In such cases, thereconfiguration operation is deferred and takes place when the controldomain is rebooted.
Note – Before the Logical Domains 1.2 software, delayed reconfigurationwas available for any domain. This feature is now restricted to the controldomain only.
Reconfiguring Virtual CPU and Memory
This section shows you how to reconfigure virtual CPUs and memory inlogical domains.
Note – To make your reconfiguration changes persistent acrosspowercycle of the platform, you must save the configuration informationon the system controller. Use the ldm add-config command to save theconfiguration. You can only store up to eight configuration files. You willlearn more about this topic later in the module.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Reconfiguring Logical Domain Resources
5-6 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Reconfiguring Virtual CPUs
You can use the ldm set-vcpu command from the control domain todynamically reconfigure virtual CPUs in any domain. You simply modifythe amount, and the Solaris OS instance running in the domain will seethem immediately.
For example, to assign sixteen virtual CPUs to the guest domain ldom1,you would type the following:
primary# ldm set-vcpu 16 ldom1
Note – You can also use the ldm add-vcpu command to increase thenumber of virtual CPUs. For example, if the guest domain ldom1 alreadyhad eight virtual CPUs assigned to it and you wanted to allocate anadditional eight CPUs for a total of 16 CPUs, you would use thecommand ldm add-vcpu 8 1dom1.
You can verify the number of CPUs now assigned by accessing the SolarisOS running in ldom1 and querying the CPU resources seen by theoperating system.
guest# psrinfo -vpThe physical processor has 16 virtual processors (0-15)UltraSPARC-T2+ (chipid 0, clock 1165 MHz)...
To decrease the number of virtual CPUs, you can use the ldm remove-vcpu command. For example, to remove eight virtual CPUs from theguest domain ldom1, you would type the following:
primary# ldm remove-vcpu 8 ldom1
Note – The alias for remove is rm.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Reconfiguring Logical Domain Resources
Performing Logical Domains Administration 5-7Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Reconfiguring Memory
To reconfigure memory in any domain except the primary domain, youmust stop the domain first. You can then reconfigure the memory, and thenew memory configuration will be available when the domain isrestarted.
To reconfigure memory in the primary domain, the domain will berunning (because it is the control domain, and this is where the memoryreconfiguration command has to be issued). In this case, you mustreconfigure the memory while the domain is running, and a delayedreconfiguration will be used. The new memory configuration will only beavailable after the domain has been rebooted.
To add memory to a domain, you can use the ldm set-memorycommand. For example, to assign two gigabytes of memory to theprimary domain, you would type:
primary# ldm set-memory 2G primary
Similarly, to assign two gigabytes of memory to guest domain ldom1, youwould type:
primary# ldm set-memory 2G ldom1
Note – You can also use the ldm add-memory command to increase theamount of memory. For example, if the guest domain ldom1 already hadtwo gigabytes of memory assigned to it and you wanted to allocate anadditional two gigabytes for a total of 4 gigabytes, you would use thecommand ldm add-memory 2G 1dom1.
To decrease the amount of memory in a domain, you can use the ldmremove-memory command. For example, to remove one gigabyte ofmemory from the primary domain, you would type:
primary# ldm remove-memory 1G primary
Similarly, to remove one gigabyte of memory from guest domain ldom1,you would type:
primary# ldm remove-memory 1G ldom1
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Using Virtual Disks
5-8 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Using Virtual Disks
In this section you are introduced to virtual disks and shown how tocreate an image file-based virtual disk as well as how to use ZFS to storevirtual disk images.
Introduction to Virtual Disks
A virtual disk contains two components: the virtual disk itself as itappears in a guest domain and the virtual disk backend, which is wheredata is stored and where virtual I/O ends up. The virtual disk backend isexported from a service domain by the virtual disk server (vds) driver. Alogical domains channel (LDC) enables communications, through thehypervisor, between the vds driver in the service domain and the virtualdisk client (vdc) driver in the guest domain. Finally, a virtual disk appearsas /dev/[r]dsk/cXdYsZ devices in the guest domain (see Figure 5-1).
Figure 5-1 Virtual Disk With Logical Domains
The virtual disk backend can be physical or logical. Physical devices caninclude the following:
● Physical disk or disk logical unit number (LUN)
● Physical disk slice
Logical devices can be any of the following:
● File on a file system, such as ZFS or UFS
● Logical volume from a volume manager, such as ZFS, VERITASVolume Manager (VxVM), or SolarisTM Volume Manager (SVM)
● Any disk pseudo device accessible from the service domain
Virtual DiskBackend
Virtual Disk/dev/[r]dsk/cXdYsZ
LDC
Hypervisor
VirtualDisk Server
(vds)
VirtualDisk Client
(vdc)
Service Domain Guest Domain
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Using Virtual Disks
Performing Logical Domains Administration 5-9Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Note – For more information about using volume managers in a LogicalDomains environment, see the “Using Volume Managers in a LogicalDomains Environment” section in Chapter 6 Using Virtual Disks in theLogical Domains 1.3 Administration Guide.
Virtual Disk Appearance
When a backend is exported as a virtual disk, it can appear in the guestdomain either as a full disk or as a single slice disk. The way it appearsdepends on the type of the backend and on the options used to export it.
Full Disk
When a backend is exported to a domain as a full disk, it appears in thatdomain as a regular disk with 8 slices (s0 to s7). Such a disk is visiblewith the format(1M) command. The disk's partition table can be changedusing either the fmthard(1M) or format(1M) command.
A full disk is also visible to the OS installation software and can beselected as a disk onto which the OS can be installed.
Any backend can be exported as a full disk except physical disk slices thatcan only be exported as single slice disks.
Single Slice Disk
When a backend is exported to a domain as a single slice disk, it appearsin that domain as a regular disk with 8 slices (s0 to s7). However, onlythe first slice (s0) is usable. Such a disk is visible with the format(1M)command, but the disk's partition table cannot be changed.
Although most of the time you will use a full disk, you will want to use asingle slice disk if:
● You want to export a disk slice.
● You want to export an already existing volume that contains somedata.
● You want to store data that you also want to be able to accesswithout using a virtual disk.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Using Virtual Disks
5-10 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
A single slice disk is also visible from the OS installation software and canbe selected as a disk onto which you can install the OS. In that case, if youinstall the OS using the UNIX File System (UFS), then only the rootpartition (/) must be defined, and this partition must use all the diskspace.
Any backend can be exported as a single slice disk using options.
Note – Prior to the Solaris 10 10/08 OS release, a single slice diskappeared as a disk with a single partition (s0). Such a disk was not visiblewith the format(1M) command. The disk also was not visible from the OSinstallation software and could not be selected as a disk device ontowhich the OS could be installed.
Virtual Disk Backend Options
Different options can be specified when exporting a virtual disk backend.These options are indicated in the options= argument of the ldm add-vdsdev command as a comma-separated list. The valid options are: Read-only (ro), Exclusive (excl), and Slice (slice).
Most of the time, you do not need to specify any virtual disk backendoptions. For more information about the options, see the "Virtual DiskBackend Options" section in Chapter 6 Using Virtual Disks in the LogicalDomains 1.3 Administration Guide.
Virtual Disk Backend
The virtual disk backend is the location where data on a virtual disk isstored. The backend can be a disk, a disk slice, a file, or a volume, such asZFS, SVM, or VxVM.
The following compares the differences and benefits of using a physicaldisk or slice with a file or volume:
● Physical disk or slice. Offers the best performance. Limits thenumber of disks. Is more complex to manage.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Using Virtual Disks
Performing Logical Domains Administration 5-11Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
● File or volumes. Offers less performance than physical disks, asaccess is through volume management and/or the file system layer.Is easier to manage data, such as creating or copying files. Can takeadvantage of volume management features, such as ZFS snapshotsand cloning.
A backend appears in a guest domain either as a full disk or as single slicedisk, depending on whether the slice option is set when the backend isexported from the service domain. By default, a virtual disk backend isexported non-exclusively as a readable-writable full disk.
Exporting a Physical Disk as a Full Disk
A physical disk or disk LUN is exported by default as a full disk. In thatcase, virtual disk drivers (vds and vdc) forward I/O from the virtual diskand act as a pass-through to the physical disk or disk LUN.
A physical disk or disk LUN is exported from a service domain byexporting the device that corresponds to slice 2 (s2) of that disk withoutsetting the slice option.
To export a physical disk as a full disk, you perform the following steps:
1. Export a physical disk as a full disk.
For example, to export the physical disk c1t48d0 as a full disk, youmust export slice 2 of that disk (c1t48d0s2).
primary# ldm add-vdsdev /dev/dsk/c1t48d0s2 \disk1@primary-vds0
2. Assign the disk to a guest domain.
For example, assign the disk (vdisk1) to guest domain 1dom1.
primary# ldm add-vdisk vdisk1 disk1@primary-vds0 ldom1
3. After the guest domain is started and running the Solaris OS, verifythat the disk is accessible and is a full disk.
A full disk is a regular disk that has eight (8) slices.
For example, the disk being checked is c0d1.
ldom1# ls -1 /dev/dsk/c0d1s*/dev/dsk/c0d1s0/dev/dsk/c0d1s1/dev/dsk/c0d1s2/dev/dsk/c0d1s3/dev/dsk/c0d1s4/dev/dsk/c0d1s5
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Using Virtual Disks
5-12 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
/dev/dsk/c0d1s6/dev/dsk/c0d1s7
Exporting a Physical Disk Slice as a Single Slice Disk
A physical disk slice is always exported as a single slice disk. In that case,virtual disk drivers (vds and vdc) forward I/O from the virtual disk andact as a pass-through to the physical disk slice.
A physical disk slice is exported from a service domain by exporting thecorresponding slice device. If the device is different from slice 2, then it isautomatically exported as a single slice disk whether or not you specifythe slice option. If the device is slice 2 of the disk, you must set the sliceoption to export slice 2 as a single slice disk. Otherwise, the entire disk isexported as a full disk.
To export a physical disk slice as a single slice disk, perform the followingsteps:
1. Export a slice of a physical disk as a single slice disk.
For example, to export slice 0 of the physical disk c1t57d0 as asingle slice disk, you must export the device corresponding to thatslice (c1t57d0s0) from the service domain as follows:
primary# ldm add-vdsdev /dev/dsk/c1t57d0s0 \disk2@primary-vds0
You do not need to specify the slice option, because a slice isalways exported as a single slice disk.
2. Assign the disk to a guest domain.
For example, assign the disk (vdisk2) to guest domain ldom1:
primary# ldm add-vdisk vdisk2 disk2@primary-vds0 ldom1
3. After the guest domain is started and running the Solaris OS, youcan list the disk (c0d13, for example) and see that the disk isaccessible:
ldom1# ls -1 /dev/dsk/c0d13s*/dev/dsk/c0d13s0/dev/dsk/c0d13s1/dev/dsk/c0d13s2/dev/dsk/c0d13s3/dev/dsk/c0d13s4/dev/dsk/c0d13s5/dev/dsk/c0d13s6/dev/dsk/c0d13s7
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Using Virtual Disks
Performing Logical Domains Administration 5-13Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Although there are 8 slices, because the disk is a single slice disk,only the first slice (s0) is usable.
Exporting Slice 2
To export slice 2 (disk c1t57d0s2, for example) as a single slice disk, youmust specify the slice option. Otherwise, the disk is exported as a fulldisk. For example:
primary# ldm add-vdsdev options=slice \/dev/dsk/c1t57d0s2 disk2@primary-vds0
Exporting a File or Volume
A file or volume (for example from ZFS or SVM) is exported either as afull disk or as single slice disk depending on whether the slice option isset. In this section you are shown how to export a file or volume as a fulldisk or as a single slice disk.
Exporting a File or Volume as a Full Disk
If you do not set the slice option, a file or volume is exported as a fulldisk. In that case, virtual disk drivers (vds and vdc) forward I/O from thevirtual disk and manage the partitioning of the virtual disk. The file orvolume eventually becomes a disk image that contains data from all slicesof the virtual disk and the metadata used to manage the partitioning anddisk structure.
When you export a file or volume as a full disk, it appears in the guestdomain as an unformatted disk, that is, a disk with no disk label. Then,you need to run the format(1M) command in the guest domain to defineusable partitions and to write a valid disk label. Any I/O to the virtualdisk fails while the disk is unformatted.
As we go through the example that follows, keep in mind that theprimary domain is also the service domain.
Note – Prior to the Solaris 10 5/08 OS release, when a file was exported asa virtual disk, the system wrote a default disk label and created defaultpartitioning. This is no longer the case with the Solaris 10 5/08 OS release,and you must run format(1M) in the guest domain to write a disk label.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Using Virtual Disks
5-14 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
To export a file as a full disk, you need to perform the following steps:
1. From the primary domain, create a file (fdisk0 for example) to useas the virtual disk.
primary# mkfile 100m /ldoms/domain/test/fdisk0
The size of the file defines the size of the virtual disk. This examplecreates a 100-megabyte blank file to get a 100-megabyte virtual disk.
2. From the control domain, export the file as a virtual disk.
primary# ldm add-vdsdev /ldoms/domain/test/fdisk0 \fdisk0@primary-vds0
In this example, the slice option is not set, so the file is exported asa full disk.
3. From the control domain, assign the disk to a guest domain.
For example, assign the disk (fdisk) to guest domain ldom1.
primary# ldm add-vdisk fdisk fdisk0@primary-vds0 ldom1
4. After the guest domain is started and running the Solaris OS, verifythat the disk is accessible and is a full disk.
A full disk is a regular disk with 8 slices.
The following example shows how to list the disk, c0d5, and verifythat it is accessible and is a full disk.
ldom1# ls -1 /dev/dsk/c0d5s*/dev/dsk/c0d5s0/dev/dsk/c0d5s1/dev/dsk/c0d5s2/dev/dsk/c0d5s3/dev/dsk/c0d5s4/dev/dsk/c0d5s5/dev/dsk/c0d5s6/dev/dsk/c0d5s7
Exporting a File or Volume as a Single Slice Disk
If the slice option is set, the file or volume is exported as a single slicedisk. In this case, the virtual disk has only one partition (s0), which isdirectly mapped to the file or volume backend. The file or volume onlycontains data written to the virtual disk with no extra data such aspartitioning information or disk structure.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Using Virtual Disks
Performing Logical Domains Administration 5-15Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
When a file or volume is exported as a single slice disk, the systemsimulates a fake disk partitioning that makes the file or volume appear asa disk slice. Because the disk partitioning is simulated, you do not createpartitioning for that disk.
For example, /dev/zvol/dsk/foo/vol0 is a ZFS volume in a servicedomain. You export this volume as a vdisk to a guest domain where itappears as /dev/dsk/c0d1s0.
In that domain, you can do the following:
# newfs /dev/rdsk/c0d1s0 # mount /dev/dsk/c0d1s0 /mnt # echo test > /mnt/file
Then if you stop the guest domain, you can access the data on the volumewithout using the virtual disk.
For example:
primary# mount /dev/zvol/dsk/foo/vol0 /mnt primary# cat /mnt/file test
You can also do this with a slice instead of a ZFS volume or with a file.With a file, you can access the data from the service domain using lofiinstead of directly mounting the backend.
For example, if you exported /ldoms/file as a single slice disk, youcould directly access data from the service domain as follows:
primary# lofiadm -a /ldoms/file primary# mount /dev/lofi/1 /mnt primary# cat /mnt/file
Exporting Volumes and Backward Compatibility
Prior to the Solaris 10 5/08 OS release, the slice option did not exist, andvolumes were exported as single slice disks. If your configuration exportsvolumes as virtual disks and you upgrade to the Solaris 10 5/08 OS,volumes are exported as full disks rather than single slice disks.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Using Virtual Disks
5-16 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
To preserve the previous behavior and to have your volumes exported assingle slice disks, you need to do one of the following:
● Use the ldm set-vdsdev command in Logical Domains 1.3software, and set the slice option for all volumes you want toexport as single slice disks. See the ldm(1M) man page.
● Add the following line to the /etc/system file on the servicedomain:
set vds:vd_volume_force_slice = 1
Note – Setting this tunable forces the export of all volumes as single slicedisks, and prevents the export of any volume as a full disk.
Summary: How Different Types of Backends Are Exported
1 Export the entire disk.2 Export only slice 2.3 A slice is always exported as a single slice disk.
For instructions on how to export files and disk slices as virtual disks, seethe “Guidelines for Exporting Files and Disk Slices as Virtual Disks” inChapter 6 Using Virtual Disks in the Logical Domains 1.3 AdministrationGuide.
Exporting CD, DVD and ISO Images
You can export a compact disc (CD) or digital versatile disc (DVD) thesame way you export any regular disk. To export a CD or DVD to a guestdomain, export slice 2 of the CD or DVD device as a full disk, without theslice option.
Backend No slice option slice option set
Disk (disk slice 2) Full disk1 Single slice disk2
Disk slice (not slice 2) Single slice disk3 Single slice disk
File Full disk Single slice disk
Volume, including ZFS,SVM, or VxVM
Full disk Single slice disk
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Using Virtual Disks
Performing Logical Domains Administration 5-17Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Note – You cannot export the CD or DVD drive itself. You only can exportthe CD or DVD that is inside the CD or DVD drive. Therefore, a CD orDVD must be present inside the drive before you can export it. Also, to beable to export a CD or DVD, that CD or DVD cannot be in use in theservice domain. In particular, the Volume Management file system,volfs(7FS) service must not use the CD or DVD.
If you have an International Organization for Standardization (ISO) imageof a CD or DVD stored in a file or on a volume and export that file orvolume as a full disk, it appears as a CD or DVD in the guest domain.When you export a CD, DVD, or an ISO image, it automatically appearsas a read-only device in the guest domain.
If you export a Solaris OS installation DVD, you can boot the guestdomain on the virtual disk corresponding to that DVD and install theguest domain from that DVD. To do so, when the guest domain reachesthe ok prompt, use the following command:
ok boot /virtual-devices@100/channel-devices@200/disk@n:f
Where n is the instance of the virtual disk representing the exportedDVD.
Note – You can use boot vdisk:f instead of boot /virtual-devices@100/channeldevices@200/disk@n:f; where vdisk is thedevalias name automatically created for the vdisk.
For step-by-step instructions on how to export a CD, DVD or ISO image,see the appropriate section in Chapter 6 Using Virtual Disks in the LogicalDomains 1.3 Administration Guide.
Using ZFS to Create Virtual Disks for Guest Domains
ZFS provides a convenient and powerful solution to store and managevirtual disk backends, especially with snapshots and clones. ZFS enables:
● Creating space in ZFS volumes or ZFS files
● Using snapshots to back up file systems and volumes
● Using clones to duplicate OS images stored within the ZFS space andprovision additional domains
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Using Virtual Disks
5-18 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Refer to the Solaris ZFS Administration Guide for more information aboutusing ZFS.
In this section you are shown how to create a ZFS space to use as a virtualdisk onto which a Solaris OS is to be installed.
Note – In the following descriptions and examples, the primary domain isalso the service domain where these files and volumes are stored.
Overview of Creating Virtual Disks Within ZFS
You can create the space for the virtual disk on ZFS volumes or ZFS files.Creating a ZFS volume, whatever its size, is quick using the zfs create-V command. On the other hand, ZFS files have to be created using themkfile command. The command can take some time to complete,especially if the file to create is quite large, which is often the case whencreating space to contain an OS image.
Both ZFS volumes and ZFS files can take advantage of ZFS features suchas snapshots and clones, but a ZFS volume is a pseudo device while a ZFSfile is a regular file.
If the ZFS space is to be used as a virtual disk onto which the Solaris OS isto be installed, then it should be large enough to contain:
● Installed software – about 6 gigabytes
● Swap partition – about 1 gigabyte
● Extra space to store system data – at least 1 gigabyte
Therefore, the size of the ZFS allocated space to install the entire SolarisOS should be at least 8 to 10 gigabytes.
To create the ZFS pool and the corresponding volume, perform thefollowing steps:
1. Create a ZFS storage pool in the service domain.
For example, to create a ZFS pool named tank1 using disk c1t2d0,type:
primary# zpool create -f tank1 c1t2d0
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Using Virtual Disks
Performing Logical Domains Administration 5-19Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
2. Create a ZFS volume.
For example, to create a 10-gigabyte volume named vol1, type:
primary# zfs create -V 10g tank1/vol1
3. Run the following command to verify that the zpool (tank1) andZFS volume (tank1/vol1) have been created.
primary# zfs list
4. Export the ZFS volume as a virtual disk.
For example, add the ZFS volume /dev/zvol/dsk/tank1/vol1 tothe virtual disk service.
primary# ldm add-vdsdev /dev/zvol/dsk/tank1/vol1 \zvol@primary-vds0
5. Assign the ZFS volume to a guest domain.
For example, to add a disk named zvdisk, type:
primary# ldm add-vdisk zvdisk zvol@primary-vds0 ldom1
To create the ZFS pool and the corresponding file, perform the followingsteps:
1. Create a ZFS storage pool in the service domain.
For example, to create a ZFS pool named tank1 using disk c1t2d0,type:
primary# zpool create -f tank1 c1t2d0
2. Create a ZFS file.
For example, to create a ZFS file system to store the ZFS files (forexample, to create 10-gigabyte disk image):
primary# zfs create tank1/ldomsprimary# mkfile 10g /tank1/ldoms/file0
3. Run the following command to verify that the zpool (tank1) andZFS file system (tank1/ldoms) have been created.
primary# zfs list
4. Export the ZFS file as a virtual disk.
primary# ldm add-vdsdev /tank1/ldoms/file0 \zvfile@primary-vds0
5. Assign the ZFS file to a guest domain.
For example, to add a file named zvfile, type:
primary# ldm add-vdisk zvfile zvfile@primary-vds0 ldom1
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Using Virtual Disks
5-20 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
After you have created the ZFS volume or file that is to be used as avirtual disk, the next step is to jumpstart the OS image onto the ZFSvolume or file. You can then use the ZFS snapshot and clone capabilitiesto easily provision new domains. You want to do the snapshot after thejumpstart but before the domain goes through the sysconfig phase. Thisapproach ensures the snapshot will not contain any predefinedconfiguration.
Note – Because you should already know how to jumpstart an OS image,this task is not covered in this module.
Creating a Snapshot of a Virtual Disk OS Image Overview
After you have stored an OS image on a ZFS volume or on a ZFS file, youcan create snapshots of this image by using the ZFS snapshot command.Before you create a snapshot of the OS image, you want to make sure thatthe disk is not currently in use in the guest domain. The data currentlystored on the image must be coherent. There are several ways to ensurethat a disk is not in use in a guest domain. You can either:
● Stop and unbind the guest domain. This is the safest solution, andthis is the only solution available if you want to create a snapshot ofan OS image used as the boot disk of a guest domain.
● Unmount any slices of the disk you want to snapshot that are usedin the guest domain, and ensure that no slice is in use on the guestdomain.
In the example that follows, because of the ZFS layout, the command tocreate a snapshot of the OS image is the same whether the OS image isstored on a ZFS volume or on a ZFS file.
To create a snapshot of the OS image, enter the appropriate command:
For a ZFS volume:
primary# zfs snapshot tank1/vol1@snapshotname
For a ZFS file system:
primary# zfs snapshot tank1/ldoms@snapshotname
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Using Virtual Disks
Performing Logical Domains Administration 5-21Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
For step-by-step instructions on how to create a snapshot of a disk imageof an unconfigured system, see the “Create a Snapshot of a Disk Image ofan Unconfigured System” section in Chapter 6 Using Virtual Disks in theLogical Domains 1.3 Administration Guide.
Using a Clone to Provision a New Domain
Once you have created a snapshot of an OS image, you can duplicate thisimage by using the ZFS clone command. Then the cloned image can beassigned to another domain.
Cloning a boot disk image quickly creates a boot disk for a new guestdomain without having to perform the entire Solaris OS installationprocess.
For example, if the virtual disk created was the boot disk of domainldom1, do the following to clone that disk to create a boot disk for domainldom2 given the snapshot you just created.
For a ZFS volume:
primary# zfs clone tank1/vol1@snapshotname tank1/vol2
For a ZFS file system:
primary# zfs clone tank1/ldoms@snapshotname tank1/ldom2
You can now export the corresponding volume or file as a virtual disk andassign it to the new ldom2 guest domain. The guest domain ldom2 candirectly boot from that virtual disk without having to go through the OSinstallation process.
For more information about cloning a boot disk image, see the “Cloning aBoot Disk Image” section in Chapter 6 Using Virtual Disks in the LogicalDomains 1.3 Administration Guide.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Using Virtual Networks
5-22 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Using Virtual Networks
A virtual network allows domains to communicate with each otherwithout using any external physical networks. A virtual network also canallow domains to use the same physical network interface to access aphysical network and communicate with remote systems. A virtualnetwork is created by having a virtual switch to which you can connectvirtual network devices.
In this section you are shown how to configure a virtual switch andservice domain for NAT and routing and also how to configure a VLAN.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Using Virtual Networks
Performing Logical Domains Administration 5-23Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Configuring a Virtual Switch and the Service Domainfor NAT and Routing
The virtual switch (vsw) is a layer-2 switch that also can be used as anetwork device in the service domain. The virtual switch can beconfigured to act only as a switch between the virtual network (vnet)devices in the various logical domains but with no connectivity to anetwork outside the box through a physical device. See Figure 5-2.
Figure 5-2 Configuring a Virtual Switch and the Service Domain forNAT and Routing
In this mode, plumbing the vsw as a network device and enabling IProuting in the service domain enables virtual networks to communicateoutside the box using the service domain as a router. This mode ofoperation is essential to provide external connectivity to the domainswhen the physical network adapter is not GLDv3-compliant.
The advantages of this configuration are:
● The virtual switch does not need to use a physical device directlyand can provide external connectivity even when the underlyingdevice is not GLDv3-compliant.
Hypervisor
Service Domain
IP Routing
vsw
/../../network@0
Subnet
vnet
Guest Domain
Legacy NIC
Resources
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Using Virtual Networks
5-24 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
● The configuration can take advantage of the IP routing and filteringcapabilities of the Solaris OS.
For information about how to set up the virtual switch for NAT androuting, see the “Set Up the Virtual Switch to Provide ExternalConnectivity to Domains” section in Chapter 7 Using Virtual Networks inthe Logical Domains 1.3 Administration Guide.
Configuring Virtual Local Area Networks
As of the release of Solaris 10 10/08 OS and LDoms 1.1 software, 802.1QVLAN-Tagging support is available in the Logical Domains networkinfrastructure.
Note – Tagged VLANs are not supported in any of the previous releasesfor LDoms networking components.
The virtual switch (vsw) and virtual network (vnet) devices supportswitching of Ethernet packets based on the virtual local area network(VLAN) identifier (ID) and handle the necessary tagging or untagging ofEthernet frames.
You can create multiple VLAN interfaces over a vnet device in a guestdomain. You can use the Solaris OS ifconfig(1M) command to create aVLAN interface over a virtual network device, the same way it is used toconfigure a VLAN interface over any other physical network device. Theadditional requirement in the LDoms environment is that you must assignthe vnet to the corresponding VLANs using the Logical DomainsManager CLI commands. Refer to the ldm(1M) for complete informationabout the Logical Domains Manager CLI commands.
Similarly, you can configure VLAN interfaces over a virtual switch devicein the service domain. VLAN IDs 2 through 4094 are valid. VLAN ID 1 isreserved as default-vlan-id.
When you create a vnet device on a guest domain, you must do thefollowing:
● Assign the vnet to the required VLANs by specifying a port VLANID.
● Use ldm add-vnet command to specify zero or more VLAN IDs forthis vnet by setting the pvid and vid properties.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Using Virtual Networks
Performing Logical Domains Administration 5-25Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
This configures the virtual switch to support multiple VLANs in theLDoms network and switch packets using both MAC address and VLANIDs in the network.
Similarly, configure the vsw device to specify any VLANs to which thevsw device itself should belong when plumbed as a network interface. Toperform this configuration, use the ldm add-vsw command to set thepvid and vid properties.
Use the ldm set-vnet or ldm set-vsw commands to change the VLANsto which a device belongs.
Port VLAN ID
The port VLAN ID (PVID) indicates a VLAN to which the virtual networkdevice needs to be a member, in untagged mode. In this case, the vswdevice provides the necessary tagging or untagging of frames for the vnetdevice over the VLAN specified by its PVID. Any outbound frames fromthe virtual network that are untagged are tagged with its PVID by thevirtual switch. Inbound frames tagged with this PVID are untagged bythe virtual switch before sending it to the vnet device. Thus, assigning aPVID to a vnet implicitly means that the corresponding virtual networkport on the virtual switch is marked untagged for the VLAN specified bythe PVID. You can have only one PVID for a vnet device.
The corresponding virtual network interface, when configured using theifconfig(1M) command without a VLAN ID and using only its deviceinstance, results in the interface being implicitly assigned to the VLANspecified by the virtual network's PVID.
For example, if you were to plumb vnet instance 0, using the followingcommand, and if the pvid property for the vnet has been specified as 10,the vnet0 interface would be implicitly assigned to belong to VLAN 10.
# ifconfig vnet0 plumb
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Using Virtual Networks
5-26 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
VLAN ID
The VLAN ID (VID) indicates the VLAN to which a virtual networkdevice or virtual switch needs to be a member, in tagged mode. Thevirtual network device sends and receives tagged frames over the VLANsspecified by its VIDs. The virtual switch passes any frames that are taggedwith the specified VID between the virtual network device and theexternal network.
For information about how to assign VLANs to a virtual switch andvirtual network device, see the “Assign VLANs to a Virtual Switch andVirtual Network Device” section in Chapter 7 Using Virtual Networks inthe Logical Domains 1.3 Administration Guide.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Managing Logical Domains Configurations
Performing Logical Domains Administration 5-27Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Managing Logical Domains Configurations
In this section you are shown how to save, remove, and restore a guestdomain configuration and how to reset a Logical Domains configurationto either a user-defined or factory default configuration.
Saving, Removing, and Restoring a Guest DomainConfiguration
Saving a Guest Domain Configuration – The Autosave Operation
Starting with the Logical Domains 1.2 release, a copy of the currentconfiguration is automatically saved on the control domain whenever theLogical Domains configuration is changed. The autosave operation occursimmediately.
The Logical Domains autosave configuration data is found in the/var/opt/SUNWldm/autosave-* directories. This autosave operationenables you to recover a configuration when the configurations that aresaved on the service processor (SP) are lost.
This operation also enables you to recover a configuration when thecurrent configuration was not explicitly saved to the SP when the systempowercycled. In these circumstances, the Logical Domains Manager canrestore that configuration on restart if it is newer than the configurationmarked for the next boot.
You can automatically or manually restore autosave files to new orexisting configurations. By default, when an autosave configuration isnewer than the corresponding running configuration, a message is writtento the LDoms log (/var/svc/log/*ldmd*). Thus, you must use the ldmadd-spconfig -r command to manually save your configurationchanges to an existing configuration or create a new one based on theautosave data.
Note – For information about how to use the ldm *-spconfig commandsto manage configurations and to manually recover autosave files, see theldm(1M) man page.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Managing Logical Domains Configurations
5-28 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
When a delayed reconfiguration is pending, the configuration changes areimmediately autosaved. As a result, if you run the ldm list-config -rcommand, the autosave configuration is shown as being newer than thecurrent configuration.
The autorecovery policy specifies how to handle the recovery of aconfiguration when one configuration that is automatically saved on thecontrol domain is newer than the corresponding running configuration.The autorecovery policy is specified by setting the autorecovery_policyproperty of the ldmd SMF service. The autorecovery_policy propertycan have the following values:
● autorecovery_policy=1 – Logs warning messages when anautosave configuration is newer than the corresponding runningconfiguration. These messages are logged in the ldmd SMF log file.The user must manually perform any configuration recovery. This isthe default policy.
● autorecovery_policy=2 – Displays a notification message if anautosave configuration is newer than the corresponding runningconfiguration. This notification message is printed in the output ofany ldm command the first time an ldm command is issued aftereach restart of the Logical Domains Manager. The user mustmanually perform any configuration recovery.
● autorecovery_policy=3 – Automatically updates the configurationif an autosave configuration is newer than the correspondingrunning configuration. This action overwrites the SP configurationthat will be used during the next powercycle. This configuration isupdated with the newer configuration that is saved on the controldomain.
This action does not impact the currently running configuration. Itonly impacts the configuration that will be used during the nextpowercycle. A message is also logged, which states that a newerconfiguration has been saved on the SP and that it will be booted thenext time the system is powercycled. These messages are logged inthe ldmd SMF log file.
For step-by-step instructions on how to change the autorecovey_policyproperty value, see the “Modify the Autorecovery Policy” section inChapter 10 Managing Configurations in the Logical Domains 1.3Administration Guide.
Consider archiving the configuration files off-line to help reduce recoverytime in the event of a catastrophic failure.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Managing Logical Domains Configurations
Performing Logical Domains Administration 5-29Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Removing a Guest Domain Configuration
There may be times when you need to remove a guest domainconfiguration. To remove a guest domain configuration, you must stop theguest domain, unbind the guest domain resources, and then remove theguest domain. In the example that follows you are shown how to removeguest domain ldom1.
To remove a guest domain configuration, perform the following steps:
1. Stop the guest domain.
primary# ldm stop-domain ldom1
The stop-domain subcommand sends a shutdown request to thelogical domain if the Solaris OS is booted. If the domain cannot bestopped by any other means, use the -f option of the stop-domainsubcommand to force the domain to stop.
2. Unbind all the resources attached to the guest domain.
primary# ldm unbind-domain ldom1
Note – You might also want to clean up the resources used by this domainby removing the vdsdev and backend (file/volume).
3. Remove the guest domain.
primary# ldm remove-domain ldom1
Note – The alias for remove is rm.
Restoring a Guest Domain Configuration
You can only restore domains for which you have explicitly saved theconfiguration using the ldm ls-constraints -x command. Then youcan restore the configuration by using the ldm bind-domain -icommand.
In the example that follows you are shown how to restore theconfiguration for guest domain ldom1. The configuration was saved usingthe following command:
# ldm ls-constraints -x ldom1 > ldom1.xml
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Managing Logical Domains Configurations
5-30 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
To restore a guest domain configuration, perform the following steps:
1. Restore the guest domain configuration.
primary# ldm bind-domain -i ldom1.xml
2. Start the domain.
primary# ldm start-domain ldom1
Note – These steps restore the domain configuration only, not the virtualdevice services it might use (for example, vds and vsw). Therefore, youmust configure the virtual device services as appropriate to support therestored configuration.
Resetting the Logical Domains Configuration
The Logical Domains Manager software allows you to store multiple user-defined configurations on the system controller along with the factory-default configuration. By using the ldm set-config command from thecontrol domain or the bootmode config command from the systemcontroller, you can select one of these configurations to be loaded uponthe next system reset.
If you reload the factory default configuration, the control domain isreturned to its initial configuration. That is, all the system resources arereturned to the control domain.
The sections that follow provide instructions on how to reset the systemto either a user-defined or factory default configuration.
Resetting a User-Defined Configuration From the ControlDomain
To reset a user-defined configuration from the control domain:
1. Select the configuration.
For example, you want to select a configuration you calledmyconfig.
primary# ldm set-config myconfig
2. Stop all domains by using the -a option.
primary# ldm stop-domain -a
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Managing Logical Domains Configurations
Performing Logical Domains Administration 5-31Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
3. Stop the control domain.
primary# shutdown -i0 -g0 -y
4. Powercycle the system so that the user-defined configuration isloaded.
sc> poweroffsc> poweron
Resetting the System to a User-Defined Configuration From theService Processor
You can reset a user-defined configuration that you previously createdand stored on the service processor by using the ldm add-configcommand. To reset this configuration, run the ILOM bootmode commandand specify the same configuration name as the value of the configproperty.
For example, assume you stored the configuration with the namemyconfig. To reset the configuration, type:
-> set /HOST/bootmode config=myconfig
Next, powercycle the system to load the new configuration.
Resetting the System to the Factory Default Configuration Fromthe Control Domain
To reset the system to the factory default configuration from the controldomain:
1. Select the factory default configuration.
primary# ldm set-config factory-default
2. Stop all domains by using the -a option.
primary# ldm stop-domain -a
3. Stop the control domain.
primary# shutdown -i0 -g0 -y
4. Powercycle the system so that the factory-default configuration isloaded.
sc> poweroffsc> poweron
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Managing Logical Domains Configurations
5-32 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Resetting the System to the Factory Default Configuration Usingthe ILOM Service Processor
To reset the system to the factory default configuration using the ILOMservice processor with the Logical Domains Manager, use the followingcommand:
-> set /HOST/bootmode config=factory-default
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
6-1Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Module 6
ManagingAdvancedLogical DomainsConfigurations
Objectives
This module shows you how to manage advanced Logical Domainsconfigurations.
Upon completion of this module, you should be able to:
● Migrate an active guest domain (warm migration).
● Migrate a bound or inactive guest domain (cold migration).
● Create an additional I/O domain.
● Configure virtual network multipathing with multiple I/O domains.
● Configure virtual disk multipathing with multiple I/O domains.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Additional Resources
6-2 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Additional Resources
The following reference provides additional information about the topicsdescribed in this module:
● Logical Domains 1.3 Administration Guide, Part No: 821-0406-10
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Introduction
Managing Advanced Logical Domains Configurations 6-3Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Introduction
In this module you will be shown how to manage advanced LogicalDomains configurations.
First, you will learn how to migrate a logical domain from one server toanother. You will be shown the process for migrating both an active(warm migration) and a bound or inactive domain (cold migration).
Next, you will be shown how to use multiple I/O domains. Yourinstructor will start by explaining how to create an additional I/O domainand then how to configure virtual network and virtual disk multipathingwith multiple I/O domains.
The module concludes with a lab exercise designed to give you theopportunity to practice the tasks you were shown during the lecture.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Migrating a Logical Domain from One Server to Another
6-4 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Migrating a Logical Domain from One Server to Another
Logical domain migration, or domain mobility, provides the ability tomigrate a logical domain from one host machine to another. The hostwhere the migration is initiated is referred to as the source machine, andthe host where the domain is migrated to is referred to as the targetmachine. Similarly, once a migration is started, the domain to be migratedis referred to as the source domain and the shell of a domain created onthe target machine is referred to as the target domain while the migrationis in progress.
In this section you are presented with an overview of the migrationprocess and then given the requirements and restrictions for migrating anactive domain and a bound or inactive domain. You are then shown howto perform a migration.
Migration Process Overview
The migration process begins with the Logical Domains Manager on thesource machine accepting the request to migrate a domain andestablishing a secure network connection with the Logical DomainsManager running on the target machine. Once this connection has beenestablished, the migration occurs.
The migration itself can be broken down into different phases (seeFigure 6-1):
● Phase 1: After connecting with the Logical Domains Managerrunning in the target host, information about the source domain istransferred to the target host. This information is used to perform aseries of checks to determine whether a migration is possible. Thechecks differ depending on the state of the source domain. Forexample, if the source domain is active, a different set of checks areperformed than if the domain is bound or inactive.
● Phase 2: When all checks in Phase 1 have passed, the source andtarget machines prepare for the migration. In the case where thesource domain is active, this includes shrinking the number of CPUsto one and suspending the domain. On the target machine, a domainis created to receive the source domain.
● Phase 3: For an active domain, the next phase is to transfer all theruntime state information for the domain to the target. Thisinformation is retrieved from the hypervisor. On the target, the stateinformation is installed in the hypervisor.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Migrating a Logical Domain from One Server to Another
Managing Advanced Logical Domains Configurations 6-5Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
● Phase 4: After all state information is transferred, the handoff occurswhen the target domain resumes execution (if the source was active)and the source domain is destroyed. From this point on, the targetdomain is the sole version of the domain running.
Figure 6-1 Logical Domains Migration Process Phases
Phase 1: Information Transfer
Logical DomainsManager
Target Machine
Logical DomainsManager
Source Domain
Source Machine
Secure Network Connection
Information is transferred from the source tothe target host.
Source and target machines prepare for migration.
Phase 2: Migration Preparation
Logical DomainsManager
Target Domain
Target Machine
Logical DomainsManager
Source Domain
Source Machine
Secure Network Connection
Phase 3: Runtime State Information Transfer
Logical DomainsManager
Target Domain
Target Machine
Logical DomainsManager
Source Domain
HypervisorHypervisor
Source Machine
Secure Network Connection
All runtime state information for the domain istransferred to the target.
Target domain resumes execution and the sourceis destroyed.
Phase 4: Handoff
Logical DomainsManager
Target Machine
Logical DomainsManager
Source Machine
Source Domain Target Domain
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Migrating a Logical Domain from One Server to Another
6-6 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Software Compatibility
For a migration to occur, both the source and target machines must berunning compatible software:
● The hypervisor on both the source and target machines must havefirmware that supports domain migration.
If you see the following error, you do not have the correct version ofsystem firmware on either the source or target machine.
System Firmware version on <downrev machine> does notsupport Domain MigrationDomain Migration of LDom <source domain> failed
● A compatible version of the Logical Domains Manager must berunning on both machines.
Authentication for Migration Operations
Since the migration operation executes on two machines, a user must beauthenticated on both the source and target host. In particular, the usermust have the solaris.ldoms.write, file_dac_read, andfile_dac_search authorizations on both machines. See “Adding thePrivileges Needed to Migrate Domains” in Chapter 3 Security of theLogical Domains 1.3 Administration Guide.
The ldm command line interface for migration allows the user to specifyan optional alternate user name for authentication on the target host. Ifthis is not specified, the user name of the user executing the migrationcommand is used. In both cases, the user is prompted for a password forthe target machine unless the -p option is used to initiate an automaticmigration.
Migrating an Active Domain (Warm Migration)
For the migration of an active domain (referred to as a warm migration) tooccur with Logical Domains 1.3 software, there is a certain set ofrequirements and restrictions imposed on the source domain, the sourcemachine, and the target machine.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Migrating a Logical Domain from One Server to Another
Managing Advanced Logical Domains Configurations 6-7Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Note – The migration operation speeds up when the primary domain onthe source and target systems have cryptographic units assigned. Startingwith Logical Domains 1.3, you can speed up migration by adding morevirtual CPUs to the primary domains of both the source and targetsystems.
Migrating CPUs in an Active Domain
Following are the requirements and restrictions on CPUs whenperforming a migration.
● The source and target machines must have the same processor typerunning at the same frequency.
● The target machine must have sufficient free strands toaccommodate the number of strands in use by the domain. Inaddition, full cores must be allocated for the migrated domain. If thenumber of strands in the source are less than a full core, the extrastrands are unavailable to any domain until after the migrateddomain is rebooted.
● After a migration, CPU dynamic reconfiguration (DR) is disabled forthe target domain until it has been rebooted. Once a reboot hasoccurred, CPU DR becomes available for that domain.
● Either the source domain must have only a single strand, or theguest OS must support CPU DR, so that the domain can be shrunk toa single strand before migration. Conditions in the guest domain thatwould cause a CPU DR removal to fail would also cause themigration attempt to fail. For example, processes bound to CPUswithin the guest domain, or processor sets configured in the sourcedomain, can cause a migration operation to fail.
Migrating Memory in an Active Domain
The target machine must have sufficient free memory to accommodate themigration of the source domain. In addition, the layout of the availablememory on the target machine must be compatible with the memorylayout of the source domain or the migration will fail.
In particular, if the memory on the target machine is fragmented intomultiple small address ranges, but the source domain requires a singlelarge address range, the migration will fail.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Migrating a Logical Domain from One Server to Another
6-8 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Migrating Physical I/O Devices in an Active Domain
Virtual devices that are associated with physical devices can be migrated.However, domains that have direct access to physical devices cannot bemigrated. For instance, you cannot migrate I/O domains.
Migrating Virtual I/O Devices in an Active Domain
All virtual I/O (VIO) services used by the source domain must beavailable on the target machine. In other words, the following conditionsmust exist:
● Each logical volume used in the source domain must also beavailable on the target host and must refer to the same storage.
Caution – A migration fails when the logical volume used by the sourceas a boot device exists on the target but does not refer to the same storage.The migration appears to succeed; however, the machine is not usablebecause it is unable to access its boot device. To avoid leaving the targetdomain in an inconsistent state, stop the domain, correct the configurationissue, and restart the domain.
● For each virtual network device in the source domain, a virtualnetwork switch must exist on the target host, with the same name asthe virtual network switch the device is attached to on the sourcehost.
For example, if vnet0 in the source domain is attached to a virtualswitch service name switch-y, then there must be a logical domainon the target host providing a virtual switch service named switch-y.
Note – The switches do not have to be connected to the same network forthe migration to occur; however, the migrated domain can experiencenetworking problems if the switches are not connected to the samenetwork.
MAC addresses used by the source domain that are in theautomatically allocated range must be available for use on the targethost.
● A virtual console concentrator (vcc) service must exist on the targethost and have at least one free port. Explicit console constraints areignored during the migration. The console for the target domain iscreated by using the following:
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Migrating a Logical Domain from One Server to Another
Managing Advanced Logical Domains Configurations 6-9Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
● Target domain name as the console group
● Any available port on the first vcc device in the control domain
Migrating NIU Hybrid Input/Output in an Active Domain
A domain using Network Interface Unit (NIU) Hybrid I/O resources canbe migrated. A constraint specifying NIU Hybrid I/O resources is not ahard requirement of a logical domain. If such a domain is migrated to amachine that does not have available NIU resources, the constraint ispreserved, but not fulfilled.
Migrating Cryptographic Units in an Active Domain
Starting with Logical Domains 1.3, you can migrate a guest domain thathas bound cryptographic units if it runs an operating system thatsupports cryptographic unit dynamic reconfiguration (DR).
The following Solaris OS versions support cryptographic unit DR:
● At least the Solaris 10 10/09 OS
● At least the OpenSolaris 2009.06 OS
● At least the Solaris 10 5/08 OS plus patch ID 142245-01
At the start of the migration, the Logical Domains Manager determineswhether the source domain supports cryptographic unit DR. If supported,the Logical Domains Manager attempts to remove any cryptographicunits from the domain. After the migration completes, the cryptographicunits are re-added to the migrated domain.
Note – If the constraints for cryptographic units cannot be met on thetarget machine, a migration operation might still complete successfully. Insuch a case, the domain might end up with fewer cryptographic unitsthan it had prior to the migration operation.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Migrating a Logical Domain from One Server to Another
6-10 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Note – Any active delayed reconfiguration operations on the source ortarget host prevent a migration from starting. Delayed reconfigurationoperations are blocked while a migration is in progress. While a migrationis in progress on a machine, any operation that could result in themodification of the machine description (MD) of the domain beingmigrated is blocked. This includes all operations on the domain itself aswell as operations such as bind and stop on other domains on themachine.
Migrating a Bound or Inactive Domain (Cold Migration)
Because a bound or inactive domain is not executing at the time of themigration (referred to as a cold migration), there are fewer restrictionsthan when you migrate an active domain. The migration of a bounddomain requires that the target is able to satisfy the CPU, memory, andI/O constraints of the source domain. Otherwise, the migration will fail.The migration of an inactive domain does not have such requirements.However, the target must satisfy the domain's constraints when thebinding occurs. Otherwise, the domain binding will fail.
Migrating CPUs in a Bound or Inactive Domain
You can migrate a bound or inactive domain between machines runningdifferent processor types and machines that are running at differentfrequencies. The Solaris OS image in the guest must support the processortype on the target machine.
Migrating Virtual Input/Output Devices in a Bound or InactiveDomain
For an inactive domain, there are no checks performed against the virtualinput/output (VIO) constraints. So, the VIO servers do not need to existfor the migration to succeed. As with any inactive domain, the VIOservers need to exist and be available at the time the domain is bound.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Migrating a Logical Domain from One Server to Another
Managing Advanced Logical Domains Configurations 6-11Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Performing the Migration
After you have ensured that you have met the requirements andrestrictions associated with migrating either an active domain or a boundor inactive domain and you have met the authentication requirements,you are ready to start the migration operation.
Assume you want to migrate a domain called ldom1 to a machine withthe host name Hostname_Target. To do this, you would enter thefollowing command and the target password:
# ldm migrate-domain ldom1 Hostname_Target Target Password:
The migration operation can take anywhere from several seconds toseveral minutes depending of the complexity of your configuration.
Performing the Dry Run Option
When you provide the -n option to the migrate-domain subcommand,migration checks are performed, but the source domain is not migrated.Any requirement that is not satisfied is reported as an error. This allowsyou to correct any configuration errors before attempting a real migration.
Note – Because of the dynamic nature of logical domains, it is possible fora dry run to succeed and a migration to fail and vice-versa.
Monitoring a Migration in Progress
When a migration is in progress, you can monitor the status of eachmachine.
To obtain the status of the source domain, type the following on thesource domain machine:
# ldm list ldom1
To obtain the status of the target domain, type the following on the targetmachine:
# ldm list ldom1
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Migrating a Logical Domain from One Server to Another
6-12 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
The source and target domains are shown differently in the status output.The output of the ldm list command indicates the state of the migratingdomain and includes the following fields:
● NAME – Name of the domain, either the source or target
● STATE – State of the domain, for example, suspended or bound
● FLAGS – Status of the domain
● CONS – Console port of the domain
● VCPU – Number of virtual CPUs
● MEMORY – Amount of memory
● UTIL – Percentage of CPUs utilization of the domain
● UPTIME – Length of time the domain has been active
The sixth column in the FLAGS field shows one of the following values:
● The source domain shows an s to indicate that it is the source of themigration.
● The target domain shows a t to indicate that it is the target of amigration.
● If an error occurs that requires user intervention, an e is shown.
The following shows that ldom1 is the source domain of the migration:
# ldm list ldom1NAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIMEldom1 suspended -n---s 8 2G 0.0% 2h 7m
The following shows that ldom1 is the target domain of the migration:
# ldm list ldom1NAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIMEldom1 bound -----t 5000 1 2G
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Migrating a Logical Domain from One Server to Another
Managing Advanced Logical Domains Configurations 6-13Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
In the long form of the status output, additional information is shownabout the migration. On the source, the percentage of the operationcompleted is displayed along with the target host and domain name.Similarly, on the target, the percentage of the operation completed isdisplayed along with the source host and domain name.
# ldm list -o status ldom1NAMEldom1
STATUS OPERATION PROGRESS SOURCE migration 17% ldom1
For information about canceling a migration in progress or recoveringfrom a failed migration, see the associated sections in Chapter 8 MigratingLogical Domains in the Logical Domains 1.3 Administration Guide.
Performing Automated Migrations
Until the release of the Logical Domains 1.3 software, migrations wereinteractive operations. When you initiated the migration, you wereprompted for the password to use for the target machine. Starting withLogical Domains 1.3, you can use the ldm migrate-domain -p filenamecommand to initiate an automated migration operation. The file name youspecify as an argument to the -p option must have the followingproperties:
● The first line of the file must contain the password.
● The password must be plain text.
● The password must not exceed 256 characters in length.
A newline character on the end of the password and all lines that followthe first line are ignored.
The file in which you store the target machine's password must beproperly secured. If you plan to store passwords in this manner, ensurethat the file permissions are set so that only the root owner, or aprivileged user, can read or write the file (400 or 600).
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Using Multiple I/O Domains
6-14 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Using Multiple I/O Domains
In this section you are shown how to create an additional I/O domain andthen shown how to configure virtual network and virtual diskmultipathing with multiple I/O domains.
Creating an Additional I/O Domain
This section describes how to set up additional I/O domains in a LogicalDomains environment.
An I/O domain is a domain that has direct ownership of and direct accessto physical I/O devices. It can be created by assigning a PCI EXPRESS(PCI-E) bus to a domain. PCI-E buses that are present on a server areidentified with names such as pci@400 (pci_0). Use the ldm command toassign each bus to a separate domain.
The maximum number of I/O domains that you can create depends onthe number of PCI-E buses available on the server. For example, the SunSPARC Enterprise T5440 server has four PCI-E buses, so it can have up tofour I/O domains, whereas the Sun SPARC Enterprise T5140 server hasonly two PCI-E buses and can, therefore, have up to two I/O domains.See Figure 6-2 for the Sun SPARC Enterprise T5140 server PCI-E busconfiguration.
Figure 6-2 SPARC Enterprise T5140 Server PCI-E Bus Configuration
Hypervisor
I/O Domain 1
pci@400 pci@500
I/O Domain 2
Resources
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Using Multiple I/O Domains
Managing Advanced Logical Domains Configurations 6-15Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
In the example that follows you are shown how to create a new I/Odomain from an initial configuration where several buses are owned bythe primary domain. By default the primary domain owns all busespresent on the system. This example is for a Sun SPARC Enterprise T5140server. This procedure can also be used on other servers. The instructionsfor different servers might vary slightly from these, but you can obtain thebasic principles from this example.
First, you must retain the bus that has the primary domain's boot disk.Then, remove another bus from the primary domain and assign it toanother domain.
Caution – All internal disks on the supported servers are connected to asingle PCI bus. If a domain is booted from an internal disk, do not removethat bus from the domain. Also, ensure that you are not removing a buswith devices (such as network ports) that are used by a domain. If youremove the wrong bus, a domain might not be able to access the requireddevices and could become unusable. To remove a bus that has devicesthat are used by a domain, reconfigure that domain to use devices fromother buses. For example, you might have to reconfigure the domain touse a different onboard network port or a PCI card from a different PCIslot.
In this example, the primary domain only uses a ZFS pool (rpool(c1t0d0s0)) and network interface (nxge0).
To add an additional I/O domain, perform the following steps:
1. List the primary domain’s current bindings to determine PCI busownership.
primary# ldm list-bindings primary
2. Determine the device path of the boot disk that needs to be retained.
● For UFS file systems, run the df / command to determine thedevice path of the boot disk.
primary# df /
● For ZFS file systems, first run the df / command to determinethe pool name, and then run the zpool status command todetermine the device path of the boot disk.
primary# df /...primary# zpool status rpool
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Using Multiple I/O Domains
6-16 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
3. Determine the physical device to which the block device is linked.
The following example uses block device c1t0d0s0:
primary# ls -l /dev/dsk/c1t0d0s0
4. Determine the network interface that is used by the system.
primary# ifconfig -a...primary# ldm list-services
For purposes of this example, assume nxge0 is currently being usedby the control domain.
5. Determine the physical device to which the network interface islinked.
To determine the physical path of the onboard network interfaces(nxge) currently configured in the system, check/etc/path_to_inst:
primary# grep nxge /etc/path_to_inst
Note – If you discover that both buses are in use, you need to reconfigurethe control domain so that it is no longer using the bus you want toremove.
6. Remove the PCI bus that is not currently being used by the controldomain based on your current configuration.
In this example, bus pci@500 is being removed from the primarydomain on a T5140 server.
primary# ldm remove-io pci@500 primary
7. Save this split configuration to the service processor.
In this example, the configuration is config_split.
primary# ldm add-spconfig config_split
This configuration, config_split, is also set as the nextconfiguration to be used after the reboot.
Note – Currently, there is a limit of eight configurations that can be savedon the SP, not including the factory-default configuration.
8. Reboot the primary domain so that the change takes effect.
primary# shutdown -y -i6 -g0
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Using Multiple I/O Domains
Managing Advanced Logical Domains Configurations 6-17Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
9. Stop the domain to which you want to add the PCI bus.
The following example stops the ldom1 domain:
primary# ldm stop ldom1
10. Add the available bus to the domain that needs direct access.
The available bus is pci@500 and the domain is ldom1.
primary# ldm add-io pci@500 ldom1
11. Bind the resources to the domain.
The following command binds the resource to the ldom1 domain:
primary# ldm bind ldom1
12. Restart the domain so that the change takes affect.
The following command restarts the ldom1 domain:
primary# ldm start ldom1
13. Confirm that the correct bus is still assigned to the primary domainand the correct bus is assigned to domain ldom1.
primary# ldm list-bindings primary ldom1
Note – If you have an Infiniband Host Channel Adapter (HCA) card, youmight need to turn on the I/O memory management unit (MMU) bypassmode. For information about how to perform this task, see “Enabling theI/O MMU Bypass Mode on a PCI Bus” in Chapter 5 Setting Up I/ODomains of the Logical Domains 1.3 Administration Guide.
Configuring Virtual Network Multipathing With MultipleI/O Domains
Internet Protocol Network Multipathing (IPMP) provides fault-toleranceand load balancing across multiple network interface cards. Using IPMP,you can configure one or more interfaces into an IP multipathing group.After configuring IPMP, the system automatically monitors the interfacesin the IPMP group for failure. If an interface in the group fails or isremoved for maintenance, IPMP automatically migrates, or fails over, thefailed interface’s IP addresses. In a Logical Domains environment, eitherthe physical or virtual network interfaces can be configured for failoverusing IPMP.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Using Multiple I/O Domains
6-18 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
The Logical Domains 1.3 release introduces support for link-based IPMPwith virtual network devices. When configuring an IPMP group withvirtual network devices, configure the group to use link-based detection.If using older versions of the Logical Domains software, you can onlyconfigure probe-based detection with virtual network devices.
For information about older versions of the Logical domains software, see“Configuring and Using IPMP in Releases Prior to Logical Domains 1.3”in Chapter 6 Using Virtual Networks in the Logical Domains 1.3Administration Guide.
Configuring Virtual Network Devices Into an IPMP Group in aLogical Domain
Reliability can be achieved in a logical domain by connecting each virtualnetwork device to virtual switch instances in different service domains.Figure 6-3, for example, shows two virtual networks (vnet1 and vnet0)connected to virtual switch instances (vsw1 and vsw0) in different servicedomains (Service_1 and Service_2).
Figure 6-3 Each Virtual Network Device Connected to Different ServiceDomains
In the event of a physical link failure in the service domain, the virtualswitch device that is bound to that physical device detects the link failure.Then, the virtual switch device propagates the failure to thecorresponding virtual network device that is bound to this virtual switch.The virtual network device sends notification of this link event to the IPlayer in the guest LDom_A, which results in failover to the other virtualnetwork device in the IPMP group.
In addition to physical network failure, LDom_A can detect a virtualnetwork failure and trigger a failover following a service domain crash orshutdown.
LDom_A
IPMP GRP
vnet0 vsw0 nxge0
nxge1 vnet1vsw1
Service_2Service_1
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Using Multiple I/O Domains
Managing Advanced Logical Domains Configurations 6-19Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Refer to the Solaris 10 System Administration Guide: IP Services for moreinformation about how to configure and use IPMP groups.
Configuring and Using IPMP in the Service Domain
IPMP can be configured in the service domain by configuring virtualswitch interfaces into a group. Figure 6-4 shows two virtual switchinstances (vsw0 and vsw1) that are bound to two different physicaldevices.
Figure 6-4 Two Network Interfaces Configured as Part of IPMP Group
The two virtual switch interfaces can then be plumbed and configuredinto an IPMP group. In the event of a physical link failure, the virtualswitch device that is bound to that physical device detects the link failure.Then, the virtual switch device sends notification of this link event to theIP layer in the service domain, which results in failover to the othervirtual switch device in the IPMP group.
Using Link-Based IPMP in Logical Domains Virtual Networking
With Logical Domains 1.3, the virtual network and virtual switch devicessupport link status updates to the network stack. By default, a virtualnetwork device reports the status of its virtual link through its LDC to thevirtual switch. This setup is enabled by default and does not require youto perform additional configuration steps.
Sometimes it might be necessary to detect physical network link statechanges. For instance, if a physical device has been assigned to a virtualswitch, even if the link from a virtual network device to its virtual switchdevice is up, the physical network link from the service domain to theexternal network might be down. In such a case, it might be necessary toobtain and report the physical link status to the virtual network deviceand its stack.
IPMP GRP
vsw0
nxge0
vsw1
nxge1
Service LDom
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Using Multiple I/O Domains
6-20 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
The linkprop=phys-state option can be used to configure physical linkstate tracking for virtual network devices as well as for virtual switchdevices. When this option is enabled, the virtual device (virtual networkor virtual switch) reports its link state based on the physical link statewhile it is plumbed as an interface in the domain. You can use standardSolaris network administration commands, such as dladm and ifconfig,to check the link status. See the dladm(1M) and ifconfig(1M) man pages.In addition, the link status is also logged in the /var/adm/messages file.
Note – You can run both link-state-unaware and link-state-aware vnetand vsw drivers concurrently on a Logical Domains system. However, ifyou intend to configure link-based IPMP, you must install the link-state-aware driver. If you intend to enable physical link state updates, upgradeboth the vnet and vsw drivers to the Solaris 10 10/09 OS, and run at leastVersion 1.3 of the Logical Domains Manager.
Configuring Virtual Disk Multipathing With Multiple I/ODomains
If a virtual disk backend is accessible through different service domains,then you can configure virtual disk multipathing so that the virtual diskin a guest domain remains accessible if a service domain goes down. Thefollowing are examples of a virtual disk backend that is accessible throughdifferent service domains:
● A file on a network file system (NFS) server
● A shared physical disk that is connected to several service domains
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Using Multiple I/O Domains
Managing Advanced Logical Domains Configurations 6-21Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
To enable virtual disk multipathing, you must export a virtual diskbackend from the different service domains and add it to the samemultipathing group (mpgroup). The mpgroup is identified by a name andis configured when the virtual disk backend is exported. Figure 6-5illustrates how to configure virtual disk multipathing. In this example, amultipathing group named foo is used to create a virtual disk, whosebackend is accessible from two service domains: primary and alternate.
Figure 6-5 Logical Domain Virtual Disk Multipathing
To configure virtual disk multipathing, perform the following steps:
1. Export the virtual backend from the primary service domain.
# ldm add-vdsdev mpgroup=foo backend-path1 \volume@primary-vds0
Where backend-path1 is the path to the virtual disk backend fromthe primary domain.
2. Export the same virtual backend from the alternate service domain.
# ldm add-vdsdev mpgroup=foo backend-path2 \volume@alternate-vds0
Where backend-path2 is the path to the virtual disk backend fromthe alternate domain.
vdisk
LDC
Active Channel
LDC
Backup ChannelHypervisor
disk@primary-vds0mpgroup=foo
Virtual Disk Server(primary-vds0)
Service Domain 1(primary)
disk@primary-vds0mpgroup=foo
Virtual Disk Server(alternate-vds0)
ServiceDomain 2(alternate)
Guest Domain
vdc
Virtual Disk Backend(NFS file or shared disk)
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Using Multiple I/O Domains
6-22 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Note – backend-path1 and backend-path2 are paths to the same virtualdisk backend, but from two different domains (primary and alternate).These paths might be the same or might be different depending on theconfiguration of the primary and alternate domains. The volume name isa user choice. It might be the same or different for both commands.
3. Export the virtual disk to the guest domain.
# ldm add-vdisk disk-name volume@primary-vds0 ldom
For information about configuring virtual disk multipathing, see the“Configuring Virtual Disks Multipathing” in Chapter 6 Using VirtualDisks in the Logical Domains 1.3 Administration Guide.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
Managing Advanced Logical Domains Configurations 6-23Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Applying What You Have Learned – Lab Exercise
Now that you know how to migrate a logical domain from one server toanother and how to use multiple I/O domains, try applying what youhave learned in the lab exercise that follows.
In this exercise, you will perform the following tasks:
● Remove and restore a guest domain.
● Reconfigure guest domain virtual CPUs.
● Reconfigure guest domain memory.
● Split the PCI configuration to create I/O domains.
● Use ZFS volumes as virtual disks.
● Use a file as a virtual disk.
● Migrate an active guest domain.
● Reset the system to the factory default configuration.
Preparation
To prepare for this lab exercise:
● Review the LDom services you configured in the previous exercise.
● When performing this exercise, use the following system logininformation. See your instructor if you need help.
Control domain operating system:
● Login name root
● Login password cangetin
Guest domain operating system:
● Login name root
● Login password cangetin
● Task 7 requires that you partner with another student to migrate aguest domain from your machine to their machine. Contact yourinstructor if you need help.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
6-24 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Note – The sample command output shown for the following commandsare from a Sun SPARC Enterprise T5140 server. The server details anddevice pathing information might differ based on the server’s systemdisks and server architecture of the machine you are using.
Note – Examples shown in this exercise are from lab machine 4. Thecommand responses shown in the lab are examples only. Depending uponyour lab configuration, the responses to the commands in the labs mightvary slightly.
Task 1– Remove and Restore a Guest Domain
In this task you stop, unbind resources, and remove the guest domain.After the guest domain is removed, you restore it from a backupconfiguration file.
Perform the following steps:
1. Move to the control domain window.
2. List the logical domains currently configured on the system.
primary# ldm list-domainName State Flags Cons VCPU Memory Util Uptimeprimary active -n-cv- SP 8 2G 0.1% 1h 11mldom1 active -n---- 5000 8 2G 12% 10s
3. Stop the guest domain ldom1.
primary# ldm stop-domain ldom1LDom ldom1 stopped
The stop-domain subcommand sends a shut down request to the logicaldomain if the Solaris OS is booted. If the domain cannot be stopped by anyother means, use the -f option of the stop-domain subcommand to forcethe domain to stop.
4. Release (unbind) all the resources attached to the guest domainldom1.
primary# ldm unbind-domain ldom1
5. Remove the guest domain ldom1.
primary# ldm remove-domain ldom1
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
Managing Advanced Logical Domains Configurations 6-25Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
6. List the logical domains currently configured on the system.
primary# ldm list-domainNAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIMEprimary active -n-cv- SP 8 2G 0.4% 1h 12m
7. Restore the guest domain ldom1 configuration from the XML file youpreviously stored in the /var/tmp directory.
primary# ldm bind-domain -i /var/tmp/ldom1.xml
8. List the guest domain ldom1 bound resources.
primary# ldm list-bindings ldom1NAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIMEldom1 bound ------ 5000 8 2G
MAC 00:14:4f:f8:d6:15
HOSTID 0x84f8d615
CONTROL failure-policy=ignore
DEPENDENCY master=
VCPU VID PID UTIL STRAND 0 12 100% 1 13 100% 2 14 100% 3 15 100%
MEMORY RA PA SIZE 0xe000000 0x8e000000 2G
VARIABLES auto-boot?=false boot-device=/virtual-devices@100/channel-devices@200/disk@0
NETWORK NAME SERVICE ID DEVICE MAC MODE PVID VID MTU LINKPROP vnet0 primary-vsw0@primary 0 network@0 00:14:4f:fc:00:04 1 1500
PEER MAC MODE PVID VID MTU LINKPROP primary-vsw0@primary 00:14:4f:fa:6a:f8 1 1500
DISK NAME VOLUME TOUT ID DEVICE SERVER MPGROUP vdisk0 vol0@primary-vds0 0 disk@0 primary
VCONS NAME SERVICE PORT ldom1 primary-vcc0@primary 5000
9. Start guest domain ldom1.
primary# ldm start-domain ldom1LDom ldom1 started
10. Move to the guest domain window.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
6-26 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
11. Boot the Solaris OS. Log in to the guest domain ldom1 as root.
{0} ok boot...machine4-vnet0 console login: rootPassword: cangetin...
12. Verify that the bound resources are available to the guest domainldom1 operation system.
guest# psrinfo0 on-line since 02/09/2010 16:19:461 on-line since 02/09/2010 16:19:472 on-line since 02/09/2010 16:19:473 on-line since 02/09/2010 16:19:474 on-line since 02/09/2010 16:19:475 on-line since 02/09/2010 16:19:476 on-line since 02/09/2010 16:19:477 on-line since 02/09/2010 16:19:47guest# prtdiag|grep MemMemory size: 2048 Megabytesguest# ifconfig -alo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL>mtu 8232 index 1inet 127.0.0.1 netmask ff000000vnet0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500index 2 inet 192.168.XX.43 netmask ffffff00 broadcast192.168.100.255 ether 8:0:20:ab:1:40guest# formatSearching for disks...done
AVAILABLE DISK SELECTIONS: 0. c0d0 <SUN300G cyl 46873 alt 2 hd 20 sec 625> /virtual-devices@100/channel-devices@200/disk@0
Specify disk (enter its number): ^D
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
Managing Advanced Logical Domains Configurations 6-27Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Task 2 – Reconfigure Guest Virtual CPUs
Dynamic reconfiguration (DR) is the ability to add or remove resourceswhile the operating system is running. In this task you use the LogicalDomains Management utility to dynamically add virtual CPUs to a guestdomain. You then remove the virtual CPUs. See Figure 6-6.
Figure 6-6 Dynamically Reconfiguring Guest Domain vCPUs
Perform the following steps:
1. Verify that you have a terminal window open on the guest domainand a console window open on the control domain.
2. Move to the guest domain window.
3. Verify the Logical Domains dynamic reconfiguration daemon, drd, isrunning in the guest domain ldom1.
guest# svcs drdonline 11:46:05 svc:/platform/sun4v/drd:default
4. Use the psrinfo command to determine how many virtual CPUscan be seen by the operating system.
Note – The output for the following commands are specific to the SunSPARC Enterprise T5140 server, which is used as an example in thiscourse. Based on the server you are using, your system configuration andserver architecture, the output and your responses will vary.
guest# psrinfo0 on-line since 02/09/2010 16:19:461 on-line since 02/09/2010 16:19:47
Hypervisor
Control Domain
����
Guest Domain
Resources
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
6-28 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
2 on-line since 02/09/2010 16:19:473 on-line since 02/09/2010 16:19:474 on-line since 02/09/2010 16:19:475 on-line since 02/09/2010 16:19:476 on-line since 02/09/2010 16:19:477 on-line since 02/09/2010 16:19:47
5. Move to the control domain window.
6. List all the host server CPU resources.
primary# ldm list-devices -a vcpuVCPU PID %FREE PM 0 0 no 1 0 no 2 0 no 3 0 no 4 0 no 5 0 no 6 0 no 7 0 no 8 0 no 9 0 no 10 0 no 11 0 no 12 0 no 13 0 no 14 0 no 15 0 no 16 100 ---
17 100 --- 18 100 ---
...
Are there sufficient resources available to allocate a total of 16 virtualCPUs to the guest domain ldom1? Yes, based on the output of theprevious command.
7. Allocate a total of 16 virtual CPUs to guest domain ldom1.
primary# ldm set-vcpu 16 ldom1
or
primary# ldm add-vcpu 8 ldom1
8. List the bindings of guest domain ldom1.
primary# ldm list-bindings ldom1NAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIMEldom1 active -n---- 5000 16 2G 0.1% 38m
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
Managing Advanced Logical Domains Configurations 6-29Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
...VCPU VID PID UTIL STRAND 0 8 0.2% 100% 1 9 0.0% 100% 2 10 0.0% 100% 3 11 0.0% 100% 4 12 0.0% 100% 5 13 0.0% 100% 6 14 0.3% 100% 7 15 0.0% 100% 8 16 0.0% 100% 9 17 0.0% 100% 10 18 0.1% 100% 11 19 0.0% 100% 12 20 0.1% 100% 13 21 0.0% 100% 14 22 0.0% 100% 15 23 0.0% 100%...
9. Move to guest domain window.
10. Run the psrinfo command to determine how many virtual CPUscan be seen by the operating system.
guest# psrinfo0 on-line since 02/09/2010 16:19:461 on-line since 02/09/2010 16:19:472 on-line since 02/09/2010 16:19:473 on-line since 02/09/2010 16:19:474 on-line since 02/09/2010 16:19:475 on-line since 02/09/2010 16:19:476 on-line since 02/09/2010 16:19:477 on-line since 02/09/2010 16:19:478 on-line since 02/09/2010 16:28:089 on-line since 02/09/2010 16:28:0810 on-line since 02/09/2010 16:28:0811 on-line since 02/09/2010 16:28:0812 on-line since 02/09/2010 16:28:0813 on-line since 02/09/2010 16:28:0814 on-line since 02/09/2010 16:28:0815 on-line since 02/09/2010 16:28:08
11. Move to the control domain window.
12. Remove eight vCPUs from guest domain ldom1.
primary# ldm remove-vcpu 8 ldom1
or
primary# ldm set-vcpu 8 ldom1
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
6-30 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
13. Move to the guest domain window.
14. Run the psrinfo command to determine how many CPUs can beseen by the operating system.
guest# psrinfo0 on-line since 02/09/2010 16:19:461 on-line since 02/09/2010 16:19:472 on-line since 02/09/2010 16:19:473 on-line since 02/09/2010 16:19:474 on-line since 02/09/2010 16:19:475 on-line since 02/09/2010 16:19:476 on-line since 02/09/2010 16:19:477 on-line since 02/09/2010 16:19:47
Task 3 – Reconfigure Guest Domain Memory
To reconfigure memory in any domain except the primary domain, youmust stop the domain first. You can then reconfigure the memory, and thenew memory configuration will be available when the domain isrestarted. In this task, you use the Logical Domains Management utility toadd memory to and remove memory from a guest domain. See Figure 6-7.
Figure 6-7 Guest Domain Delayed Memory Reconfiguration
Perform the following steps:
1. Move to the guest domain window.
2. Run the prtdiag command to determine how much memory can beseen by the operating system.
guest# prtdiag|grep MemMemory size: 2048 Megabytes
Hypervisor
Control Domain
memory
Guest Domain
Resources
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
Managing Advanced Logical Domains Configurations 6-31Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
3. Shut down the guest domain operating system.
guest# shutdown -y -i0 -g0Shutdown started. Tuesday, February 9, 2010 2:41:47 PM MST...{0} ok
4. Move to the control domain window.
5. List all the Sun SPARC EnterpriseT5140 memory resources.
primary# ldm list-devices -a memoryMEMORY PA SIZE BOUND 0x0 512K _sys_ 0x80000 1536K _sys_ 0x200000 94M _sys_ 0x6000000 32M _sys_ 0x8000000 96M _sys_ 0xe000000 2G primary 0x8e000000 2G ldom1 0x10e000000 3872M
Are there sufficient resources available to allocate a total of fourgigabytes of memory to the guest domain ldom1? Yes.
6. Stop guest domain ldom1.
primary# ldm stop-domain ldom1LDom ldom1 stoppedprimary# ldm list-domainNAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIMEprimary active -n-cv- SP 8 2G 0.4% 1d 3hldom1 bound ------ 5000 8 2G
7. Allocate four gigabytes of memory to guest domain ldom1.
primary# ldm set-memory 4G ldom1
or
primary# ldm add-memory 2G ldom1
Before you change the memory configuration, the guest domain must be inthe bound or inactive state.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
6-32 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
8. List the bindings of guest domain ldom1.
primary# ldm list-bindings ldom1NAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIMEldom1 bound ------ 5000 8 4G...
MEMORY RA PA SIZE 0xe000000 0x8e000000 4G...
9. Start guest domain ldom1.
primary# ldm start-domain ldom1LDom ldom1 started
10. Move to the guest domain window.
11. Boot the Solaris 10 operating system and log in as root.
{0} ok bootBoot device: vdisk0 File and args:...machine4-vnet0 console login: rootPassword: cangetin...
12. Run the prtdiag command to determine how much memory can beseen by the operating system.
guest# prtdiag|grep MemMemory size: 4096 Megabytes
13. Shut down the guest domain operating system.
guest# shutdown -y -i0 -g0Shutdown started. Tuesday, February 9, 2010 4:48:47 PM MST...{0} ok
14. Move to the control domain window.
15. Stop guest domain ldom1.
primary# ldm stop-domain ldom1LDom ldom1 stoppedprimary# ldm list-domainNAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIMEprimary active -n-cv- SP 8 2G 0.4% 1d 3h 28mldom1 bound ------ 5000 8 4G
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
Managing Advanced Logical Domains Configurations 6-33Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
16. Remove two gigabytes of memory from guest domain ldom1.
primary# ldm remove-memory 2G ldom1
Before you change the memory configuration, the guest domain must be inthe bound or inactive state.
17. Start guest domain ldom1.
primary# ldm start-domain ldom1LDom ldom1 started
18. Move to the guest domain window.
19. Boot the Solaris 10 operating system. Log in as root.
{0} ok bootBoot device: vdisk0 File and args:...machine4-vnet0 console login: rootPassword: cangetin...
20. Run the prtdiag command to verify the memory configurationchange.
guest# prtdiag|grep MemMemory size: 2048 Megabytes
Task 4 – Split the PCI Configuration to Create I/ODomains
The PCIe bus architecture on the Sun SPARC Enterprise T5140 serverconsists of two ports (leaves) with various bus devices attached to them.These are identified on the server with the names pci@400 and [email protected] a multidomain environment, the PCIe bus can be programmed toassign each bus to a separate domain using the Logical Domains Manager.Thus, you can enable more than one domain with direct access to physicaldevices instead of using I/O virtualization.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
6-34 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
In this task you use the Logical Domains Management utility to split thePCI bus such that the control (primary) domain maintains access tonetwork and disk devices on one PCI bus. You then bind the other PCIbus to the guest domain ldom1. Finally, you configure the guest domainphysical network interface to provide direct access to the network. SeeFigure 6-8.
Figure 6-8 Split PCI Configuration
Perform the following steps:
1. Move to the control domain window.
2. List the primary domain’s current bindings to determine PCI busownership.
primary# ldm list-bindings primary
NAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIMEprimary active -n-cv- SP 8 2G 0.3% 2h 38m
...
IO DEVICE PSEUDONYM OPTIONS pci@400 pci_0 pci@500 pci_1
...
Note that pci@400 and pci@500 are currently bound to the primarydomain.
Hypervisor
Control/Service Domain
������� �������
Guest Service/IO Domain
Resources
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
Managing Advanced Logical Domains Configurations 6-35Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
3. Determine which disk is being used as the boot disk.
primary# df // (/dev/dsk/c1t0d0s0 ):260974732 blocks 16750277 files
If using ZFS, use the zpool status command to determine thephysical disk
4. Determine the physical device to which the boot disk is linked.
primary# ls -l /dev/dsk/c1t0d0s0lrwxrwxrwx 1 root root 49 Jan 15 15:32 /dev/dsk/c1t0d0s0 -> ../../devices/pci@400/pci@0/pci@8/scsi@0/sd@0,0:a
On which PCI bus is the control domain boot disk located?
PCI pci@400.
5. Determine which network interfaces are currently used (direct I/Oand virtual service) by the control (service) domain operatingsystem.
primary# ifconfig -alo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu8232 index 1 inet 127.0.0.1 netmask ff000000vsw0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2 inet 192.168.XX.104 netmask ffffff00 broadcast 192.168.XX.255 ether 0:14:4f:1d:e9:b6
primary# ldm list-servicesVCC NAME LDOM PORT-RANGE primary-vcc0 primary 5000-5100
VSWNAME LDOM MAC NET-DEV ID DEVICE LINKPROP DEFAULT-VLAN-ID PVID VID MTU MODEprimary-vsw0 primary 00:14:4f:fa:6a:f8 nxge0 0 switch@0 1 1 1500
VDS NAME LDOM VOLUME OPTIONS MPGROUP DEVICE primary-vds0 primary vol0 /dev/dsk/c1t1d0s2
Which network interface is currently being used by the controldomain? Based on the above example, nxge0 is currently being used bythe control domain.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
6-36 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
6. Check /etc/path_to_inst to determine the physical path of thenetwork interfaces currently configured in the system.
primary# grep network /etc/path_to_inst"/virtual-devices@100/channel-devices@200/virtual-network-switch@0" 0 "vsw""/pci@400/pci@0/pci@c/network@0" 0 "e1000g""/pci@400/pci@0/pci@c/network@0,1" 1 "e1000g""/pci@500/pci@0/pci@8/network@0" 0 "nxge""/pci@500/pci@0/pci@8/network@0,1" 1 "nxge""/pci@500/pci@0/pci@8/network@0,2" 2 "nxge""/pci@500/pci@0/pci@8/network@0,3" 3 "nxge"
Based on the information gathered in Step 1 through Step 6, youshould now be able to determine which PCI bus the controldomain’s devices are associated with. Is there a bus that can beremoved from the control domain without reconfiguring the currentdisks and network interfaces?
Based on the above example, the answer is no. In the example, physicalnetwork interface nxge0 (mapped to vsw0) is attached to PCI buspci@500. The boot disk is on PCI bus pci@400. To split the PCI buses, allthe devices used by the control domain services must be moved to the samePCI bus where the service domain boot disk is located.
Note – If the devices are on different buses, Step 7 will be required tomove the network device to the same bus as the boot device. If the devicesare already on the same bus, then Step 7 can be skipped.
7. To reconfigure virtual switch vsw0, run the ldm set-vswitchcommand. Replace network interface nxge0 (PCI bus pci@500) withe1000g0 (PCI bus pci@400).
This example assumes that the boot device for the control domain is on PCIbus pci@400, in which case, the network device would also need to beassociated with PCI bus pci@400. Note that if the devices are on differentbuses when the split occurs, the server may require alternative steps torecover because the control domain may not boot.
a. Change the virtual switch (primary-vsw0) network deviceassignment to e1000g0.
primary# ldm set-vswitch net-dev=e1000g0 primary-vsw0Initiating delayed reconfigure operation on LDom primary. Allconfiguration changes for other LDoms are disabled until the LDomreboots, at which time the new configuration for LDom primary will alsotake effect.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
Managing Advanced Logical Domains Configurations 6-37Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
b. Run the ldm list-domain -l primary to determine theservice domain status.
primary# ldm list-domain -l primaryNAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIMEprimary active -ndcv- SP 8 2G 0.1% 5h 25m
FLAGSnormal,delayed(modify),control,vio-service
SOFTSTATESolaris running...
c. Reboot the service domain. Log back in as root.
primary# shutdown -y -i6 -g0...console login: rootPassword: cangetin...
The will cause the guest domain window to close. Reopen the terminalwindow and reconnect to the guest domain.
d. Verify that the virtual switch service has been updated.
primary# ldm list-servicesVCC NAME LDOM PORT-RANGE primary-vcc0 primary 5000-5100
VSW NAME LDOM MAC NET-DEV ID DEVICE LINKPROP DEFAULT-VLAN-ID PVID VID MTU MODE primary-vsw0 primary 00:14:4f:fb:79:88 e1000g0 0 switch@0 1 1 1500
VDS NAME LDOM VOLUME OPTIONS MPGROUP DEVICE primary-vds0 primary vol0 /dev/dsk/c1t1d0s2
e. Move to the guest domain window.
f. Log in as root.
machine4-vnet0 console login: rootPassword: cangetin...
g. Run the ping command to verify that you have access to thesubnet your guest domain is assigned to. For example, to pingthe 192.168.XX.0 network, use the following command:
guest# ping -s 192.168.XX.255....^C
8. Move to the control domain window.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
6-38 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
9. Remove the PCI bus that is not currently being used by the controldomain.
The following is an example of removing a PCI bus on a T5140 server.
primary# ldm remove-io pci@500 primaryInitiating delayed reconfigure operation on LDom primary. Allconfiguration changes for other LDoms are disabled until the LDomreboots, at which time the new configuration for LDom primary will alsotake effect.
10. Save the split configuration to the system controller. Name thisconfiguration config_split.
primary# ldm add-spconfig config_split
11. Reboot the control domain.
primary# shutdown -y -i6 -g0...console login: rootPassword: cangetin....
The will cause the guest domain window to close. Reopen the terminalwindow and reconnect to the guest domain.
Caution – If you happen to remove the primary bus by error, you can return tothe SC and do a reset. This voids the remove-io command used above and youcan then remove the correct bus.
Upon reboot, if you see an error message such as the following:
Boot device: net File and args:ERROR: boot-read failEvaluating:Can’t locate boot device
The error occurs because you removed the wrong PCI bus. Therefore, make surethat you remove the correct PCI bus.
12. List the configurations on the system controller to verify thatconfig_split is current.
primary# ldm list-spconfigfactory-defaultconfig_initialconfig_split [current]
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
Managing Advanced Logical Domains Configurations 6-39Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
13. Verify that the PCI bus that was removed in the previous steps is notbound to the control domain.
primary# ldm list-bindings primaryNAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIMEprimary active -n-cv- SP 8 2G 0.4% 3m...IO DEVICE PSEUDONYM OPTIONS pci@400 pci_0...
14. Place guest domain ldom1 in the bound state.
primary# ldm list-domainNAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIMEprimary active -n-cv- SP 8 2G 0.4% 10mldom1 active -n---- 5000 8 2G 25% 10mprimary# ldm stop-domain ldom1LDom ldom1 stoppedprimary# ldm list-domainNAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIMEprimary active -n-cv- SP 8 2G 0.5% 11mldom1 bound ------ 5000 8 2G
15. Add the PCI bus that was removed in the previous steps (from thecontrol domain) to guest domain ldom1.
primary# ldm add-io pci@500 ldom1
Note that this operation will turn the ldom1 domain in to a direct I/Odomain.
16. Verify that the PCI bus is now bound to guest domain ldom1.
Note that the output for the following command might vary fromthe example shown, based on hardware.
primary# ldm list-bindings ldom1NAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIMEldom1 bound ------ 5000 8 2G...IO DEVICE PSEUDONYM OPTIONS pci@500 pci_1...
17. Start guest domain ldom1.
primary# ldm start-domain ldom1
18. Move to the guest domain window.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
6-40 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
19. Boot the Solaris OS. After the Solaris OS is completely booted, log inas root.
{0} ok bootBoot device: vdisk0 File and args:...machine4-vnet0 console login: rootPassword: cangetin...
20. Run the grep network /etc/path_to_inst command toidentify the network devices that can be seen by the guest domainldom1 operating system.
guest# grep network /etc/path_to_inst
"/virtual-devices@100/channel-devices@200/network@0" 0 "vnet""/pci@500/pci@0/pci@8/network@0" 0 "nxge""/pci@500/pci@0/pci@8/network@0,1" 1 "nxge""/pci@500/pci@0/pci@8/network@0,2" 2 "nxge""/pci@500/pci@0/pci@8/network@0,3" 3 "nxge"
21. Plumb the first network interface attached to the PCI bus pci@500.
guest# ifconfig nxge0 plumb...Jan 20 16:31:07 machine4-vnet0 nxge: NOTICE: nxge0: xcvr addr:0x1d - linkis up 100 Mbps full duplex...
22. Manually configure the IP addressing information. Use the IPinformation for your lab machine in the /etc/hosts file.
The following example is from machine # 4.
guest# ifconfig nxge0 192.168.XX.41 netmask 255.255.255.0 broadcast+ up
23. Verify that the operating system can access the subnet associatedwith this interface. Use the information you gathered in previoussteps.
guest# ping -i nxge0 -s 192.168.XX.255...^C
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
Managing Advanced Logical Domains Configurations 6-41Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Task 5 – Use a File as a Virtual Disk
In this task, you create a disk image file, export it to the guest domain,and create a file system on it (see Figure 6-9). Then you remove it from thesystem.
Figure 6-9 Exporting an Image File to the Guest Domain
Perform the following steps:
1. Move to the control domain window.
2. Create a directory named /ldoms/images. This directory will beused to store the disk image file.
primary# mkdir -p /ldoms/images
3. Run the following command to create a disk image.
primary# mkfile 5G /ldoms/images/S10U8-5g.img
This will take a couple of minutes to complete.
Hypervisor
Service Domain
����������
���� ������ �
���
Guest Domain
����
����
�����������
�����
Internal Disk 0
Resource
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
6-42 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
4. Add a virtual disk service device to virtual disk service vds0 usingthe /ldoms/images/S10U8-5g.img file. Name this device vol1.
primary# ldm add-vdiskserverdevice /ldoms/images/S10U8-5g.img \vol1@primary-vds0
5. Assign virtual disk vol1 to guest domain ldom1 using theadd-vdisk subcommand. Name the virtual disk vdisk1.
primary# ldm add-vdisk vdisk1 vol1@primary-vds0 ldom1
6. Move to the guest domain window.
7. Log in as root.
Console login: rootPassword: cangetin...
8. List the contents of the /dev/rdsk directory to determine thecurrently configured raw devices.
The output of the following command varies based on your systemconfiguration:
guest# ls /dev/rdskc0d0s0 c0d0s2 c0d0s4 c0d0s6 c0d1s0 c0d1s2 c0d1s4 c0d1s6c0d0s1 c0d0s3 c0d0s5 c0d0s7 c0d1s1 c0d1s3 c0d1s5 c0d1s7
Note that the special files for the new disk (c0d1) are now available.
Note – If the special files for the new disk (c0d1) are not present, run thedevfsadm -v command to create the new special file for the virtual disk.
9. Run the format command to view the new virtual disk. Display thepartition table.
guest# formatSearching for disks...done
AVAILABLE DISK SELECTIONS: 0. c0d0 <SUN300G cyl 46873 alt 2 hd 20 sec 625> /virtual-devices@100/channel-devices@200/disk@0 1. c0d1 <SUN-DiskImage-5GB cyl 17474 alt 2 hd 1 sec 600> /virtual-devices@100/channel-devices@200/disk@1Specify disk (enter its number): 1selecting c0d1[disk formatted, no defect list found]
FORMAT MENU: disk - select a disk type - select (define) a disk type
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
Managing Advanced Logical Domains Configurations 6-43Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
partition - select (define) a partition table current - describe the current disk format - format and analyze the disk repair - repair a defective sector show - translate a disk address 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 volname - set 8-character volume name !<cmd> - execute <cmd>, then return quitformat> partition
PARTITION MENU: 0 - change `0' partition 1 - change `1' partition 2 - change `2' partition 3 - change `3' partition 4 - change `4' partition 5 - change `5' partition 6 - change `6' partition 7 - change `7' partition select - select a predefined table modify - modify a predefined partition table name - name the current table print - display the current table label - write partition map and label to the disk !<cmd> - execute <cmd>, then return quitpartition> printCurrent partition table (original):Total disk cylinders available: 17474 + 2 (reserved cylinders)
Part Tag Flag Cylinders Size Blocks0 unassigned wm 0 0 (0/0/0) 01 unassigned wm 0 0 (0/0/0) 02 backup wm 0 - 17473 5.00GB (17474/0/0) 104844003 unassigned wm 0 0 (0/0/0) 04 unassigned wm 0 0 (0/0/0) 05 unassigned wm 0 0 (0/0/0) 06 unassigned wm 0 0 (0/0/0) 07 unassigned wm 0 0 (0/0/0) 0
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
6-44 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
partition> modifySelect partitioning base: 0. Current partition table (original) 1. All Free HogChoose base (enter number) [0]? 1
Part Tag Flag Cylinders Size Blocks0 root wm 0 0 (0/0/0) 01 swap wu 0 0 (0/0/0) 02 backup wu 0 - 17473 5.00GB (17474/0/0) 104844003 unassigned wm 0 0 (0/0/0) 04 unassigned wm 0 0 (0/0/0) 05 unassigned wm 0 0 (0/0/0) 06 usr wm 0 0 (0/0/0) 07 unassigned wm 0 0 (0/0/0) 0
Do you wish to continue creating a new partitiontable based on above table[yes]? yFree Hog partition[6]? 0Enter size of partition '1' [0b, 0c, 0.00mb, 0.00gb]:Enter size of partition '3' [0b, 0c, 0.00mb, 0.00gb]:Enter size of partition '4' [0b, 0c, 0.00mb, 0.00gb]:Enter size of partition '5' [0b, 0c, 0.00mb, 0.00gb]:Enter size of partition '6' [0b, 0c, 0.00mb, 0.00gb]:Enter size of partition '7' [0b, 0c, 0.00mb, 0.00gb]:
Part Tag Flag Cylinders Size Blocks0 root wm 0 - 17473 5.00GB (17474/0/0) 104844001 swap wu 0 0 (0/0/0) 02 backup wu 0 - 17473 5.00GB (17474/0/0) 104844003 unassigned wm 0 0 (0/0/0) 04 unassigned wm 0 0 (0/0/0) 05 unassigned wm 0 0 (0/0/0) 06 usr wm 0 0 (0/0/0) 07 unassigned wm 0 0 (0/0/0) 0
Okay to make this the current partition table[yes]? yesEnter table name (remember quotes): "test1"
Ready to label disk, continue? y
partition> ^D
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
Managing Advanced Logical Domains Configurations 6-45Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
10. Run the newfs command to create a file system on the raw diskdevice, which you partitioned in step 7.
Example: guest# newfs /dev/rdsk/c0d1s0newfs: construct a new file system /dev/rdsk/c0d1s0: (y/n)? y/dev/rdsk/c0d1s0: 10484400 sectors in 17474 cylinders of 1 tracks,600 sectors 5119.3MB in 137 cyl groups (128 c/g, 37.50MB/g, 4800 i/g)super-block backups (for fsck -F ufs -o b=#) at: 32, 76832, 153632,230432, 307232, 384032, 460832, 537632, 614432, 691232, 9753632, 9830432,9907232, 9984032, 10060832, 10137632, 10214432, 10291232, 10368032,10444832
11. Mount the new file system as /mnt.
guest# mount /dev/dsk/c0d1s0 /mnt
12. Run the df -h /mnt command to verify the new file systemconfiguration.
guest# df -h /mntFilesystem size used avail capacity Mounted on/dev/dsk/c0d1s0 4.9G 5.0M 4.9G 1% /mnt
13. Unmount /mnt.
guest# umount /mnt
14. Move to the control domain window.
15. Remove virtual disk vdisk1 from guest domain ldom1.
primary# ldm remove-vdisk vdisk1 ldom1
16. Move to the guest domain window.
17. Log in as root.
Console login: rootPassword: cangetin...
18. Run the format command to verify that disk c0d1 has beenremoved.
guest# formatSearching for disks...done
AVAILABLE DISK SELECTIONS: 0. c0d0 <SUN300G cyl 46873 alt 2 hd 20 sec 625> /virtual-devices@100/channel-devices@200/disk@0Specify disk (enter its number): ^D
19. Run the devfsadm -vC command to remove the unused special files.
# devfsadm -vC...
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
6-46 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
devfsadm[852]: verbose: removing file: /dev/dsk/c0d1s0devfsadm[852]: verbose: removing file: /dev/dsk/c0d1s1devfsadm[852]: verbose: removing file: /dev/dsk/c0d1s2devfsadm[852]: verbose: removing file: /dev/dsk/c0d1s3devfsadm[852]: verbose: removing file: /dev/dsk/c0d1s4devfsadm[852]: verbose: removing file: /dev/dsk/c0d1s5devfsadm[852]: verbose: removing file: /dev/dsk/c0d1s6devfsadm[852]: verbose: removing file: /dev/dsk/c0d1s7devfsadm[852]: verbose: removing file: /dev/rdsk/c0d1s0devfsadm[852]: verbose: removing file: /dev/rdsk/c0d1s1devfsadm[852]: verbose: removing file: /dev/rdsk/c0d1s2devfsadm[852]: verbose: removing file: /dev/rdsk/c0d1s3devfsadm[852]: verbose: removing file: /dev/rdsk/c0d1s4devfsadm[852]: verbose: removing file: /dev/rdsk/c0d1s5devfsadm[852]: verbose: removing file: /dev/rdsk/c0d1s6devfsadm[852]: verbose: removing file: /dev/rdsk/c0d1s7
20. Move to the control domain window.
21. Remove virtual disk device vol1 from the service domain.
primary# ldm remove-vdiskserverdevice vol1@primary-vds0
22. Verify the configuration change by listing the guest domain ldom1bindings and primary domain services.
primary# ldm list-bindings ldom1NAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIMEldom1 active -n---- 5000 8 2G 0.2% 20m...DISK NAME VOLUME TOUT ID DEVICE SERVERMPGROUP vdisk0 vol0@primary-vds0 0 disk@0 primary...
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
Managing Advanced Logical Domains Configurations 6-47Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Task 6 – Export a ZFS Volume as a Virtual Disk
In this task you create a ZFS volume in the control domain and make thatvolume available to a guest domain as a virtual disk. See Figure 6-10.
Figure 6-10 Exporting a ZFS Volume to the Guest Domain
Perform the following steps:
1. In the control domain window, run the following command to createa ZFS storage pool using the unused disk drive on the controldomain. The following example assumes that the disk devices are onc1. Use the format command to determine which device to use.
primary# zpool create -f tank1 c1t2d0
2. Run the following command to create a 500 megabyte ZFS volumenamed vol1.
primary# zfs create -V 500m tank1/vol1
Hypervisor
Service Domain
����������
���� ������ ��
���
Guest Domain
����
�����
����������
�����
Internal Disk 2
Resources
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
6-48 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
3. Run the following command to verify that the zpool (tank1) andZFS volume (tank1/vol1) have been created.
primary# zfs listNAME USED AVAIL REFER MOUNTPOINTtank1 500M 273G 21K /tank1tank1/vol1 500M 274G 16K
4. Add the /dev/zvol/dsk/tank1/vol1 device to the control domainvirtual disk service. Name the virtual disk device zvol.
primary# ldm add-vdiskserverdevice /dev/zvol/dsk/tank1/vol1 \zvol@primary-vds0
5. Assign the disk zvol to guest domain ldom1 using the add-vdisksubcommand. Name the virtual disk zvdisk.
primary# ldm add-vdisk zvdisk zvol@primary-vds0 ldom1
6. Move to the guest domain window.
7. List the contents of the /dev/rdsk directory to determine thecurrently configured raw devices.
Note that the out for the following command varies based on the server andcurrent configuration.
guest# ls /dev/rdskc0d0s0 c0d0s2 c0d0s4 c0d0s6 c0d1s0 c0d1s2 c0d1s4 c0d1s6c0d0s1 c0d0s3 c0d0s5 c0d0s7 c0d1s1 c0d1s3 c0d1s5 c0d1s7
Note that the special files for the new disk (c0d1) are now available.
8. Run the format command to label and partition the new disk.
You need to label the disk to use any disk partitions.
guest# formatSearching for disks...done
AVAILABLE DISK SELECTIONS: 0. c0d0 <SUN300G cyl 46873 alt 2 hd 20 sec 625> /virtual-devices@100/channel-devices@200/disk@0 1. c0d1 <SUN-DiskImage-500MB cyl 1704 alt 2 hd 1 sec 600> /virtual-devices@100/channel-devices@200/disk@1Specify disk (enter its number): 1selecting c0d1[disk formatted, no defect list found]
FORMAT MENU: disk - select a disk type - select (define) a disk type partition - select (define) a partition table current - describe the current disk
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
Managing Advanced Logical Domains Configurations 6-49Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
format - format and analyze the disk repair - repair a defective sector show - translate a disk address 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 volname - set 8-character volume name !<cmd> - execute <cmd>, then return quit
format> partition
PARTITION MENU: 0 - change `0' partition 1 - change `1' partition 2 - change `2' partition 3 - change `3' partition 4 - change `4' partition 5 - change `5' partition 6 - change `6' partition 7 - change `7' partition select - select a predefined table modify - modify a predefined partition table name - name the current table print - display the current table label - write partition map and label to the disk !<cmd> - execute <cmd>, then return quitpartition> printCurrent partition table (original):Total disk cylinders available: 1704 + 2 (reserved cylinders)
Part Tag Flag Cylinders Size Blocks 0 unassigned wm 0 0 (0/0/0) 0 1 unassigned wm 0 0 (0/0/0) 0 2 backup wm 0 - 1703 499.22MB (1704/0/0) 1022400 3 unassigned wm 0 0 (0/0/0) 0 4 unassigned wm 0 0 (0/0/0) 0 5 unassigned wm 0 0 (0/0/0) 0 6 unassigned wm 0 0 (0/0/0) 0 7 unassigned wm 0 0 (0/0/0) 0
partition> modify
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
6-50 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Select partitioning base: 0. Current partition table (original) 1. All Free HogChoose base (enter number) [0]? 1
Part Tag Flag Cylinders Size Blocks 0 root wm 0 0 (0/0/0) 0 1 swap wu 0 0 (0/0/0) 0 2 backup wu 0 - 1703 499.22MB (1704/0/0) 1022400 3 unassigned wm 0 0 (0/0/0) 0 4 unassigned wm 0 0 (0/0/0) 0 5 unassigned wm 0 0 (0/0/0) 0 6 usr wm 0 0 (0/0/0) 0 7 unassigned wm 0 0 (0/0/0) 0
Do you wish to continue creating a new partitiontable based on above table[yes]? yesFree Hog partition[6]?Enter size of partition '0' [0b, 0c, 0.00mb, 0.00gb]: $Warning: no space available for '1' from Free Hog partitionWarning: no space available for '3' from Free Hog partitionWarning: no space available for '4' from Free Hog partitionWarning: no space available for '5' from Free Hog partitionWarning: no space available for '7' from Free Hog partition
Part Tag Flag Cylinders Size Blocks 0 root wm 0 - 1703 499.22MB (1704/0/0) 1022400 1 swap wu 0 0 (0/0/0) 0 2 backup wu 0 - 1703 499.22MB (1704/0/0) 1022400 3 unassigned wm 0 0 (0/0/0) 0 4 unassigned wm 0 0 (0/0/0) 0 5 unassigned wm 0 0 (0/0/0) 0 6 usr wm 0 0 (0/0/0) 0 7 unassigned wm 0 0 (0/0/0) 0
Okay to make this the current partition table[yes]? yesEnter table name (remember quotes): "test2"
Ready to label disk, continue? yes
partition> ^D
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
Managing Advanced Logical Domains Configurations 6-51Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
9. Run the newfs command to create a file system on the new ZFSvirtual disk discovered in the previous step.
guest# newfs /dev/rdsk/c0d1s0newfs: construct a new file system /dev/rdsk/c0d1s0: (y/n)? y/dev/rdsk/c0d1s0: 1022400 sectors in 1704 cylinders of 1 tracks, 600sectors 499.2MB in 107 cyl groups (16 c/g, 4.69MB/g, 2240 i/g)super-block backups (for fsck -F ufs -o b=#) at: 32, 9632, 19232, 28832,38432, 48032, 57632, 67232, 76832, 86432, 931232, 940832, 950432, 960032,969632, 979232, 988832, 998432, 1008032, 1017632
10. Mount the new file system as /mnt.
guest# mount /dev/dsk/c0d1s0 /mnt
11. Run the df -h /mnt command to verify the file systemconfiguration.
guest# df -h /mntFilesystem size used avail capacity Mounted on/dev/dsk/c0d1s0 468M 1.0M 420M 1% /mnt
12. Unmount the new file system.
guest# umount /mnt
13. Move to the control domain window.
14. Remove virtual disk zvdisk from guest domain ldom1.
primary# ldm remove-vdisk zvdisk ldom1
15. Run the format command to verify that disk c0d1 has beenremoved.
guest# formatSearching for disks...done
AVAILABLE DISK SELECTIONS: 0. c0d0 <SUN300G cyl 46873 alt 2 hd 20 sec 625> /virtual-devices@100/channel-devices@200/disk@0Specify disk (enter its number): ^D
16. Run the devfsadm -vC command to remove the unused special files.
guest# devfsadm -vCdevfsadm[852]: verbose: removing file: /dev/dsk/c0d1s0devfsadm[852]: verbose: removing file: /dev/dsk/c0d1s1devfsadm[852]: verbose: removing file: /dev/dsk/c0d1s2devfsadm[852]: verbose: removing file: /dev/dsk/c0d1s3devfsadm[852]: verbose: removing file: /dev/dsk/c0d1s4devfsadm[852]: verbose: removing file: /dev/dsk/c0d1s5devfsadm[852]: verbose: removing file: /dev/dsk/c0d1s6devfsadm[852]: verbose: removing file: /dev/dsk/c0d1s7devfsadm[852]: verbose: removing file: /dev/rdsk/c0d1s0
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
6-52 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
devfsadm[852]: verbose: removing file: /dev/rdsk/c0d1s1devfsadm[852]: verbose: removing file: /dev/rdsk/c0d1s2devfsadm[852]: verbose: removing file: /dev/rdsk/c0d1s3devfsadm[852]: verbose: removing file: /dev/rdsk/c0d1s4devfsadm[852]: verbose: removing file: /dev/rdsk/c0d1s5devfsadm[852]: verbose: removing file: /dev/rdsk/c0d1s6devfsadm[852]: verbose: removing file: /dev/rdsk/c0d1s7
17. Move to the control domain window.
18. Remove virtual disk device zvol from the virtual disk service.
primary# ldm remove-vdiskserverdevice zvol@primary-vds0
19. Verify the configuration change by listing the guest domain ldom1bindings and the control domain services.
primary# ldm list-bindings ldom1NAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIMEldom1 active -n---- 5000 8 2G 0.2% 50m...DISK NAME VOLUME TOUT ID DEVICE SERVERMPGROUP vdisk0 vol0@primary-vds0 0 disk@0 primary...primary# ldm list-services primary...VDS NAME LDOM VOLUME OPTIONS MPGROUP DEVICE primary-vds0 primary vol0 /dev/dsk/c1t1d0s2
20. Run the following commands to destroy the ZFS pool tank1.
primary# zpool destroy -f tank1primary# zfs listno datasets available
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
Managing Advanced Logical Domains Configurations 6-53Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Task 7 – Migrate an Active Guest Domain
In this task you migrate an active guest domain to another system. Youreconfigure the system so that your guest domain can be migrated. Youcreate a bootable Solaris 10 image file and share it with your lab partner’sguest domain. You then perform the migration. Note that you must workwith a lab partner to complete all the steps.
Note – Migrating active guest domains requires planning and preparationto ensure a successful migration. For example, adequate resources mustbe available on the target system. This not only includes resources such asCPUs and memory, but also I/O services, boot environment, and softwareapplications. In production environments, it is highly recommended thatyou use shared storage between the source and target systems of themigration to ensure software consistency. The storage could be a sharedLUN from a SAN or a file from an NFS server.
Perform the following steps to migrate an active guest domain:
1. Verify that you have been assigned a lab partner who is working onanother machine. If you need assistance, contact your instructor.
2. In the control domain window, list the services currently configuredin the primary domain.
primary# ldm list-services primaryVCC NAME LDOM PORT-RANGE primary-vcc0 primary 5000-5100
VSW NAME LDOM MAC NET-DEV ID DEVICE LINKPROP DEFAULT-VLAN-ID PVID VID MTU MODE primary-vsw0 primary 00:14:4f:fa:6a:f8 e1000g0 0 switch@0 1 1 1500
VDS NAME LDOM VOLUME OPTIONS MPGROUP DEVICE primary-vds0 primary vol0 /dev/dsk/c1t1d0s2
3. Run the ldm list-bindings ldom1 command to determine theresources that are currently bound to guest domain ldom1.
primary# ldm list-bindings ldom1NAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIMEldom1 active -n---- 5000 8 2G 0.2% 15h 57m
MAC 00:14:4f:f9:b7:b4
HOSTID 0x84f9b7b4
CONTROL failure-policy=ignore
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
6-54 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
DEPENDENCY master=
VCPU VID PID UTIL STRAND 0 8 0.8% 100% 1 9 0.1% 100% 2 10 0.1% 100% 3 11 0.1% 100% 4 12 0.1% 100% 5 13 0.1% 100% 6 14 0.2% 100% 7 15 0.0% 100%
MEMORY RA PA SIZE 0xe000000 0x8e000000 2G
VARIABLES auto-boot?=false boot-device=vdisk0
IO DEVICE PSEUDONYM OPTIONS pci@500 pci_1
NETWORK NAME SERVICE ID DEVICE MAC MODE PVID VID MTU LINKPROP vnet0 primary-vsw0@primary 0 network@0 00:14:4f:fc:06:05 1 1500
PEER MAC MODE PVID VID MTU LINKPROP primary-vsw0@primary 00:14:4f:fa:61:06 1 1500
DISK NAME VOLUME TOUT ID DEVICE SERVER MPGROUP vdisk0 vol0@primary-vds0 0 disk@0 primary
VCONS NAME SERVICE PORT ldom1 primary-vcc0@primary 5000
Based on the information shown in step 2 and step 3, can guestdomain ldom1 be migrated to another system?
No. Guest domain ldom1 is currently in the active state and it isconfigured as a direct I/O domain. Direct I/O domains cannot be migratedin the active state. In the following steps, you revert the guest domainldom1 to the config_initial configuration you stored on the systemcontroller.
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
Managing Advanced Logical Domains Configurations 6-55Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
4. Set the system controller configuration to config_initial.
primary# ldm set-spconfig config_initialprimary# ldm list-spconfigfactory-defaultconfig_initial [next poweron]config_split
5. Exit to the system controller.
primary# #.Serial console stopped.->
6. In the system controller, change to the /SYS directory and run thereset command.
-> cd /SYS/SYS-> resetAre you sure you want to reset /SYS (y/n)? yPerforming reset on /SYS
Note that the reset command performs a graceful shutdown of the system.The will cause the guest domain window to close. Reopen the guest domainwindow after the system has rebooted.
7. Start the serial console. After the system has booted, log in as root.
-> start /SP/consoleAre you sure you want to start /SP/console (y/n)? ySerial console started. To stop, type #....console login: rootPassword: cangetin...
8. Verify that config_initial is current.
primary# ldm list-spconfigfactory-defaultconfig_initial [current]config_split...
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
6-56 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
9. Generate a long listing of guest domain ldom1.
primary# ldm list-domain -l ldom1NAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIMEldom1 inactive ------ 8 2G...IO DEVICE OPTIONS pci@500...
Note that PCI bus pci@500 is bound to ldom1.
10. Remove PCI bus pci@500 from ldom1.
primary# ldm remove-io pci@500 ldom1
Note – In the following steps, you create an image file to be used as ashared storage during the guest domain migration.
11. Working with your lab partner, designate one of your lab systems asthe source machine and the other as the target machine.
The source machine will contain the bootable image file. The imagefile will then be shared with the target machine using NFS.
12. On the source machine, create an image file. Use NFS to share it withthe target machine.
primary# mkfile 10g /ldoms/images/bootdiskprimary# vi /etc/dfs/dfstab...share -F nfs -o anon=0 /ldom/images...primary# shareall
13. On the source machine, remove the vdisk vdisk0 from ldom1.
primary# ldm remove-vdisk vdisk0 ldom1
14. On the source machine, add the new image file to disk serviceprimary-vds0. Name the new disk vol1.
primary# ldm add-vdsdev /ldoms/images/bootdisk vol1@primary-vds0
15. On the source machine, add the vdisk vdisk0 to ldom1. Use vol1from the disk service.
primary# ldm add-vdisk vdisk0 vol1@primary-vds0 ldom1
16. Bind the configuration to guest domain ldom1.
primary# ldm bind-domain ldom1
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
Managing Advanced Logical Domains Configurations 6-57Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
17. Open a console session on ldom1 and JumpStart the guest domain.
primary# telnet localhost 5000...{0} ok boot vnet0 -v installBoot device: /virtual-devices@100/channel-devices@200/network@0 File andargs: - installRequesting Internet Address for 0:14:4f:fc:6:4Using RARP/BOOTPARAMS...Internet address is: 192.168.6.43hostname: machine4-vnet0domainname: brom.suned.com...
This will take approximately 30 minutes to complete.
18. On the target machine, add the NFS file system to disk serviceprimary-vds0. Name the new disk vol1.
primary# ldm add-vdsdev /net/IP_Addr/ldoms/images/bootdiskvol1@primary-vds0
19. Remove guest domain ldom1 from the target machine.
primary# ldm unbind-domain ldom1primary# ldm remove-domain ldom1primary# ldm list-domainName State Flags Cons VCPU Memory Util Uptimeprimary active -n-cv SP 8 2G 0.2% 36m
20. On the source machine, verify that the JumpStart operation hascompleted.
21. Log in to the guest domain as root and verify that the LogicalDomains dynamic reconfiguration daemon, drd, is running in theguest domain ldom1.
Console login: rootPassword: cangetin...guest# svcs drdonline 11:46:05 svc:/platform/sun4v/drd:default
22. Move back to the control domain on the source machine.
~.
23. Run the ping command to verify communication between thecontrol domains of the source and target machines involved in themigration.
primary# ping <IP_Addr_Target>
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
6-58 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
<IP_Addr_Target> is alive
24. On the source machine, run the ldm migrate -n command toperform a dry run of the migration of the active guest domain ldom1.In the command, specify ldom2 as the new name of the migrateddomain.
This example shows you how to change the name of the guest domain. Ifyou wish to retain the same name, simply omit the target name field.
primary# ldm migrate-domain -n ldom1 root@IP_Addr_Target:ldom2Target Password: cangetinprimary#
The following message is returned when the dynamic reconfigurationdaemon (drd) is not running in the host domain. For guest domains withmore then one virtual CPU, drd must be running.
Migrating a domain with more than one vcpu requires CPUDR, which is not available for LDom ldom1.
If no error messages are returned, the active guest domain migrationshould proceed normally. If errors are indicated, resolve them beforecontinuing on to the next step.
25. Migrate the active guest domain to the target machine. In thecommand, specify ldom2 as the new name of the migrated domain.
primary# ldm migrate-domain ldom1 root@IP_Addr_Target:ldom2Target Password: cangetinprimary#
The migrate can take a couple minutes to complete.
You can check the progress of the migration by running theldm list -o status or ldm list-domain command.
For example, to check migration status on the target machine:
primary# ldm list -o status ldom2NAMEldom2
STATUS OPERATION PROGRESS SOURCE migration 37% ldom01
or
primary# ldm list-domainNAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIMEprimary active -n-cv- SP 8 2G 15% 18h 28mldom2 bound -----t 5000 1 2G
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
Managing Advanced Logical Domains Configurations 6-59Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
26. After the migration is complete, list all available domains on thesource machine.
primary# ldm list-domainNAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIMEprimary active -n-cv- SP 8 2G 0.3% 21m
Note that ldom1 has been destroyed.
27. After the migration is complete, list all available domains on thetarget machine.
primary# ldm list-domainNAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIMEprimary active -n-cv- SP 8 2G 0.3% 20mldom2 active -n---- 5000 8 2G 0.1% 5m
Note that ldom2 is present and in the active state.
28. On the target machine, open a console session on the guest domainand log in as root.
Console login: rootPassword: cangetin...
29. Verify the guest domain ldom2 configuration.
guest# prtdiagSystem Configuration: Sun Microsystems sun4v T5140Memory size: 2048 Megabytes
======================== Virtual CPUs ============================
CPU ID Frequency Implementation Status------ --------- ---------------------- -------0 1165 MHz SUNW,UltraSPARC-T2+ on-line1 1165 MHz SUNW,UltraSPARC-T2+2 1165 MHz SUNW,UltraSPARC-T2+3 1165 MHz SUNW,UltraSPARC-T2+4 1165 MHz SUNW,UltraSPARC-T2+5 1165 MHz SUNW,UltraSPARC-T2+6 1165 MHz SUNW,UltraSPARC-T2+7 1165 MHz SUNW,UltraSPARC-T2+
=========================== IO Devices ===========================Slot + Bus Name + ModelStatus Type Path------------------------------------------------------------------
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
6-60 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
guest# ifconfig -alo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index1 inet 127.0.0.1 netmask ff000000vnet0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2 inet 192.168.XX.43 netmask ffffff00 broadcast 192.168.XX.255 ether 0:14:4f:fc:6:5guest# formatSearching for disks...done
AVAILABLE DISK SELECTIONS: 0. c0d0 <SUN300G cyl 46873 alt 2 hd 20 sec 625> /virtual-devices@100/channel-devices@200/disk@0Specify disk (enter its number): ^D
30. Move back to the control domain.
~.
Note – In the following steps, the guest domain ldom2 will be migratedback to the original machine. The roles of source and target machines isnow reversed.
31. On the source machine (old target machine), run the ldm migrate -n command to perform a dry run of the migration of active guestdomain ldom2. In the command, specify ldom1 as the new name ofthe migrated domain.
primary# ldm migrate-domain -n ldom2 root@IP_Addr_Target:ldom1Target Password: cangetinprimary#
If no error messages are returned, the active guest domain migrationshould proceed normally. If errors are indicated, resolve them beforecontinuing on to the next step.
32. Migrate the active guest domain ldom2 to the target machine (oldsource machine). In the command, specify ldom1 as the new name ofthe migrated domain.
primary# ldm migrate-domain ldom2 root@IP_Addr_Target:ldom1Target Password: cangetinprimary#
The migrate can take a couple minutes to complete.
You can check the progress of the migration by running theldm list -o status or ldm list-domain command.
For example, to check migration status on the target machine:
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
Managing Advanced Logical Domains Configurations 6-61Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
primary# ldm list -o status ldom1NAMEldom1
STATUS OPERATION PROGRESS SOURCE migration 43% ldom02
or
primary# ldm list-domainNAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIMEprimary active -n-cv- SP 8 2G 15% 22h 44mldom1 bound -----t 5000 1 2G
33. After the migration is complete, list all available domains on thesource machine.
primary# ldm list-domainNAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIMEprimary active -n-cv- SP 8 2G 0.3% 43m
Note that ldom2 has been destroyed.
34. After the migration is complete, list all available domains on thetarget machine.
primary# ldm list-domainNAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIMEprimary active -n-cv- SP 8 2G 0.3% 39mldom1 active -n---- 5000 8 2G 0.1% 3m
Note that ldom1 is present and in the active state.
35. On the target machine, move to guest domain and log in as root.
primary# telnet localhost 5000...Console login: rootPassword: cangetin...
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
6-62 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
36. Verify the guest domain ldom1 configuration.
guest# prtdiagSystem Configuration: Sun Microsystems sun4v T5140Memory size: 2048 Megabytes
======================== Virtual CPUs ============================
CPU ID Frequency Implementation Status------ --------- ---------------------- -------0 1165 MHz SUNW,UltraSPARC-T2+ on-line1 1165 MHz SUNW,UltraSPARC-T2+2 1165 MHz SUNW,UltraSPARC-T2+3 1165 MHz SUNW,UltraSPARC-T2+4 1165 MHz SUNW,UltraSPARC-T2+5 1165 MHz SUNW,UltraSPARC-T2+6 1165 MHz SUNW,UltraSPARC-T2+7 1165 MHz SUNW,UltraSPARC-T2+
=========================== IO Devices ===========================Slot + Bus Name + ModelStatus Type Path------------------------------------------------------------------guest# ifconfig -alo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index1 inet 127.0.0.1 netmask ff000000vnet0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2 inet 192.168.XX.43 netmask ffffff00 broadcast 192.168.XX.255 ether 0:14:4f:fc:6:5guest# formatSearching for disks...done
AVAILABLE DISK SELECTIONS: 0. c0d0 <SUN300G cyl 46873 alt 2 hd 20 sec 625> /virtual-devices@100/channel-devices@200/disk@0Specify disk (enter its number): ^D
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
Managing Advanced Logical Domains Configurations 6-63Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Task 8 – Reset the System to the Factory DefaultConfiguration
In this task you remove the guest domain ldom1 and reset the primarydomain back to the factory default configuration. Then you remove theuser-defined configuration files stored on the system controller.
Note – The guest domain ldom1 might already be removed from yourserver as a result of the previous lab.
Perform the following steps:
1. Move to the control domain window.
2. List the available domains on your machine. If a guest domain exists,proceed to step 3. If there are no guest domains, proceed to step 4.
primary# ldm list-domainNAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIMEprimary active -n-cv- SP 8 2G 0.2% 22h 49mldom1 active -n---- 5000 8 2G 8.2% 14m
In this example, the guest domain ldom1 exists.
3. Remove guest domain ldom1.
primary# ldm stop-domain ldom1LDom ldom1 stoppedprimary# ldm unbind-domain ldom1primary# ldm remove-domain ldom1
4. List the logical domains currently configured on the system.
primary# ldm list-domainName State Flags Cons VCPU Memory Util Uptimeprimary active -t-cv SP 8 2G 0.2% 25m
5. List the logical domain configuration files stored on the systemcontroller.
primary# ldm list-spconfigfactory-defaultconfig_initial [next poweron]config_split
6. Set the next logical domain configuration to factory-default.
primary# ldm set-spconfig factory-default
7. Disable the vntsd service.
primary# svcadm disable vntsd
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
6-64 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
8. Move the interface configuration file to the original interface name.
primary# mv /etc/hostname.vsw0 /etc/hostname.nxge0
9. Move to the system controller.
primary# #.Serial console stopped.
->
10. In the system controller, change to the /SYS directory and run thereset command.
-> cd /SYS/SYS-> resetAre you sure you want to reset /SYS (y/n)? y
Performing reset on /SYS
11. Start the serial console. After the system has booted, log in as root.
-> start /SP/consoleAre you sure you want to start /SP/console (y/n)? ySerial console started. To stop, type #....console login: rootPassword: cangetin...
12. List the logical domain configuration files stored on the systemcontroller.
primary# ldm list-configfactory-default [current]config_initialconfig_split
Note that the factory-default configuration is the currentconfiguration.
13. Remove all the user-defined configuration files stored on the systemcontroller.
primary# ldm remove-config config_initialprimary# ldm remove-config config_split
14. List the logical domain configuration files stored on the systemcontroller.
primary# ldm list-configfactory-default [current]
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
Managing Advanced Logical Domains Configurations 6-65Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
15. Generate a long list of the primary domain to verify that it hasreturned to the factory default state.
primary# ldm list-domain -l primaryNAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIMEprimary active -n-c-- SP 64 7968M 0.1% 3m
SOFTSTATESolaris running
MAC 00:14:4f:46:3e:4e
HOSTID 0x84463e4e
CONTROL failure-policy=ignore
DEPENDENCY master=
VCPU VID PID UTIL STRAND 0 0 0.5% 100% 1 1 0.0% 100% 2 2 0.0% 100% 3 3 0.1% 100% 4 4 0.1% 100% 5 5 0.0% 100% 6 6 0.0% 100% 7 7 0.0% 100% 8 8 0.0% 100% 9 9 0.0% 100% 10 10 0.0% 100% 11 11 0.0% 100% 12 12 0.0% 100% 13 13 0.0% 100% 14 14 0.0% 100% 15 15 0.0% 100% 16 16 0.0% 100% 17 17 0.0% 100% 18 18 0.0% 100% 19 19 0.1% 100% 20 20 0.0% 100% 21 21 0.0% 100% 22 22 0.0% 100%
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
6-66 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
23 23 0.0% 100% 24 24 0.2% 100% 25 25 0.0% 100% 26 26 0.0% 100% 27 27 0.0% 100% 28 28 0.2% 100% 29 29 0.0% 100% 30 30 0.0% 100% 31 31 0.0% 100% 64 64 0.1% 100% 65 65 0.1% 100% 66 66 0.0% 100% 67 67 0.0% 100% 68 68 0.0% 100% 69 69 0.0% 100% 70 70 0.0% 100% 71 71 0.0% 100% 72 72 0.0% 100% 73 73 0.0% 100% 74 74 0.0% 100% 75 75 0.0% 100% 76 76 0.0% 100% 77 77 0.0% 100% 78 78 0.0% 100% 79 79 0.0% 100% 80 80 0.0% 100% 81 81 0.0% 100% 82 82 0.0% 100% 83 83 0.7% 100% 84 84 0.0% 100% 85 85 0.0% 100% 86 86 0.0% 100% 87 87 0.0% 100% 88 88 2.9% 100% 89 89 0.0% 100% 90 90 0.0% 100% 91 91 0.0% 100% 92 92 0.0% 100% 93 93 0.0% 100% 94 94 0.0% 100% 95 95 0.0% 100%
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
Managing Advanced Logical Domains Configurations 6-67Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
MAU ID CPUSET 0 (0, 1, 2, 3, 4, 5, 6, 7) 1 (8, 9, 10, 11, 12, 13, 14, 15) 2 (16, 17, 18, 19, 20, 21, 22, 23) 3 (24, 25, 26, 27, 28, 29, 30, 31) 4 (64, 65, 66, 67, 68, 69, 70, 71) 5 (72, 73, 74, 75, 76, 77, 78, 79) 6 (80, 81, 82, 83, 84, 85, 86, 87) 7 (88, 89, 90, 91, 92, 93, 94, 95)
MEMORY RA PA SIZE 0xe000000 0xe000000 7968M
IO DEVICE PSEUDONYM OPTIONS pci@400 pci_0 pci@500 pci_1
VCONS NAME SERVICE PORT SP
Lab Exercise Summary
?!
Discussion – Take a few minutes to discuss the experiences, issues, ordiscoveries you had during the lab exercise.
● Experiences
● Interpretations
● Conclusions
● ApplicationsO
racl
e U
nive
rsity
and
BO
S-it
Gm
bH &
Co.
KG u
se o
nly
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED
Applying What You Have Learned – Lab Exercise
6-68 Sun Virtualization: Solaris™ 10 Logical Domains AdministrationCopyright 2010 Sun Microsystems, Inc. All Rights Reserved. Sun Learning Services, Revision B
Notes:
Ora
cle
Uni
vers
ity a
nd B
OS-
it G
mbH
& C
o.KG
use
onl
y
THES
E eK
IT M
ATER
IALS
AR
E FO
R Y
OU
R U
SE IN
TH
IS C
LASS
RO
OM
ON
LY.
CO
PYIN
G e
KIT
MAT
ERIA
LS F
RO
M T
HIS
CO
MPU
TER
IS S
TRIC
TLY
PRO
HIB
ITED