Open hvisage opened 3 years ago
Files identified in the description:
If these files are inaccurate, please update the component name
section of the description or use the !component
bot command.
cc @Aversiste @Thulium-Drake @helldorado @joshainglis @karmab click here for bot help
cc @Ajpantuso click here for bot help
Files identified in the description:
If these files are incorrect, please update the component name
section of the description or use the !component
bot command.
This is behavior I'd also like to see fixed. There should be a new value for state called 'shutdown' or something for when you actually want to do a shutdown. Not being able to simply stop a VM with this module is frustrating really.
cc @UnderGreen click here for bot help
@PC-Admin, @hvisage would force shutdown with timeout work for you?
How would the workflow be? (I don't recall a forced shutdown in Proxmox) what has to be remembered, is when you have soething like the guest agent setting "on, and the guest agent isn't running - for whatever reason, a shutdown/reboot send via proxmox to the Qemu/VM, will take an extraordinary long time before that task times out. Thus to "force" it with a timeout on the Ansible side, you'll have to first CANCEL the task, and once cancelled, clear any related locks that might still be hanging around, before you go to the forced reset/stop
On 06 Jun 2023, at 03:46, Sergei Antipov @.***> wrote:
@PC-Admin, @hvisage would force shutdown with timeout work for you? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>
After running into that same 'issue' I think this clarification might help:
state: stopped
will shutdown the VM, not stop it (i.e. it will use qm shutdown
instead of qm stop
)force: true
didn't work, error message: 'Reached timeout while waiting for stopping VM.'timeout: 1
, it does indeed work.cc @krauthosting click here for bot help
Summary
The use of shutdown, when it states "STOPped" is quite unexpected, especially with a
force:yes
. I would be expecting thatstate:shutdown
would run through the "normal" shutdown process, whilestate:stopped
issued a STOP command to the VM via the API.Issue Type
Bug Report
Component Name
proxmox_kvm
Ansible Version
Configuration
playbook:
OS / Environment
Debian 10.8 netinst.iso installed template, no guest agent installed yet.
Proxmox VM Settings: QEMU Guest Agent Enabled
Steps To Reproduce
Expected Results
VMs to be STOPped (not shutdown attempted)
Actual Results
When you have VMs that might take long, or have other problems that have the boot process stuck (ie. having supervisor, nfs, systemd and supervisor starting processes on the nfs mounts as a good example that I'm struggling with) or don't "see" the shutdown request (ie. the example I'm now presented with where the QEMU agent isn't loaded, or something else stopped it, and the VM settings is set for QEMU guest agent isntalled), the use of shutdown is futile, and the need for STOP is necessary.
Would a pull request to change STOPped to se stop and state:shutdown to be added , be accepted?