public inbox for pve-user@lists.proxmox.com
 help / color / mirror / Atom feed
From: Jan Vlach <janus@volny.cz>
To: Proxmox VE user list <pve-user@lists.proxmox.com>
Subject: Re: [PVE-User] PVE - guest shutdown w/ node shutdown behavior ?
Date: Mon, 27 May 2024 16:42:41 +0200	[thread overview]
Message-ID: <4FC72AB4-52FB-4BDA-882F-C6D7F67D27B1@volny.cz> (raw)
In-Reply-To: <0A7FBE9F-E8D3-49B1-945F-701697E11C65@gmail.com>

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

      reply	other threads:[~2024-05-27 14:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-27 14:35 vom513
2024-05-27 14:42 ` Jan Vlach [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FC72AB4-52FB-4BDA-882F-C6D7F67D27B1@volny.cz \
    --to=janus@volny.cz \
    --cc=pve-user@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal