summaryrefslogtreecommitdiff
path: root/usr.sbin/ldomctl/ldom.conf.5
blob: daf4f1145d547dfadcdd97f07d7fdaf5f65602c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
.\" $OpenBSD: ldom.conf.5,v 1.9 2019/12/03 21:07:03 kn Exp $
.\"
.\" Copyright (c) 2012 Mark Kettenis <kettenis@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: December 3 2019 $
.Dt LDOM.CONF 5 sparc64
.Os
.Sh NAME
.Nm ldom.conf
.Nd Logical Domain configuration
.Sh DESCRIPTION
.Nm
is the configuration file to configure logical domains.
.Pp
Domains are defined in the following format:
.Bl -tag -width Ds
.It Ic domain Ar name Brq ...
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
.Ar name
.Cm 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.
.It Ic vcpu Ar number Ns Op : Ns Ar 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.
.It Ic memory Ar bytes
Declare the amount of memory assigned to a domain, in bytes.
.Ar bytes
can be specified with a human-readable scale, using the format described in
.Xr scan_scaled 3 ,
e.g. 512M.
.It Ic iodevice Ar path
Assign the specified PCIe device to the guest domain.
This keyword can be used multiple times.
.It Ic variable Ar name Ns = Ns Ar value
Set the specified NVRAM variable for the domain.
See
.Xr eeprom 8
for a list of OpenPROM variables.
This keyword can be used multiple times.
.It Ic vdisk Ar file
The specified file is used to back a virtual disk of the guest
domain.
.Ar file
can be a block device node or a disk image file created with the
.Cm create-vdisk
command.
This keyword can be used multiple times.
.It Ic vnet Op Brq Ar keyword Ns = Ns Ar value ...
Assign a
.Xr 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:
.Bl -tag -width Ds
.It Ic mac-addr Ns = Ns Ar address
Configure the MAC address of the interface.
.It Ic mtu Ns = Ns Ar number
Configure the MTU of the interface.
.El
.El
.Sh EXAMPLES
Define a domain with 12 virtual cores, 4GB memory, two file based virtual disks
and one virtual network interface:
.Bd -literal -offset indent
domain "puffy" {
	vcpu 12
	memory 4G
	vdisk "/home/puffy/vdisk0"
	vdisk "/home/puffy/vdisk1"
	vnet
}
.Ed
.Pp
Define another one with slightly less resources:
.Bd -literal -offset indent
domain "salmah" {
	vcpu 8
	memory 2G
	vdisk "/home/salmah/vdisk0"
	vdisk "/home/salmah/vdisk1"
	vnet
}
.Ed
.Pp
On a machine with 32 cores and 64GB physical memory, this leaves 12 cores and
58GB memory to the primary domain.
.Sh SEE ALSO
.Xr eeprom 8 ,
.Xr ldomctl 8 ,
.Xr ldomd 8