OpenSuSE Tumbleweed – when `halt` doesn’t halt, but CLI+HLT the CPU at the end of the shutdown procedure
Posted by jpluimers on 2017/04/26
TL;DR:
Don’t use
halt, usepoweroffinstead.
A while ago I wrote about OpenSuSE 12.x not halting after a halt:
- openSUSE 12.x: “A plain `halt` will not shutdown the system properly.”
- openSUSE 12.x: today the same system would not plain “reboot” either (was: “A plain `halt` will not shutdown)
The same holds for more recent OpenSuSE systems, but ESXi would never tell what was going on.
Recently I installed an OpenSuSE Tumbleweed system under VMware Fusion (running on Mac OS X) which indicated “The CPU has been disabled by the guest operating system.”
Which — Understanding the message: The CPU has been disabled by the guest operating system (2000542) | VMware KB [WayBack] — means that halt will not power down the VM but perform a CLI + HLT on the CPU. This effectively hangs the CPU even though the console log on the right tells does a real Shutdown.
In the past – even under ESXi – a halt would just power down the system, so based on the above I did more digging and fount this very interesting answer in rhel – What is the difference between these commands for bringing down a Linux server? – Unix & Linux Stack Exchange [WayBack] which comes down to:
- on a systemd [WayBack] based system commands like
halt,reboot,shutdownall invoke systemctl [WayBack] calling for a specific target [WayBack]. - mapping of targets and commands is as follows (quoted from the answer):
systemctl isolate halt.targethas the shorthands:shutdown -H nowsystemctl halt- plain unadorned
halt
systemctl isolate reboot.targethas the shorthands:shutdown -r nowtelinit 6systemctl reboot- plain unadorned
reboot
systemctl isolate poweroff.targethas the shorthands:shutdown -P nowtelinit 0shutdown nowsystemctl poweroff- plain unadorned
poweroff
systemctl isolate rescue.targethas the shorthands:telinit 1systemctl rescue
systemctl isolate multi-user.targethas the shorthands:telinit 2telinit 3telinit 4
systemctl isolate graphical.targethas the shorthand:telinit 5
For a SysV [WayBack] init runlevels versus systemd targets see:
- 8.3. Working with systemd Targets [WayBack]
- SysVinit to Systemd Cheatsheet – FedoraProject [WayBack]
The systemd parameters making things a bit confusing, for instance you can do reboot --halt and more of those shown in linux – Are there any good reasons for halting system without cutting power? – Super User [WayBack].
That also explains that halt without a powerdown can be useful: it for instance gives the end-user the opportunity to click the reset button instead of the power button after a halt.
–jeroen








Leave a comment