From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52366) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a98Rf-0007ed-9b for qemu-devel@nongnu.org; Wed, 16 Dec 2015 04:32:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a98Rb-0000uv-4T for qemu-devel@nongnu.org; Wed, 16 Dec 2015 04:32:27 -0500 Received: from mx2.parallels.com ([199.115.105.18]:50071) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a98Ra-0000up-Up for qemu-devel@nongnu.org; Wed, 16 Dec 2015 04:32:23 -0500 References: <1450256449-23779-1-git-send-email-den@openvz.org> <56712AF4.9030105@redhat.com> From: "Denis V. Lunev" Message-ID: <56712F9D.4000406@openvz.org> Date: Wed, 16 Dec 2015 12:32:13 +0300 MIME-Version: 1.0 In-Reply-To: <56712AF4.9030105@redhat.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/1] qmp: process system-reset event in paused state List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org, Dmitry Andreev , Markus Armbruster On 12/16/2015 12:12 PM, Paolo Bonzini wrote: > > On 16/12/2015 10:00, Denis V. Lunev wrote: >> With pvpanic or HyperV panic devices could be moved into the paused state >> with ' preserve'. In this state VM reacts only to >> 'virsh destroy' or 'continue'. >> >> 'virsh reset' command is usually used to force guest reset. The expectation >> of the behavior of this command is that the guest will be force restarted. >> This is not true at the moment. > Does "virsh reset" + "virsh continue" work, and if not why? as far as I can see there is no such command in virsh at all :( hades ~/src/qemu $ dpkg -l libvirt-bin Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Architecture Description +++-==============-============-============-================================= ii libvirt-bin 1.2.16-2ubun amd64 programs for the libvirt library hades ~/src/qemu $ hades ~/src/qemu $ virsh continue fedora20 error: unknown command: 'continue' hades ~/src/qemu $ hades ~/src/libvirt $ cfind . | xargs fgrep \"continue\" ./src/conf/nwfilter_conf.c: "continue"); hades ~/src/libvirt $ cfind . | xargs fgrep \"reset\" ./src/util/virpci.c: STREQ(ent->d_name, "reset")) { ./src/conf/domain_conf.c: "reset", ./src/conf/domain_conf.c: if (STREQ(tmp, "reset")) { ./src/qemu/qemu_monitor_json.c: "none", "pause", "reset", "poweroff", "shutdown", "debug", "inject-nmi"); ./src/vmware/vmware_driver.c: "reset", PROGRAM_SENTINEL, "soft", NULL ./src/access/viraccessperm.c: "start", "stop", "reset", ./tools/virsh-domain.c: {.name = "reset", ./tools/virsh-domain.c: if (vshCommandOptBool(cmd, "reset")) ./tools/virsh-domain.c: * "reset" command ./tools/virsh-domain.c: N_("reset"), ./tools/virsh-domain.c: {.name = "reset", hades ~/src/libvirt $ Do you propose to kludge libvirt and send 'continue' unconditionally before a 'reset'? We can but there is not much sense not to implement this is QEMU. Sending command in 'crashed' state only is a bit racy. The event moving domain into 'crashed' state could be not processed at the moment. Den