vmcp(8)

πŸ“¦ version 2.44.1, in opensuse-leap 16.0

πŸ’… vmcp(8) β€” like, the z/VM control program whisperer

okay bestie, welcome to vmcp from the System Manager's Manual β€” this is the little tool that lets you talk to the z/VM control program and honestly it's giving main character energy πŸŽ€


✨ NAME ✨

vmcp β€” send commands to the z/VM control program πŸ¦‹


🌸 SYNOPSIS 🌸

vmcp [-k] [-b <size>] command

vmcp [-h|-v]

πŸ’– DESCRIPTION πŸ’–

So here's the vibe: vmcp lets Linux users send commands straight to the control program of z/VM. The normal usage is just invoking vmcp with the command you want to execute. Easy.

If you do not specify the -k option, the whole command line is automatically translated into uppercase β€” like, no cap, every letter gets shouted πŸ”₯. The response from z/VM gets written to the standard output.

vmcp needs a kernel feature that shows up as the device node /dev/vmcp. The kernel module defines a buffer size, and that size limits the length of the response. Every output larger than the compiled buffer size is silently dropped πŸ’€ β€” like it just vanishes, not a single warning, rude. And depending on your shell, please remember to escape special characters like * using \* instead, iykyk.


πŸ‘‘ RETURN CODES πŸ‘‘

vmcp writes the response to stdout and any error message to stderr. Depending on the success, one of these return codes comes back at you:

  • 0 β€” No problem in vmcp or CP. Slay, we love a clean run ✨
  • 1 β€” CP returned a non-zero response code. In that case the message
Error: non-zero CP response for command '<command>': #<num>"

is written to stderr. <num> contains the numerical value of the response code, and <command> contains the commands as send to CP. (Yes, that's exactly how it's written β€” keep it that way πŸ’…)

  • 2 β€” The specified buffer was not large enough to hold CP's response. The command was executed, nevertheless, and the response was truncated 😭. You can use the --buffer option to increase the response buffer. The message
Error: output (<num> bytes) was truncated, try --buffer to
increase size

is written to stderr. <num> contains the necessary buffer size in bytes.

  • 3 β€” Linux reported an error to vmcp. See the error message for details.
  • 4 β€” The options passed to vmcp were erroneous. See the error messages for details.

🫢 EXAMPLES 🫢

To get your user id:

vmcp query userid

To attach the device 1234 to your guest:

vmcp attach 1234 \*

If you add the following line to /etc/sudoers

ALL ALL=NOPASSWD: /sbin/vmcp indicate

then every user on the system can run the indicate command πŸ”₯:

sudo vmcp indicate

🌈 CREDITS 🌈

The basic idea of vmcp is based on cpint of Neale Fergusson. Respect where respect is due πŸ«‘πŸ’œ


⭐ OPTIONS ⭐

  • -h or --help β€” Print usage information, then exit. A little cry for help, but make it informative 🧚
  • -v or --version β€” Print version information, then exit.
  • -k or --keepcase β€” Using this option, vmcp does not convert the command to uppercase. (The default is to translate the command string to uppercase.) So like, if you want your lowercase letters to survive, this is your girl πŸ’…
  • -b <size> or --buffer=<size> β€” Specify a buffer size for the response. The buffer size can be specified from 4096 bytes (4k) to 1048576 Bytes (1M). The default size is 2 pages (8192 Bytes). You can also use k/K/m/M for kilobytes and Megabytes πŸ“

πŸ¦‹ SEE ALSO πŸ¦‹

sudo(8)


okay that's the whole page, no notes πŸ’– this was s390-tools, dated Apr 2006 β€” yeah she's an icon and she's been an icon for a minute πŸ‘‘βœ¨ periodt.

πŸ“¦ where this page comes from