OpenBSD manual page server

Manual Page Search Parameters

LDOM.CONF(5) File Formats Manual (sparc64) LDOM.CONF(5)

ldom.confLogical Domain configuration

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

Domains are defined in the following format:

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.
number[:stride]
Declare the number of virtual CPUs assigned to a domain. Optionally a stride can be specified to allocate additional virtual CPUs but not assign them to a domain. This can be used to distribute virtual CPUs over the available CPU cores.
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.
path
Assign the specified PCIe device to the guest domain. This keyword can be used multiple times.
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.
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:
=name
Alias the virtual disk as name.
[keyword=value ...]
Assign a vnet(4) network interface to the guest domain. This keyword can be used multiple times. Valid options are:
=address
Configure the MAC address of the interface.
=number
Configure the MTU of the interface.
=name
Alias the interface as name.

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.

eeprom(8), ldomctl(8), ldomd(8)

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, leave enough memory unused for the hypervisor to reserve. On bigger T4 based machines, 1024 megabytes has proven to suffice.

September 14, 2020 OpenBSD-current