Tips and tricks: How do I configure a Linux guest to shutdown from z/VM?
by the editorial team
This is accomplished through the combination of the SIGNAL SHUTDOWN command from z/VM and /etc/inittab file in Linux. First, logon to z/VM as MAINT, then run the following command:
==> CP SET SIGNAL SHUTDOWN 180
This instructs z/VM to wait 3 minutes (180 seconds) for each guest to complete shutdown. Increase this value if there are services running that require longer to stop.
Next, add this command to the AUTOLOG1 user’s PROFILE EXEC to ensure it is set at each IPL of z/VM:
==> LINK AUTOLOG1 191 1191 MR ==> ACC 1191 T ==> XEDIT PROFILE EXEC T
From here, insert the following line:
'CP SET SIGNAL SHUTDOWN 180'
Save and exit with the ‘FILE’ command, then unlink the disk:
==> REL T (DET
Now, from the Linux guest, edit /etc/inittab and change the line:
ca::ctrlaltdel:/sbin/shutdown -t3 -r now to: ca::ctrlaltdel:/sbin/shutdown -h now
This instructs Linux to halt when signaled. Now, when ‘CP SIGNAL SHUTDOWN’ is performed (either by MAINT directly or during z/VM reipl or shutdown), the Linux guest(s) will shutdown cleanly.






