LDOM.CONF(5) | File Formats Manual (sparc64) | LDOM.CONF(5) |
ldom.conf
—
Logical Domain configuration
ldom.conf
is the configuration file to
configure logical domains.
Domains are defined in the following format:
domain
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]memory
bytesiodevice
pathvariable
name=valuevdisk
file
[keyword=value ...]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
=namevnet
[keyword=value ...]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.
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.
November 6, 2020 | OpenBSD-current |