[OpenBSD]

Manual Page Search Parameters
LDOMCTL(8) System Manager's Manual (sparc64) LDOMCTL(8)

NAME

ldomctlLogical Domain management interface

SYNOPSIS

ldomctl command [argument ...]

DESCRIPTION

The ldomctl program is used to manage logical domains on sun4v systems. It can be used to assign resources to the primary and guest domains, start and stop guest domains from the primary domain, and to display information about domains running on the system.
The following commands are available:
 
 
delete configuration
Delete the specified configuration from non-volatile storage.
 
 
download directory
Save a logical domain configuration to non-volatile storage on the service processor. The configuration will take effect after the primary domain is rebooted. The name of the configuration is taken from the name of the directory which must contain files created with the init-system command. The download is aborted if a configuration with the same name already exists.
 
 
dump
Dump the current configuration from non-volatile storage into the current working directory.
 
 
init-system file
Generates files describing a logical domain configuration. The generated files are written to the current working directory. The provided file describes resources assigned to logical domains in a plain text format with the following syntax:
 
 
domain name { resource ... }
Declares 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
Declares the number of virtual CPUs assigned to a domain.
 
 
memory number[unit]
Declares the amount of memory assigned to a domain, in bytes. Optionally, the units 'K', 'M', or 'G', for kilo-, mega-, and gigabytes can be used.
 
 
vdisk file
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 dd(1). This keyword can be used multiple times.
 
 
vnet [{ keyword value ... }]
Assign a vnet(4) network interface to the guest domain. This keyword can be used multiple times. The curly braces are optional and can contain the following keywords:
 
 
mac-addr address
Configures the MAC address of the interface.
 
 
mtu number
Configures the MTU of the interface.
 
 
list
List configurations stored in non-volatile storage. Indicate the currently running configuration, and the configuration which will be used next (after rebooting the primary domain) if it differs from the currently running one.
 
 
panic domain
Panic a guest domain. The exact behaviour of this command depends on the OS running in the domain. For OpenBSD the default behaviour is to enter ddb(4).
 
 
select configuration
Select the next logical domain configuration to use (after rebooting the primary domain).
 
 
start domain
Start a guest domain.
 
 
status [domain]
Display status information for domain, or for all domains running on the system.
 
 
stop domain
Stop a guest domain.

EXAMPLES

A system using factory defaults has a single "factory-default" configuration:
# ldomctl list 
factory-default [current]
Create a new configuration based on the defaults:
# mkdir factory-default 
# cd factory-default 
# ldomctl dump 
# cd .. 
# cp -R factory-default openbsd 
# cd openbsd
A file describing the desired configuration must be created:
# cat ldom.conf 
domain puffy { 
	vcpu 12 
	memory 4G 
	vdisk "/home/puffy/vdisk0" 
	vdisk "/home/puffy/vdisk1" 
	vnet 
} 
 
domain salmah { 
	vcpu 8 
	memory 2G 
	vdisk "/home/salmah/vdisk0" 
	vdisk "/home/salmah/vdisk1" 
	vnet 
}
Generate a set of configuration files and download to non-volatile storage. If a configuration with the same name already exists, it must be removed first:
# ldomctl init-system ldom.conf 
# cd .. 
# ldomctl delete openbsd 
# ldomctl download openbsd 
# ldomctl list 
factory-default [current] 
openbsd [next]
Create a virtual disk image for each guest domain:
# dd if=/dev/zero of=/home/puffy/vdisk0 bs=1m count=8192 
# dd if=/dev/zero of=/home/salmah/vdisk0 bs=1m count=8192
The minirootfs install media can be used to boot guest domains:
# cp miniroot56.fs /home/puffy/vdisk1 
# cp miniroot56.fs /home/salmah/vdisk1
Enable ldomd(8) by adding the following to /etc/rc.conf.local:
ldomd_flags=
Halt the primary domain and reset the machine from ALOM:
# halt 
sc> reset -c
The machine will now reset and boot into the new configuration. The primary domain should have less CPUs and memory, since they are now assigned to the guest domains:
# ldomctl status 
primary      running      OpenBSD running                   1% 
puffy        running      OpenBoot Primary Boot Loader      8% 
salmah       running      OpenBoot Primary Boot Loader     12%
Configure the vnet(4) interfaces for the guest domains. This example bridges guest domains into the physical network:
# ifconfig vnet0 -inet6 up 
# ifconfig vnet1 -inet6 up 
# ifconfig bridge0 create 
# ifconfig bridge0 add em0 add vnet0 add vnet1 up
Access the console of the first domain and boot it:
# cu -l ttyV0 
ok boot disk1

SEE ALSO

dd(1), ddb(4), vnet(4), ldomd(8)

HISTORY

The ldomctl program first appeared in OpenBSD 5.3.

AUTHORS

The ldomctl program was written by Mark Kettenis <kettenis@openbsd.org>.
January 26, 2017 OpenBSD-current