Solaris · LDOMs – Configuring I/O & Service Domains

Solaris SPARC · LDOMs · I/O

Configuring I/O & Service Domains

I/O domains own physical PCI buses. Service domains provide virtual disks and networks to guest domains. In many installations, the primary domain is both, but for high availability you can split the roles across multiple domains.

I/O domain vs service domain – quick recap

I/O domain

Owns physical PCI root complexes and HBAs; has direct hardware access.

Service domain

Exports virtual disks (vds) and networks (vsw) to guests using physical devices from I/O domain.

Common layouts

  • Small setups: primary = control + service + I/O.
  • HA setups: dedicated I/O/service domains for redundancy.

Basic I/O and service domain configuration – examples

1. Assign a PCIe root complex to an I/O domain

Example: move a PCI nexus from primary to io-domain.

terminal — io domain
ldoms-lab
# List PCI root complexes
[root@primary ~]# ldm list-io
 
NAME TYPE BUS DOMAIN
pci_0 BUS pci@500 primary
pci_1 BUS pci@600 primary
 
# Create I/O domain
[root@primary ~]# ldm add-domain io-domain1
 
# Assign pci_1 to io-domain1
[root@primary ~]# ldm set-io pci_1 io-domain1
 
# Set resources
[root@primary ~]# ldm set-vcpu 4 io-domain1
[root@primary ~]# ldm set-memory 8G io-domain1
 
[root@primary ~]# ldm bind io-domain1
[root@primary ~]# ldm start io-domain1

2. Create virtual disk service on service domain

vds provides virtual disks to guests.

terminal — io domain
ldoms-lab
# On primary or dedicated service domain:
[root@primary ~]# ldm add-vds primary-vds0 primary
 
# Add backend device to vds
[root@primary ~]# ldm add-vdsdev /dev/zvol/dsk/rpool/ldoms/ldg1-root ldg1-root@primary-vds0
 
# Add vdisk to guest
[root@primary ~]# ldm add-vdisk vdisk0 ldg1-root@primary-vds0 ldg1

3. Create virtual switch on I/O/service domain

vsw bridges physical NIC to virtual NICs.

terminal — io domain
ldoms-lab
# Create vsw on net0
[root@primary ~]# ldm add-vsw net-dev=net0 primary-vsw0 primary
 
# Add vnet to guest
[root@primary ~]# ldm add-vnet vnet0 primary-vsw0 ldg1