[libvirt-users] "virsh list --all" is intermittently causing a shutdown client to boot?

Jiri Denemark jdenemar at redhat.com
Wed Dec 12 07:19:05 UTC 2018


On Tue, Dec 11, 2018 at 14:39:40 +0000, Peter Kukla wrote:
> Hello,
> I have a CentOS 7 client running on a CentOS 7 server.  "virsh --version" reports that 3.9.0 is being used.
> I'm issuing a "virsh shutdown" command to shutdown the client.  I then confirm that the client has actually shutdown using "virsh list --all".
> Lately I've been seeing instances where I shutdown the client, turn away to work on something else, and then turn back to find that the client has booted again.
> Initially I thought I was mistaken, and that I somehow hadn't properly shutdown the client, but further experimentation shows that's definitely not the case.  I've been able to reproduce this repeatedly using the following steps.
> 1.  Run "virsh shutdown CLIENT"2.  Wait ~30-60 seconds3.  Run "virsh list --all; virsh console CLIENT"
> If I run "virsh console CLIENT" on its own when the client is in a shutdown state, I get the expected "error: The domain is not running" message.  If I omit step #2 and run step #3 immediately after shutting down the client, virsh also complains that the client's not started and refuses to open a console.
> However, if I add a pause -- step 2, above -- between the shutdown and the "list --all" commands, then "list --all" shows that the client is running, and a console is opened to the VM.
> I have confirmed that the client boot is definitely being started by the "list --all" command (and not being started by something else while I'm not looking) by combining the "list --all" and "console" commands in step 3.  This is ensuring that the console is started as soon as the "list --all" is complete, and the resulting screen output shows the BIOS boot options quickly followed by the kernel boot messages being dumped to the console.  I can watch the entire boot process from start to finish.
> That pause between the shutdown and the "list --all" is critical.  I've shutdown the client and then immediately followed it up with the command:
>         watch virsh list --all
> ...which will run the "list --all" command every 2 seconds.  This will run indefinitely without triggering the boot, which eliminates the possibility of the boot occurring due to the amount of time since the shutdown.
> It may be that other virsh commands are also causing the client to boot, but thus far I've only reproduced it using the list --all command.
> Can anyone tell me why this is happening?  A bug?  Something in my config?  Something else?
> Thanks in advance,

This is indeed very strange and we would need to look at the logs to
check what's going on. Could you follow the steps in
https://wiki.libvirt.org/page/DebugLogs#Runtime_setting to enable debug
logs for libvirtd and share the (compressed) libvirtd.log somewhere?

Jirka




More information about the libvirt-users mailing list