Peter Kukla
2018-Dec-14 15:31 UTC
Re: [libvirt-users] "virsh list --all" is intermittently causing a shutdown client to boot?
Autostart is set to "enable" for this domain, but I wouldn't expect autostart to be invoked when a simple "read-only" command is run. I'd expect the "list --all" command to only display details about the domain...not change the status of the domain by booting it. Maybe I'm misunderstanding things... On Thursday, December 13, 2018, 11:20:30 AM EST, Michal Privoznik <mprivozn@redhat.com> wrote: On 12/11/18 3:39 PM, Peter Kukla wrote:> Hello, > <snip/>Could it be that the domain is set as "autostart"? The session daemon is slightly different to system daemon. The former come and go if there is no activity for (by default) 30 seconds. And if the domain would be marked as 'autostart' (meaning start the domain automatically when the daemon is being started) the I could imagine this happening. `virsh dominfo $domain' should tell you that. Michal
Michal Prívozník
2018-Dec-14 20:28 UTC
Re: [libvirt-users] "virsh list --all" is intermittently causing a shutdown client to boot?
On 12/14/18 4:31 PM, Peter Kukla wrote:> Autostart is set to "enable" for this domain, but I wouldn't expect autostart to be invoked when a simple "read-only" command is run. I'd expect the "list --all" command to only display details about the domain...not change the status of the domain by booting it. Maybe I'm misunderstanding things...Bingo! I mean, this is still a bug, but not that trivial to fix. As I explained earlier, in session mode the daemon is shut off after some time of inactivity. Then, when there is some new activity the daemon is started up again, but it has no idea about the previous state of things, i.e. you shut down a domain and want it keep shut down. All it knows is that there is a domain with autostart set that is not running. So it starts the domain again. The only solution I see is to disable autostart for session URI. As a workaround you can start session daemon yourself (just run libvirtd as regular user of yours). This way the daemon is not autostarted automatically and therefore without --timeout. Michal
Peter Kukla
2018-Dec-14 22:42 UTC
Re: [libvirt-users] "virsh list --all" is intermittently causing a shutdown client to boot?
That makes sense. Now that I understand what's going on, I can work around it. Thanks for the explanation. -peter On Friday, December 14, 2018, 3:28:32 PM EST, Michal Prívozník <mprivozn@redhat.com> wrote: On 12/14/18 4:31 PM, Peter Kukla wrote:> Autostart is set to "enable" for this domain, but I wouldn't expect autostart to be invoked when a simple "read-only" command is run. I'd expect the "list --all" command to only display details about the domain...not change the status of the domain by booting it. Maybe I'm misunderstanding things...Bingo! I mean, this is still a bug, but not that trivial to fix. As I explained earlier, in session mode the daemon is shut off after some time of inactivity. Then, when there is some new activity the daemon is started up again, but it has no idea about the previous state of things, i.e. you shut down a domain and want it keep shut down. All it knows is that there is a domain with autostart set that is not running. So it starts the domain again. The only solution I see is to disable autostart for session URI. As a workaround you can start session daemon yourself (just run libvirtd as regular user of yours). This way the daemon is not autostarted automatically and therefore without --timeout. Michal
Possibly Parallel Threads
- Re: "virsh list --all" is intermittently causing a shutdown client to boot?
- Re: "virsh list --all" is intermittently causing a shutdown client to boot?
- Re: "virsh list --all" is intermittently causing a shutdown client to boot?
- "virsh list --all" is intermittently causing a shutdown client to boot?
- virsh autostart: cannot set autostart for transient domain