You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The result when the VM was powered off before the call:
ok: [localhost -> localhost] => {
"changed": false,
"invocation": {
"module_args": {
"session_timeout": null,
"state": "shutdown",
"vcenter_hostname": "vcenter",
"vcenter_password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"vcenter_rest_log_file": null,
"vcenter_username": "user",
"vcenter_validate_certs": true,
"vm": "vm-17058"
}
},
"value": {
"error_type": "ALREADY_IN_DESIRED_STATE",
"messages": [
{
"args": [
"vm-17058:d3013894-63b8-4a83-af62-9e89cf6a79a1"
],
"default_message": "Virtual machine with identifier 'vm-17058:d3013894-63b8-4a83-af62-9e89cf6a79a1' is already powered off.",
"id": "com.vmware.api.vcenter.vm.guest.power.already_powered_off"
},
{
"args": [],
"default_message": "The attempted operation cannot be performed in the current state (Powered off).",
"id": "vmsg.InvalidPowerState.summary"
}
]
}
}
Expected results:
changed: true is returned by the module when there is a power state change.
Actual results:
changed: false is returned by the module when there is a power state change. To actually detect a power state change I would need to call vmware.vmware_rest.vcenter_vm_guest_power_info first and compare the power state to the result of this call to detect a change. This would get messy when changing the power state of more than one VM at a time.
The text was updated successfully, but these errors were encountered:
Ansible version:
Collection version:
The implementation:
The result when the VM was running before the call:
The result when the VM was powered off before the call:
Expected results:
changed: true
is returned by the module when there is a power state change.Actual results:
changed: false
is returned by the module when there is a power state change. To actually detect a power state change I would need to callvmware.vmware_rest.vcenter_vm_guest_power_info
first and compare the power state to the result of this call to detect a change. This would get messy when changing the power state of more than one VM at a time.The text was updated successfully, but these errors were encountered: