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

Peter Kukla fruviad at yahoo.com
Tue Dec 11 14:39:40 UTC 2018


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,

-peter

.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20181211/d65593d8/attachment.htm>


More information about the libvirt-users mailing list