Solaris LDOM overview

A simple posts giving a brief overview on the Solaris LDOM hardware virtualisation.

Within the Solaris Operating environment there are two concepts of virtualisation:

  1. Zones — Solaris Operating System based virtualisation
  2. LDOMs — Hardware level virtualisation

We will not discuss Zones in the article but simply give a brief overview abour LDOMs

Logical Domains (LDOMs)

  • LDOMs are also called as Oracle VM for SPARC. LDOMs can be created on High End servers like the T and M series of systems.
  • Before splitting a high end server into LDOMs we need Primary Domains (aka PDOMs). A server like the M5 can have maximum of 4 PDOMS. However, the entire hardware on the server can also be a single PDOM
  • For every PDOM we need a Control Domain that controls all the hardware resources for every guest domain
  • Each PDOM can be created as a control domain itself or we can make a Control and I/O Domain.
  • Every LDOM is a full virtual machine that runs an independent operating system instance.

The following table outlines the different domains that can be created on a PDOM:

Table 1 — PDOM domains
Domain TypeDescription
Control Domain The Control domain, as its name implies, controls the logical domain environment. It is used to configure machine resources and guest domains, and provides services necessary for domain operation, such as virtual console service. The control domain also normally acts as a service domain.
Service Domains Service domains present virtual services, such as virtual disk drives and network switches, to other domains.
I/O Domains The I/O domains have direct ownership of a PCI bus and direct access to physical I/O devices, such as a network card in a PCI controller.
Root Domains Root domains have direct ownership of PCIe "root complex" and all associated PCIe slots. This can be used to grant access to physical I/O devices. A root domain is also an I/O domain.
Guest Domains The Guest domains run an operating system instance without performing any of the above roles, but leverage the services provided by the above in order to run applications.
NOTE: Control and Service functions can be combined within domains. However, it is recommended that user applications not run within control or service domains in order to protect domain stability and performance.

It is better to create both Control and I/O Domains individually, so that we can achieve redundancy while LDOMs are accessing the hardware resources.

In order to manage LDOMs we need to install the Logical Domain Manager software in the Contorl domain giving the sysadmin access to the ldm commands.

Each LDOM will have one of three states:

  1. INACTIVE — state achieved by an LDOM immediately after creating it.
    # ldm add-domain ldom
  2. BOUND — state achieved by an LDOM when we bind it.
    # ldm bind-domain ldom
  3. ACTIVE — state achieved by an LDOM when we start the domain
    # ldm start-domain ldom

For example:

  • To perform any action related to adding, removing resources from an LDOM we need to bring that particular domain either to BOUND or INACTIVE state.
  • We can bring back a ACTIVE domain to BOUND state by giving the stop-domain sub-command. For example:
    # ldm stop-domain ldom
  • We can bring back a BOUND domain to INACTIVE state by giving the unbind sub-command. For example:
    # ldm unbind-domain ldom

ldm commands

The following table lists basic ldm commands needed whilst creating an LDOM:

Table 2 — Basic ldm commands
CommandComments
ldm list List all LDOMs
ldm add-domain <ldom> Add a new LDOM
ldm remove-domain <ldom> Remove a particular LDOM
ldm add-vcpu <number> <ldom> Add virtual cpu's to an LDOM
ldm remove-vcpu <number> <ldom> Remove virtual cpu's from a LDOM
ldm add-memory <size><unit> <ldom> Add memory to an LDOM
ldm remove-memory <size><unit> <ldom> Remove memory from a LDOM
ldm add-vsw <vswitch-name> <ldom> Add virtual switch from a ldom
ldm remove-vsw <vswitch-name> <ldom> Remove virtual switch from a ldom
ldm add-vnet <vnetname> <vsw=vswitch-name> <ldom> Add virtual net from a ldom
ldm remove-vnet <vnetname> <ldom> Remove virtual net from a ldom
ldm add-vds <service-name> <ldom> Add virtual disk service
ldm remove-vds <service-name> <ldom> Remove virtual disk service
ldm add-vdsdev <devname> <volume-name@service-name>
Add a device to vds
ldm remove-vdsdev <volume-name@service-name>
Remove a device from vds
ldm add-vdisk <disk-name> <volume-name@service-name> <ldom> Add a disk from vds to ldom
ldm remove-vdisk <disk-name> <ldom> Remove a disk of vds from ldom

The following table lists additional frequently used ldm commands:

Table 3 — Additional ldm commands
CommentsCommand
Start/Stop an LDOM ldm start-domain ldom
ldm stop-domain ldom
Bind/Unbind an LDOM ldm bind-domain ldom
ldm unbind-domain ldom
List LDOM resources ldm list-bindings ldom
ldm list-devices ldom
ldm list-services ldom