Azure / Microsoft.AVS.Management

AVS PowerCLI based Automation Tools for Administrators
MIT License
11 stars 20 forks source link

Disconnect ISCSI Target should check for VMs on datastore before continuing. #252

Open khensler-msft opened 5 months ago

khensler-msft commented 5 months ago

Before disconnecting or removing an iscsi target there should be a check to validate that there are no VMs currently registered and using the datastore. This causes orphaned objects and run command failures/timeouts.

et1975 commented 5 months ago

@khensler-msft is there specific commandlet that's known to cause this or we just want to make sure it's broadly addressed?

khensler-msft commented 5 months ago

It was reported via fasttrack that when disconnecting ESAN the tasks times out when attempting this operation when a VM exists on the datastore. I believe it is the Disconnect iscsi target commandlet that fails. It for sure does not have a check. The disconnect NVME targets should already have the check in place. Can probably use that as a template