all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [PVE-User] PVE - guest shutdown w/ node shutdown behavior ?
@ 2024-05-27 14:35 vom513
  2024-05-27 14:42 ` Jan Vlach
  0 siblings, 1 reply; 2+ messages in thread
From: vom513 @ 2024-05-27 14:35 UTC (permalink / raw)
  To: pve-user

Hello all,

I’m trying to confirm what this behavior is.  That is, when a host node shuts down, how are the guests shutdown ?  Specifically in relation to any guests that don’t have the agent installed.

My understanding is that PVE will do the following in this order:

Shutdown guest via agent … timeout
else
Shutdown guest via ACPI … timeout
else
Hard power-off

In systemd pve-guests.service this is ran upon stop:

	ExecStop=/usr/bin/pvesh --nooutput create /nodes/localhost/stopall

I also think I found the code where the 3 possibilities mentioned above happens:

qemu-server/PVE/QemuServer.pm:

   eval {
       if ($shutdown) {
           if (defined($conf) && get_qga_key($conf, 'enabled')) {
               mon_cmd($vmid, "guest-shutdown", timeout => $timeout);
           } else {
               mon_cmd($vmid, "system_powerdown");
           }
       } else {
           mon_cmd($vmid, "quit");
       }
   };

I could be off base here, please let me know.

If that is the guest shutdown logic, does the “get_qga_key” check mean it’s checking that this is enabled in options (i.e. checkbox) or that it’s actually running ?

Is “system_powerdown” the ACPI method ?  It seems like that only gets called if the agent is enabled in config ?

Is “quit” the hard poweroff ?

So what about a guest that the agent option is checked but doesn’t have the agent installed ?

Sorry if any of this is unclear, I’m trying my best to articulate my questions here.

Thanks.


_______________________________________________
pve-user mailing list
pve-user@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-user

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PVE-User] PVE - guest shutdown w/ node shutdown behavior ?
  2024-05-27 14:35 [PVE-User] PVE - guest shutdown w/ node shutdown behavior ? vom513
@ 2024-05-27 14:42 ` Jan Vlach
  0 siblings, 0 replies; 2+ messages in thread
From: Jan Vlach @ 2024-05-27 14:42 UTC (permalink / raw)
  To: Proxmox VE user list

Hi,

from my experience, you need dbus and qemu-guest agent for debian VMs and Guest Agent Enabled in VM options

OR

Guest Agent Disabled and then ACPI event gets sent inside the VM.

JV

> On 27. 5. 2024, at 16:35, vom513 <vom513@gmail.com> wrote:
> 
> Hello all,
> 
> I’m trying to confirm what this behavior is.  That is, when a host node shuts down, how are the guests shutdown ?  Specifically in relation to any guests that don’t have the agent installed.
> 
> My understanding is that PVE will do the following in this order:
> 
> Shutdown guest via agent … timeout
> else
> Shutdown guest via ACPI … timeout
> else
> Hard power-off
> 
> In systemd pve-guests.service this is ran upon stop:
> 
> 	ExecStop=/usr/bin/pvesh --nooutput create /nodes/localhost/stopall
> 
> I also think I found the code where the 3 possibilities mentioned above happens:
> 
> qemu-server/PVE/QemuServer.pm:
> 
>   eval {
>       if ($shutdown) {
>           if (defined($conf) && get_qga_key($conf, 'enabled')) {
>               mon_cmd($vmid, "guest-shutdown", timeout => $timeout);
>           } else {
>               mon_cmd($vmid, "system_powerdown");
>           }
>       } else {
>           mon_cmd($vmid, "quit");
>       }
>   };
> 
> I could be off base here, please let me know.
> 
> If that is the guest shutdown logic, does the “get_qga_key” check mean it’s checking that this is enabled in options (i.e. checkbox) or that it’s actually running ?
> 
> Is “system_powerdown” the ACPI method ?  It seems like that only gets called if the agent is enabled in config ?
> 
> Is “quit” the hard poweroff ?
> 
> So what about a guest that the agent option is checked but doesn’t have the agent installed ?
> 
> Sorry if any of this is unclear, I’m trying my best to articulate my questions here.
> 
> Thanks.
> 
> 
> _______________________________________________
> pve-user mailing list
> pve-user@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-user


_______________________________________________
pve-user mailing list
pve-user@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-user

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-05-27 14:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-27 14:35 [PVE-User] PVE - guest shutdown w/ node shutdown behavior ? vom513
2024-05-27 14:42 ` Jan Vlach

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal