- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
SOAP call in xml to remove NFS mount
Hello,
I am trying to remove a mounted NFS datastore but I am not able to get my head around the manganged reference to the datastore.
Can somebody help
sub createUnmountMessage {
my $msg = <<SOAP_UNMOUNT_MESSAGE;
<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" serverGuid="">ha-datastoresystem</_this>
<datastore xsi:type="Datastore" type="Datastore">NFS_HDD</datastore>
</RemoveDatastore>
</soap:Body>
</soap:Envelope>
SOAP_UNMOUNT_MESSAGE
return $msg;
}
Kind regards
Thomas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Pass the ManagedObjectReference(MOID) for both HostDatastoreSystem and Datastore( not the datastore name).
<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>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello
many thanks! Turns out I am an id...
It is even easier than that. The NFS full-mount description is already the MOID. The reference to ha-datastoresystem is working just fine in this combination.
e.g.
<RemoveDatastore xmlns="urn:internalvim25">
<_this xsi:type="HostDatastoreSystem" type="HostDatastoreSystem" serverGuid="">ha-datastoresystem</_this>
<datastore xsi:type="Datastore" type="Datastore">192.168.110.110:/mnt/NFS_HDD</datastore>
</RemoveDatastore>
Again, many thanks - Only now I started using the mob view on host and than it became obvious ![]()