summaryrefslogtreecommitdiff
path: root/usr.sbin/ldomctl
AgeCommit message (Collapse)Author
2020-03-07Initialise only the components list for "list-io"kn
Nothing else is needed and pri_init() actually writes to the PRI file whereas pri_init_components() only reads (as expected in this code path). This allows listing IO devices from PRI files that are read-only; I noticed this by having the "factory-default" configuration protected with the system immutable flag "schg", see chflags(1).
2020-02-21Support devaliases for vnetkn
vnet devalias=netboot Creates a device alias to be used in OBP: {ok} boot netboot This helps navigating inside guests without remembering device paths or rather their order as specified in the config. OK kettenis
2020-02-21Actually pass devalias from parser to configkn
Missed in previous commit; no breakage, the resulting MD would simply end up without user defined device aliases.
2020-02-20Support devaliases for vdiskkn
vdisk "/var/ldom/miniroot.fs" devalias=miniroot Creates a device alias to be used in OBP: {ok} devlias miniroot /virutal-devices@100/... This helps navigating inside guests without remembering device paths or rather their order as specified in the config. OK kettenis
2020-02-20vnet does not take curly braceskn
The manual lies and all options ought to be provided space separated, on the same line as the vnet keyword. OK kettenis
2020-02-02Fix MD in "ldomctl dump"kn
Commit below merged duplicate code into hv_config() but forgot to call the helper function from dump(). Noticed by "ldomctl dump" returning zero, dumping both MD and PRI but leaving the former empty, sorry. revision 1.32 date: 2020/01/03 19:45:51; author: kn; state: Exp; lines: +69 -46; Move code into new hv_config(), defer to commands needing it
2020-01-22delete wasteful ;;Theo de Raadt
ok tedu
2020-01-17Implement "panic -c" just like "start -c"kn
Requested by Andrew Grillet OK kettenis
2020-01-17Fix usage: domain is not optional with start commandkn
Missed in previous commit
2020-01-16Usually, -width Fl (which is 10n) is too wide and hence ugly.Ingo Schwarze
Change several instances, most of them to the usual -width Ds.
2020-01-16Implement "start -c" to automatically connect to the consolekn
Just like amd64 vmctl(8). Manual feedback schwarze OK kettenis
2020-01-13Add BUGS section for hypervisor memory requirementkn
The hypervisor transparently allocates memory it needs, but the specific amount is machine dependent and not always documented or known. Mention these details to prevent users from overcommitting memroy in their configuration.
2020-01-09Fail on incomplete guest parameterskn
Each guest needs vcpu and memory, otherwise it is invalid. Each guest also needs at least one of vdisk, vnet or iodevice, otherwise it has nothing to boot from. OK kettenis
2020-01-09Mention that automatic selection upon "download" is firmware dependentkn
OK kettenis
2020-01-09Bail earlier on duplicate domainskn
If the given domain was already specified, do not bother allocating and initialising it. No function change.
2020-01-05Zero initialize cpus and memory variables up frontkn
2020-01-04complete r1.21 "reboot primary" -> "reset machine" fixkn
2020-01-04Zap unneeded gid checkkn
Since the domain name is mandatory for "ldomctl console ...", gid is always set and guaranteed to be greater than zero. OK kettenis
2020-01-04Add -n to init-system for validation onlykn
"ldomctl init-system -n ldom.conf" only parses the configuration file and exits; it is usable as unprivileged user, no devices are opened. OK kettenis
2020-01-03Move code into new hv_config(), defer to commands needing itkn
This moves setup code from main() into its own function so instead of upfront it can be used only when and where needed. With the exception of `create-vdisk' all currently open /dev/hvctl; for that command I added a rather quirky goto to avoid this unneeded step, but `list-io' for example does not need /dev/hvctl at all either. So instead of adding more quirks, split as per above and clearly call hv_config() from the commands that *do* require it. This also effectively defers such privileged operations after all argv[] parsing is done, that is the code fails earlier on invalid input without file I/O for nothing. With that in, I can easily add more commands not requiring hvctl access, e.g. a dry-run configuration check. OK kettenis
2019-12-30New config takes effect after machine reset, primary reboot is not enoughkn
2019-12-28Run cu(1) in restricted modekn
Users must not not be able to transfer files from the local hypervisor filesystem to VMs/LDOMs, especially since the "vmctl/ldomctl console ..." might be run as root. Disable all relevant escape sequences and cause cu to run under "stdio tty" pledge by using -r. OK deraadt mlarkin
2019-12-28The last argument of execl(3) should be cast explicitly.Theo Buehler
ok kn
2019-12-10Print started and stopped domains alikekn
"looks better" deraadt Ok kettenis
2019-12-06Add missing "and"kn
Fixes r1.15 "Document ILOM command to reset hardware".
2019-12-03"variable name=value" can be used multiple timeskn
2019-11-30Add create-vdisk commandkn
Analogue to amd64's vmctl create, this command creates sparse disk image files of the given size. This is less error prone than creating full files with dd(1), but comes with other caveats - still, it is worth having around. Further refinements yet to come; vmctl and ldomctl should also behave more alike in the future, as briefly discussed with kettenis and deraadt.
2019-11-28Use scan_scaled(3) for memory in ldom.confkn
Replace the hand-written routing with a proper library allowing even more formats. Since ldomctl's local util.h conflicts with the now used global util.h from libutil, rename it to ldom_util.h. Manual wording from amd64's vm.conf(5). OK kettenis
2019-11-28Add console commandkn
"ldomctl console guest01" executes cu(1) on the domain's console. Now more device minor guessing or copying; behaviour is completely analogue to vmctl(8) on amd64. OK kettenis
2019-11-28Print guest domain vcctty(4) devices in status outputkn
The virtual console concentrator port's minor had to be infered from the guest's internal ID which corresponds to the order of listing. To lift this implementation detail, simply print the device ready to copy and use with cu(1). OK kettenis
2019-11-28Usage on excessive select, delete, download, start, stop, panic argumentskn
2019-11-27Add list-io commandkn
list-io lists available PCIe devices to be used with ldom.conf(5)'s iodevice parameter. OK kettenis
2019-11-27Document ILOM command to reset hardwarekn
mdoc style input jmc no objections kettenis
2019-11-20Honour DEBUGkn
OK deraadt
2019-11-10Consistently use _rcctl enable foo_ in examples, it's simpler and lessLandry Breuil
error prone than manually editing rc.conf.local, and also works to enable ipsec and accounting. tweak from schwarze@ to use the \(dq\(dq syntax for quotes in '.Dl foo_flags="" lines' instead of \&"\&". while at it, fix a reference to a bogus /dev/dhclient.conf file that recently snuck in. ok jmc@ deraadt@ schwarze@
2019-08-05Allow an optional stride in the vcpu specification. This makes it possibleMark Kettenis
to allocate virtual CPUs but not assign them to domains. This way you can give domains exclusive access to a core without assigning all threads of that core to the domain.
2019-07-28minor markup polishing and typo fixes; OK kn@Ingo Schwarze
2019-07-28Document the iodevice keyword.Mark Kettenis
2019-07-28Add missing article, use Dq not literal "kn
2019-07-28Use imperative present tense consistentlykn
2019-07-28Move ldom.conf.5 to ldomctlkn
ldomctl(8)/ldomd(8) differs from the usual control/daemon setup since ldom.conf(5) is never read by the daemon itself but the control program only, so put it where it belongs. While here, mention eeprom(8) for a list of OpenPROM variables. Move prompted by kettenis Positive feedback deraadt, "go ahead" kettenis
2019-07-28Delete all CPUs from the primary and add back the number that we want toMark Kettenis
keep.
2019-07-28Add support for configuring static direct I/O.Mark Kettenis
2019-07-27tweak previous;Jason McIntyre
2019-07-27Move configuration format into ldom.conf(5)kn
ldomctl(8) contains the entire format describing logical domain configurations loaded with that tool. Entangle control commands and config options by putting the latter into its own page. The config options' descriptions stayed the same, only the EXAMPLE section gained a bit wording. Convert mdoc(7) macros `Ic =' to `Ns = Ns' and `Ic \&{ ... Ic \&}' to `Brq ...' while here. More improvements will follow in-tree. OK deraadt
2019-07-15Fix usagekn
List all available commands grouped by their synopsis to complete the shown usage while still keeping it compact and precise. Input from deraadt schwarze OK kettenis
2019-07-14Add interface to set/update a data property.Mark Kettenis
2019-07-07Add support for version 3.0 of the "mdstore" protocol.Mark Kettenis
2019-07-06Make sure we use the svc_handle for the negotiated major version of theMark Kettenis
"mdstore" service.
2019-07-06Pad message since newer firmware doesn't like it without padding.Mark Kettenis
Tested by kn@ and jan@