all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: vom513 <vom513@gmail.com>
To: pve-user@lists.proxmox.com
Subject: [PVE-User] PVE - guest shutdown w/ node shutdown behavior ?
Date: Mon, 27 May 2024 10:35:44 -0400	[thread overview]
Message-ID: <0A7FBE9F-E8D3-49B1-945F-701697E11C65@gmail.com> (raw)

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

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

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

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=0A7FBE9F-E8D3-49B1-945F-701697E11C65@gmail.com \
    --to=vom513@gmail.com \
    --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 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