doskiran
Enthusiast
Enthusiast

Pass the ManagedObjectReference(MOID) for both HostDatastoreSystem and Datastore( not the datastore name).

https://vdc-repo.vmware.com/vmwb-repository/dcr-public/1ef6c336-7bef-477d-b9bb-caa1767d7e30/82521f49...

Eg:

 

<soap:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
        <RemoveDatastore xmlns="urn:internalvim25">
            <_this xsi:type="HostDatastoreSystem" type="HostDatastoreSystem">datastoreSystem-200</_this>
            <datastore xsi:type="Datastore">datastore-20</datastore>
        </RemoveDatastore>
    </soap:Body>
</soap:Envelope>