If you remove vsanDatastore form vsphere client directly, you will get this error message:
The correct steps of command line are as the following:
1. SSH to this server and run command to check vsan storage:
esxcli vsan storage list
2. From above, you can get the SSD device id. Now, remove the SSD by the following command:
esxcli vsan storage remove -s <SSD-Device-ID>
3. After removing SSD, you can check the vsan storage again. You will find that there is no vsan storage in this host.
esxcli vsan storage list
4. But the vsanDatastore is still in the vsphere client storage list. That's because this host is still in the vsan cluster. We can also check by command:
esxcli vsan cluster get
5. Leaving from the vsan cluster you need run command:
esxcli vsan cluster leave
6. Go back to vsphere client and check the datastore. You won't see the vsanDatastore again.