vmcp(8) | System Manager's Manual | vmcp(8) |
vmcp - send commands to the z/VM control program
vmcp [-k] [-b <size>] command
vmcp [-h|-v]
vmcp allows Linux users to send commands to the control program of z/VM. The normal usage is to invoke vmcp with the command you want to execute. If the -k option is not specified, the whole command line is automatically translated into uppercase. The response of z/VM is written to the standard output.
vmcp needs a kernel feature represented by the device node /dev/vmcp. The kernel module defines a buffer size, which limits the length of the response. Every output larger than the compiled buffer size is silently dropped. Depending on you shell, please remember to escape special characters like * using \* instead.
vmcp writes the response to stdout and any error message to stderr. Depending on the success one of the following return codes is returned:
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.
Error: output (<num> bytes) was truncated, try --buffer to increase size
is written to stderr. <num> contains the necessary buffer size in bytes.
To get your user id
vmcp query userid
To attach the device 1234 to your guest
vmcp attach 1234 \*
If add the following line to /etc/sudoers
ALL ALL=NOPASSWD: /sbin/vmcp indicate
every user on the system can run the indicate command
sudo vmcp indicate
The basic idea of vmcp is based on cpint of Neale Fergusson.
Apr 2006 | s390-tools |