summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ldomctl (follow)
Commit message (Collapse)AuthorAgeFilesLines
* The code in mdstore.c should stand on its own, so rename the globalkettenis2021-02-011-13/+13
| | | | | | variables used here instead of using the ones from config.c. ok deraadt@, kn@
* last pieces of satisfying -fno-commonderaadt2021-01-312-4/+5
|
* Remove duplicate hvmd declerationkn2021-01-301-2/+1
| | | | | Already declared "extern" in ldomctl.h; required for "-fno-common". OK kettenis
* Move global domain declaration to parse.ykn2021-01-302-3/+4
| | | | | This is the only object that uses it; required for "-fno-common". OK kettenis
* list-io must be run from config dirkn2021-01-231-3/+3
| | | | | | | | The current description fails to explain how to use it properly and the error message is only helpful for people that know how ldomctl works and/or what the Phsyical Resource Inventory is. OK afresh1 kettenis
* Explain vcpu strides, provide examplekn2020-11-061-4/+22
| | | | | | | Quite a few users and developers (including me) were confused by how virtual CPU strides would work. Initial diff together with stsp, final feedback from kettenis
* Briefly document default boot disk behaviourkn2020-09-141-2/+7
|
* Typofixkn2020-09-141-2/+2
|
* Fix "init-system" with multiple PCIe root complexeskn2020-06-291-1/+3
| | | | | | | | | | | | | | | | | | Contrary to other (single CPU) machines, the Oracle SPARC T4-2 machines come with two CPUs/two PCIe root complexes instead of one. ldomctl already accounts for this and interates over them but lacked a skip condition when iterating over subdevices to avoid linking devices in one complex to those in another. This fixes a NULL dereference in "init-system" on T4-2 machines and makes it produce working machine descriptions (.md files). Testing and confirmation on a T4-1 that single PCIe root complex machines still produce identical MDs with this from tracey, thanks! Reminded by a report on bugs@ from Kokuma who also confirmed this fix on their T4-2.
* Reject vdisk, vnet and iodevice parameters for primary domainkn2020-06-291-1/+16
| | | | | | | | | | | | In analogy to guest domains requiring vcpu, memory and at least one bootable device (vdisk, vnet or iodevice), the primary domain must not be configured with vdisk, vnet or iodevice parameters; it does not make sense to provide virtual disks or interfaces to it and PCIe devices not assigned to guest domains automatically end up in the primary domain. ldom.conf(5) also documents those explicitly for guest domains only. OK tracey
* Make "init-system -n" check vcpu and memory constraintskn2020-05-241-1/+1
| | | | | | | | | Second attempt after config.c revision 1.37, this time merely delay the "-n" test until after constraint checks have been performed such that the PRI is still read, as required in order to get the total number of VCPUs and memory. OK kmos who also tested this
* msgkn2020-05-241-3/+4
|
* Typofixkn2020-05-231-2/+2
|
* Fail on duplicate vcpu, memory or iodevice parameterskn2020-05-231-3/+20
| | | | | | | | Domains get to define their cores and memory only once unlike vnet, vdisk and variable parameters of which it makes sense to have more than one; iodevices are unique my design and may only be assigned once. OK kettenis
* Revert previouskn2020-05-221-14/+13
| | | | | | | | | | Total vcpu and memory are read from the PRI so constraint checks must not be done before that, noted by kettenis. The fact that "total_cpus" as a global variable (initialized with zero) is always smaller than the total number of configured vcpus and the fact that I only tested a negative example without a positive one made me jump the trigger, sorry.
* Make "init-system -n" check vcpu and memory constraintskn2020-05-221-13/+14
| | | | | | | | | | kmos noted that "-n" wouldn't bark at overallocation, only running without it would do so. Hoit setup code and delay the noaction bailout just after constraint checks such that they're always done. OK kmos
* Change install images called *.fs to *.img. These are UFS filesystem images,deraadt2020-05-171-4/+4
| | | | | | | | but additionally have a bootblock in the first 8K (since UFS does not use that space). There are some UEFI direct-from-internet bootloaders that require the name *.img. So this makes things more convenient for those, while keeping it consistant in all architectures. ok kettenis beck kn
* ce examples of "Ar arg Ar arg" with "Ar arg arg" and stop the spread;jmc2020-04-231-3/+3
|
* Print IO device names next to path with "list-io"kn2020-03-171-2/+9
| | | | | | | | Names help identify the right iodevice to be assigned in ldom.conf(5); they directly match the structure seen in the iLOM shell, and the output format is similar to Solaris "ldm list-io". OK kettenis
* Initialise only the components list for "list-io"kn2020-03-071-2/+2
| | | | | | | | | 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).
* Support devaliases for vnetkn2020-02-214-10/+26
| | | | | | | | | | | | | 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
* Actually pass devalias from parser to configkn2020-02-211-1/+2
| | | | | Missed in previous commit; no breakage, the resulting MD would simply end up without user defined device aliases.
* Support devaliases for vdiskkn2020-02-204-9/+51
| | | | | | | | | | | | | | 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
* vnet does not take curly braceskn2020-02-201-4/+4
| | | | | | | The manual lies and all options ought to be provided space separated, on the same line as the vnet keyword. OK kettenis
* Fix MD in "ldomctl dump"kn2020-02-021-1/+3
| | | | | | | | | | | | | 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
* delete wasteful ;;deraadt2020-01-221-3/+3
| | | | ok tedu
* Implement "panic -c" just like "start -c"kn2020-01-172-8/+31
| | | | | | Requested by Andrew Grillet OK kettenis
* Fix usage: domain is not optional with start commandkn2020-01-171-2/+2
| | | | Missed in previous commit
* Usually, -width Fl (which is 10n) is too wide and hence ugly.schwarze2020-01-161-3/+3
| | | | Change several instances, most of them to the usual -width Ds.
* Implement "start -c" to automatically connect to the consolekn2020-01-162-22/+56
| | | | | | | Just like amd64 vmctl(8). Manual feedback schwarze OK kettenis
* Add BUGS section for hypervisor memory requirementkn2020-01-131-2/+17
| | | | | | | | 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.
* Fail on incomplete guest parameterskn2020-01-091-1/+20
| | | | | | | | 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
* Mention that automatic selection upon "download" is firmware dependentkn2020-01-091-3/+6
| | | | OK kettenis
* Bail earlier on duplicate domainskn2020-01-091-8/+7
| | | | | | | If the given domain was already specified, do not bother allocating and initialising it. No function change.
* Zero initialize cpus and memory variables up frontkn2020-01-051-5/+3
|
* complete r1.21 "reboot primary" -> "reset machine" fixkn2020-01-041-3/+3
|
* Zap unneeded gid checkkn2020-01-041-3/+3
| | | | | | | Since the domain name is mandatory for "ldomctl console ...", gid is always set and guaranteed to be greater than zero. OK kettenis
* Add -n to init-system for validation onlykn2020-01-044-12/+34
| | | | | | | "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
* Move code into new hv_config(), defer to commands needing itkn2020-01-031-46/+69
| | | | | | | | | | | | | | | | | | | | | 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
* New config takes effect after machine reset, primary reboot is not enoughkn2019-12-301-3/+3
|
* Run cu(1) in restricted modekn2019-12-281-2/+3
| | | | | | | | | | | 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
* The last argument of execl(3) should be cast explicitly.tb2019-12-281-2/+2
| | | | ok kn
* Print started and stopped domains alikekn2019-12-101-13/+9
| | | | | "looks better" deraadt Ok kettenis
* Add missing "and"kn2019-12-061-3/+3
| | | | Fixes r1.15 "Document ILOM command to reset hardware".
* "variable name=value" can be used multiple timeskn2019-12-031-2/+3
|
* Add create-vdisk commandkn2019-11-303-9/+72
| | | | | | | | | | | 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.
* Use scan_scaled(3) for memory in ldom.confkn2019-11-2810-37/+29
| | | | | | | | | | | | 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
* Add console commandkn2019-11-283-6/+40
| | | | | | | | "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
* Print guest domain vcctty(4) devices in status outputkn2019-11-282-11/+19
| | | | | | | | | | 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
* Usage on excessive select, delete, download, start, stop, panic argumentskn2019-11-281-7/+10
|