Solaris 11 for SPARC, as well as previous versions of Solaris, include a neat little technology called Logical Domains (which has been rebranded as Oracle VM for SPARC). Logical Domains are implemented in the SPARC processor.
This series is going to focus on the basic administration of a Logical Domains environment using the basic command line tools of the Solaris 11 Operating System. In Part One we will go over what it takes to configure a Solaris 11 installation to be a Logical Domains hypervisor. In Part Two we will document defining and configuring Logical Domains. In Part Three we will discuss connecting to the Logical Domain in order to perform an installation of the operating system.
A little bit about my environment. I am using a Oracle Sun SPARC T4-1 which has a single socket eight-core 2.85GHz SPARC T4 Processor. Each processor core on this model has 8 threads, giving us a total of 64 processor threads. Lets take a look at our environment shall we?
Check Operating System Version
This is the released version of Solaris 11 for SPARC, which of course means it can only be used on the SPARC processor architecture.
root@t4:~# uname -a<br /> SunOS t4 5.11 11.0 sun4v sparc sun4v
View Logical Domains Software Version
The release version of Solaris 11 for SPARC comes with Logical Domains 2.1. If you have purchased support and configured access to the repositories then pkg update will give you access to Logical Domains 2.2.
root@t4:~# ldm -V</p> <p>Logical Domains Manager (v 184.108.40.206)<br /> Hypervisor control protocol v 1.7<br /> Using Hypervisor MD v 1.3</p> <p>System PROM:<br /> Hostconfig v. 1.1.1 @(#)Hostconfig 1.1.1 2011/08/03 23:04<br /> Hypervisor v. 1.10.1. @(#)Hypervisor 1.10.1.b 2011/09/12 09:56<br /> OpenBoot v. 4.33.1 @(#)OpenBoot 4.33.1 2011/08/03 10:34
View Existing Logical Domains
Here we see the specifics of our physical machine. The primary domain has all of the resources and before we will be able to allocate resources to other Logical domains we will need to remove some from the primary domain.
root@t4:~# ldm list<br /> NAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIME<br /> primary active -n-c-- UART 64 32256M 0.0% 4d 23h 30m
Create Services for Control Domain
Here we are creating the Virtual Console Concentrator service. This is what allows us to connect to the console of the domains for installation and reconfiguration.
root@t4:~# ldm add-vcc port-range=5000-5100 primary-vcc0 primary
This is the Virtual Disk Server service. This is used to hand out disk devices to the domains.
root@t4:~# ldm add-vds primary-vds0 primary
This is the Virtual Switch service. It provides networking to the domains.
root@t4:~# ldm add-vsw net-dev=net0 primary-vsw0 primary
Lets review our changes.
root@t4:~# ldm list-services primary<br /> VCC<br /> NAME LDOM PORT-RANGE<br /> primary-vcc0 primary 5000-5100</p> <p>VSW<br /> NAME LDOM MAC NET-DEV ID DEVICE LINKPROP DEFAULT-VLAN-ID PVID VID MTU MODE INTER-VNET-LINK<br /> primary-vsw0 primary 00:14:4f:fb:bd:bd net0 0 switch@0 1 1 1500 on</p> <p>VDS<br /> NAME LDOM VOLUME OPTIONS MPGROUP DEVICE<br /> primary-vds0 primary
Configure the Control Domain
Look at the existing domains. By default we have primary, which is essentially the host operating system.
root@t4:~# ldm list<br /> NAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIME<br /> primary active -n-c-- UART 64 32256M 0.0% 5d 53m
Reduce the number of vCPU available to the control domain.
root@t4:~# ldm set-vcpu 4 primary
Reduce the amount of RAM available to the control domain.
root@t4:~# ldm set-memory 4G primary
Reconfigure primary domain to reflect changes.
root@t4:~# ldm start-reconf primary<br /> Initiating a delayed reconfiguration operation on the primary domain.<br /> All configuration changes for other domains are disabled until the primary<br /> domain reboots, at which time the new configuration for the primary domain<br /> will also take effect.
Create alternate configuration file.
root@t4:~# ldm add-config primary-config<br /> root@t4:~# ldm list-config<br /> factory-default<br /> primary-config [current]
Enable the Virtual Network Terminal Server Daemon.
root@t4:~# svcadm enable vntsd<br /> root@t4:~# svcs | grep vntsd<br /> online 16:40:01 svc:/ldoms/vntsd:default
After a reboot, the primary domain reflects the new memory and vCPU configuration.
root@t4:~# ldm list<br /> NAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIME<br /> primary active -n-cv- UART 4 4G 0.4% 1h 4m<br />
Create Install Media Repository
Create a ZFS file system to hold the iso files. The -p will create the parent file system /rpool/ldoms as well.
root@t4:~# zfs create -p rpool/ldoms/iso
Add the Solaris 11 and Solaris 10 iso files to the Virtual Disk Server service.
root@t4:~# ldm add-vdsdev /rpool/ldoms/iso/oracle-solaris-11-11.11-sparc.iso solaris11_media@primary-vds0<br /> root@t4:~# ldm add-vdsdev /rpool/ldoms/iso/oracle-solaris-10-8.11-sparc.iso solaris10_media@primary-vds0
Now we have a working environments to support the Logical Domains that we will be adding tomorrow in part two.