Bug 888860

Summary: qemu does not quit after guest halt
Product: [Fedora] Fedora Reporter: Karel Volný <kvolny>
Component: qemuAssignee: Fedora Virtualization Maintainers <virt-maint>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: amit.shah, berrange, cfergeau, dwmw2, itamar, pbonzini, rjones, scottt.tw, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-12-20 09:25:05 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Karel Volný 2012-12-19 16:37:12 UTC
Description of problem:
If I shut down the virtual machine from within the guest, the machine stays running, qemu does not quit.

Version-Release number of selected component (if applicable):
qemu-system-x86-1.0.1-2.fc17.x86_64

How reproducible:
always

Steps to Reproduce:
1. qemu-img create -f qcow2 F18.qcow2 10G
2. qemu-kvm -m 1024 -cdrom bfo.iso -boot d F18.qcow2
3. install F18 as the guest OS
4. after installation, login as root in the guest
5. run "halt" in the guest
6. wait ...
7. switch to qemu monitor via ctrl+alt+f2
8. run "info status" in the monitor

Actual results:
the qemu window displays the text:
[   83.659469] System halted.

qemu-kvm is running

you get "VM status: running" in the monitor

Expected results:
the qemu window disappears
qemu-kvm quits, returning to shell
you cannot switch to the monitor as the window is gone already

Additional info:
see also bug #835493, bug #835497, I guess these are the same

Comment 1 Paolo Bonzini 2012-12-20 09:25:05 UTC
"halt" in the guest does not power it off after it reaches runlevel 0 (or whatever systemd calls it :)).  "poweroff" does that.

Comment 2 Karel Volný 2012-12-20 11:34:25 UTC
(In reply to comment #1)
> "halt" in the guest does not power it off after it reaches runlevel 0 (or
> whatever systemd calls it :)).  "poweroff" does that.

hm, I have always thought that "halt" is just an alias for "shutdown -h"

then we have an inconsistency here - a regression; but knowing what to look for, reading F15 release notes, I see we call this bug a feature, as usual with systemd :-(