LDOM.CONF(5)

NAME
ldom.conf - Logical Domain configuration

DESCRIPTION
ldom.conf is the configuration file to configure logical domains.

Domains are defined in the following format:

domain name {...}
    Declare a scope for resources assigned to the specified domain. The scope must be opened and closed with curly braces and contains one or more of the following keywords, each on a separate line. A scope with name “primary” configures resources for the primary domain. If no configuration for the primary domain exists, it is assigned all CPU and memory resources not used by any guest domains.

vcpu number[:stride]
    Declare the number of virtual CPUs assigned to a domain. Optionally a stride can be specified to allocate stride VCPUs at a time but assign only number VCPUs to the domain. This can be used to distribute virtual CPUs over the available CPU cores.

memory bytes
    Declare the amount of memory assigned to a domain, in bytes. bytes can be specified with a human-readable scale, using the format described in scan_scaled(3), e.g. 512M.

iodevice device
    Assign the specified PCIe device to the guest domain. device may be either a device path (/@400/@2/@0/@8) or a pseudonym (/SYS/MB/PCIE0). This keyword can be used multiple times.

variable name=value
    Set the specified NVRAM variable for the domain. See eeprom(8) for a list of OpenPROM variables. This keyword can be used multiple times.

vdisk file [keyword=value ...]
    The specified file is used to back a virtual disk of the guest domain. file can be a block device node or a disk image file created with the create-vdisk command. This keyword can be used multiple times. Unless boot-device is set with the variable command, the first disk will be the default boot device. Valid options are:

    devalias=name
        Alias the virtual disk as name.

vnet [keyword=value ...]
    Assign a vnet(4) network interface to the guest domain. This keyword can be used multiple times. Valid options are:

    mac-addr=address
        Configure the MAC address of the interface.

    mtu=number
        Configure the MTU of the interface.

    devalias=name
        Alias the interface as name.

EXAMPLES
Define a domain with 12 virtual cores, 4GB memory, two file based virtual disks and one virtual network interface:

    domain "puffy" {
    	vcpu 12
    	memory 4G
    	vdisk "/home/puffy/vdisk0"
    	vdisk "/home/puffy/vdisk1"
    	vnet
    }

Define another one with slightly less resources:

    domain "salmah" {
    	vcpu 8
    	memory 2G
    	vdisk "/home/salmah/vdisk0"
    	vdisk "/home/salmah/vdisk1"
    	vnet
    }

On a machine with 32 cores and 64GB physical memory, this leaves 12 cores and 58GB memory to the primary domain.

Use a stride step size to distribute VCPUs:

    domain "marlus" {
    	vcpu 2:4
    	memory 4G
    	vdisk "/home/marlus/vdisk0"
    }

On a machine with eight threads per physical core, this allocates two strides of four VCPUs each for the guest domain but assigns only two VCPUs to it, i.e. makes it occupy an entire physical core while running on two threads only.

SEE ALSO
eeprom(8), ldomctl(8), ldomd(8)

BUGS
The hypervisor requires a machine dependent amount of physical memory that is reserved automatically. Although the Physical Resource Inventory (PRI) seems to account for this by presenting less available memory, using the entire amount via memory is not always successful, e.g. the hypervisor would reject the configuration and fallback to “factory-default” upon resetting the machine.

If in doubt, assign memory to the “primary” domain explicitly, such that enough memory remains unused for the hypervisor to reserve. On T4 based machines, 1024 megabytes has proven to suffice.