Hi Mark, On 2020-07-23 21:16, Mark Post wrote: > On 7/23/20 3:17 AM, Stefan Raspl wrote: >> I could imagine writing a simplistic tool >> that displays all virtualization levels down to the CEC, with the potential >> to >> extend it in the future. > > Hi, Stefan, > > I was thinking more in terms of command line switches that determine > what should be returned. For example: > cmdname --guest Would return the name of my running guest > cmdname --host Would return the name of the z/VM or KVM host. > cmdname --lpar Would return the name of the LPAR. > cmdname --cec Would return the name of the CEC. Or CPC, since I think > that's the current IBM name.
The problem with that is that you will get into trouble as soon as you consider 2nd-level installs where you have multiple guests and hypervisors to display/query. We'd need multiple switches to address the different levels of guests, and things get ugly pretty fast. Any ideas how to address that? > And possibly, something like: > cmdname --all Which would return the names of all these things, possible > as "name=value" pairs. > There's already the systemd-detect-virt command to tell you what > hypervisor is in use, so that wouldn't be needed. I can't say for sure > if many people would be interested in finding out they're running 6 > layers of virtualization deep and what each of those is. If someone does > want that, they should speak up. > > I believe something like this would allow for easy scripting by system > administrators. Of course, others may have differing opinions. I would argue that if you want to script, what you really want is a front-end in qclib that can be accessed by scripts. Yes, querying qclib is certainly more complicated than interacting with a command line tool like you layed out above, but unless we come up with a smart way for that tool's cmdline switches, it will likely not do what you need. Mit freundlichen Grüßen / Kind regards Stefan Raspl Linux on Z & Virtualization Development ------------------------------------------------------------------------------------------------------------------------------------------- IBM Deutschland Schoenaicher Str. 220 71032 Boeblingen Phone: +49-7031-16-2177 E-Mail: [email protected] ------------------------------------------------------------------------------------------------------------------------------------------- IBM Deutschland Research & Development GmbH / Vorsitzender des Aufsichtsrats: Gregor Pillen Geschäftsführung: Dirk Wittkopp Sitz der Gesellschaft: Böblingen / Registergericht: Amtsgericht Stuttgart, HRB 243294 ---------------------------------------------------------------------- For LINUX-390 subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO LINUX-390 or visit http://www2.marist.edu/htbin/wlvindex?LINUX-390
