Scheduled task 'Delete Snapshots' with a retention period (e.g., 4 days) incorrectly removes all snapshots, including those taken within the last 24 hours.
This occurs in the following workflows:
1. Scheduled task Delete Snapshots with Retention days via vSphere client under Virtual Machine > Configure > Scheduled Tasks
2. Delete All snapshots with the retention days for the VMs which are hosted on ESXi versions earlier than 8.0.3 from vSphere client.
ESXi versions lower than 8.0 Update 3
vCenter server version 8.0 Update 3 and later
From ESXi 8.0.3 and later, the existing API "vim.VirtualMachine.removeAllSnapshots" was modified to support optional parameter "SnapshotSelectionSpec" which has retentiondays in it.
Hence, when vCenter 8 U3 communicates with ESXi hosts older than 8 U3, the optional parameter is stripped out.
The "removeAllSnapshots" then executes in the older context, thus removing all snapshots.
This is resolved in vCenter 8.0 U3e (P05) and will be resolved in a future release of 9.x