LDOMCTL(8) | System Manager's Manual (sparc64) | LDOMCTL(8)

# NAME

`ldomctl` — Logical 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:

`create-vdisk` `-s` size file
  Create a virtual disk image with the specified file path and size, in bytes. size can be specified with a human-readable scale, using the format described in scan_scaled(3), e.g. 512M.
`console` domain
  Using cu(1) connect to the console of the guest domain.
`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 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. Depending on the firmware, the new configuration must be activated explicitly using the `select` command.
`dump`
  Dump the current configuration from non-volatile storage into the current working directory.
`init-system` [`-n`] file
  Generate files in the current working directory for a logical domain configuration file as described in ldom.conf(5).
  `-n`
    Configtest mode. Only check the configuration file for validity.
`list`
  List configurations stored in non-volatile storage. Indicate the currently running configuration, and the configuration which will be used next (after resetting the machine) if it differs from the currently running one.
`list-io`
  List available PCIe devices for the configuration in the current directory.
`panic` [`-c`] 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).
  `-c`
    Automatically connect to the guest console.
`select` configuration
  Select the next logical domain configuration to use (after resetting the machine).
`start` [`-c`] domain
  Start a guest domain.
  `-c`
    Automatically connect to the guest console.
`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 - see ldom.conf(5).

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:

    # ldomctl create-vdisk -s 8G /home/puffy/vdisk0
    # ldomctl create-vdisk -s 8G /home/salmah/vdisk0

The minirootfs install media can be used to boot guest domains:

    # cp miniroot67.img /home/puffy/vdisk1
    # cp miniroot67.img /home/salmah/vdisk1

To have `ldomctl` enabled at boot time, use “rcctl enable ldomd”, which sets

`ldomd_flags=""`

in rc.conf.local(8).

Halt the primary domain and reset the hardware:

    # halt
    sc> reset -c	# ALOM
    -> reset /SYS	# ILOM

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       ttyV0     running     OpenBoot Primary Boot Loader   8%
    salmah      ttyV1     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 up
    # ifconfig vnet1 up
    # ifconfig bridge0 create
    # ifconfig bridge0 add em0 add vnet0 add vnet1 up

Access the console of the first domain and boot it:

    # ldomctl console puffy
    Connected to /dev/ttyV0 (speed 9600)
    {0} ok boot disk1

# SEE ALSO

dd(1), ddb(4), vnet(4), ldom.conf(5), ldomd(8)

# HISTORY

The `ldomctl` program first appeared in OpenBSD 5.3.

# AUTHORS

The `ldomctl` program was written by Mark Kettenis <kettenis@openbsd.org>.

November 17, 2021 | Debian