As part of a lab rework I renamed one of my NFS shares. There were no hosts or VMs using it at the time so no problem, I thought.
Unfortunately I forgot that my vcenter uses/used that share for a content library.
So, the newly-renamed NFS share is mounted everywhere and working fine, and the content is still there, but the content library is broken (Status: '? Unknown').
I need to re-point it somehow to the actual content. How can I do this?
The only option under Actions > Edit Settings is to enable publishing or not.
Thanks in advance
Hey spoovy,
Take a look here on how to update the parameters using a REST API Call: REST API Reference Documentation
Doesn't seem to work, though I don't get any error message:
[tappy@scooter chris]$ cat patch.json
{
"update_spec": {
"storage_backings": [
{
"datastore_id": "datastore-7504",
"type": "DATASTORE"
}
]
}
}
[tappy@scooter chris]$ curl -k -i -b cookie-jar.txt -XPATCH -H "Content-Type: application/json" -d @patch.json https://vcenter1/rest/com/vmware/content/local
-library/id:61f080aa-6959-4e89-b510-6586dc85ac8d
HTTP/2 200
date: Sun, 18 Oct 2020 15:01:09 GMT
content-length: 0
x-envoy-upstream-service-time: 457
server: envoy
[tappy@scooter chris]$ curl -k -i -b cookie-jar.txt https://vcenter1/rest/com/vmware/content/local-library/id:61f080aa-6959-4e89-b510-6586dc85ac8d | tail -1
| jq .value.storage_backings
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 567 0 567 0 0 9624 0 --:--:-- --:--:-- --:--:-- 9775
[
{
"datastore_id": "datastore-10",
"type": "DATASTORE"
}
]