Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

This page was created to track changes to versions of Python-ESXi-Utilities (esxi_utils). The changelog was created in v3.22.1 and only changes starting from that version are tracked here.

## 4.0.1

- Bugfix for "hard_stop" argument not actually stopping the VM.

## 4.0.0

- Changes the default method of retrieving VirtualMachine objects from their list
Expand Down
4 changes: 3 additions & 1 deletion esxi_utils/vm/virtualmachine.py
Original file line number Diff line number Diff line change
Expand Up @@ -1200,7 +1200,9 @@ def power_off(self, idempotent: bool = False, hard_stop: bool = False):
elif self.powered_off:
return
if hard_stop:
self._vim_vm.Stop()
self._vim_vm.TerminateVM()
# Since this is not a task, it is good to wait a bit for the VM to terminate
time.sleep(5)
return
self._client._wait_for_task(self._vim_vm.PowerOffVM_Task())

Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = esxi-utils
version = 4.0.0
version = 4.0.1
author = The MITRE Corporation
description = A package that provides functions for interacting with an ESXi server and manipulating VMs/OVFs.
long_description = file: README.md
Expand Down
Loading