Bug 835493 - The VM was wrong status when halt guest with command "guest-shutdown" in the host side
The VM was wrong status when halt guest with command "guest-shutdown" in the...
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
7.0
x86_64 All
medium Severity medium
: rc
: ---
Assigned To: Luiz Capitulino
Virtualization Bugs
:
Depends On:
Blocks: 835497
  Show dependency treegraph
 
Reported: 2012-06-26 06:56 EDT by Sibiao Luo
Modified: 2013-04-18 13:47 EDT (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-04-18 13:47:45 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Sibiao Luo 2012-06-26 06:56:56 EDT
Description of problem:
start guest with virtio serial and start guest agent inside guest, connect the chardev socket in host side for sending commands to guest, then check the VM status via QEMU monitor after the guest halt. the sceen of the guest display it halted successfully, but check the VM status via QEMU monitor was still running, it should be paused. any way, running status is not accurate.

Version-Release number of selected component (if applicable):
host info:
# uname -r && rpm -q qemu-kvm
3.3.0-0.12.el7.x86_64
qemu-kvm-1.0-17.1.el7.x86_64
guest info: 
kernel-2.6.32-276.el6.x86_64
qemu-guest-agent-0.12.1.2-2.295.el6.x86_64.rpm

How reproducible:
100%

Steps to Reproduce:
1.start guest with virtio serial and start guest agent inside guest.
install the qemu-guest-agent-0.12.1.2-2.295.el6.x86_64.rpm
in guest: # qemu-ga -m virtio-serial -p /dev/virtio-ports/org.qemu.guest_agent.0
2.connect the chardev socket in host side for sending commands to guest.
# nc -U /tmp/qga.sock readline
3.send command in the host side to halt guest.
{ "execute": "guest-shutdown", "arguments":{"mode":"halt"}}
{"return": {}}
4.check the VM status via QEMU monitor after the guest halt.

Actual results:
after the step 4, the screen of the guest displays as following,
...
Halting system... 
System haltes.

the QEMU monitor,
(qemu) info status 
VM status: running

Expected results:
The VM status should be paused after the guest halt, any way, running status is not correct.

Additional info:
Comment 1 Sibiao Luo 2012-06-26 07:02:43 EDT
(In reply to comment #0)
>
The command line:
# /usr/libexec/qemu-kvm -enable-kvm -smp 4 -m 4G -usb -device usb-tablet,id=input0 -name RHEL-Server-6.3-64 -uuid `uuidgen` -drive file=/home/rhel6.3.5.31.0.qcow2,if=none,id=drive-virtio-disk-0,format=qcow2,cache=none,werror=stop,rerror=stop -device virtio-blk-pci,drive=drive-virtio-disk-0,id=virtio0,bootindex=1 -netdev tap,script=/etc/qemu-ifup,id=netdev0 -device virtio-net-pci,netdev=netdev0,id=device-net0 -vnc :1 -boot menu=on -monitor stdio -chardev socket,path=/tmp/qga.sock,server,nowait,id=qga0 -device virtio-serial -device virtserialport,chardev=qga0,name=org.qemu.guest_agent.0 -qmp tcp:0:4444,server,nowait
Comment 2 Luiz Capitulino 2012-06-26 10:56:22 EDT
Looks like a bug, but I don't see how qemu-ga would be involved.

Can you please try to reproduce by running 'halt' in the guest?
Comment 3 Sibiao Luo 2012-06-26 22:11:05 EDT
(In reply to comment #2)
> Looks like a bug, but I don't see how qemu-ga would be involved.
> 
> Can you please try to reproduce by running 'halt' in the guest?

Hi Luiz,

   I test it as your indication, after running 'halt' in the guest, the guest was halted successfully. but the guest would not stay at 'System halts.' and the QEMU would be quit. does it what's your expected ?

Best wish & thx.
sluo
Comment 6 Luiz Capitulino 2012-11-20 13:37:06 EST
Hi Sibiao,

I have to check what Linux does on halt to see if it's possible to have a run state for this. If it's not possible, then I'll just close this as WONTFIX.

I'll try to work on this for RHEL-7.0.
Comment 7 Luiz Capitulino 2013-04-18 13:47:45 EDT
If I'm not mistaken, we've closed the RHEL6.5's buddy of this bug as WONTFIX because we'd need a pv driver to do this properly, which is too much for such a minor thing. Let's close this too as WONTFIX.

Note You need to log in before you can comment on or make changes to this bug.