你好!
我想使用Prism Central API创建并将VDSIK连接到VM。唯一的示例和主题我已经看到创建和附加VDisks使用Prism Element API,即使用特定的CVM作为端点。
我不想使用特定的CVM,因为这是由ITSM系统触发的精心策划任务。我们不能依靠特定的CVM可用,而宁愿使用Prism Central。
但是,我找不到似乎能够创建和附加VDisk的任何API调用。也许put /vms /{uuid}调用能够做到这一点,但我看不到任何提及文档。
有没有办法在Prism Central上进行此操作?
最好的答案乔森纳克斯
You can create and attach vdisks with Prism Central API. Here the steps you have to follow:<\/p>
- Do a GET for the VM you want to update<\/li>\t
- From the JSON payload, remove the status key completely<\/li>\t
- In the spec key, look for disk_list and add an additional item to that list (the new disk). The format is:<\/li><\/ol>
{
\"device_properties\": {
\"device_type\": \"DISK\",
\"disk_address\": {
\"adapter_type\": \"SCSI\",
\"device_index\": 3
}
},
\"disk_size_bytes\": 3221225472,
\"storage_config\": {
\"storage_container_reference\": {
\"kind\": \"storage_container\",
\"uuid\": \"c03cd780-32fa-4292-9eab-ab2f9c311328\",
\"name\": \"default-container-151523\"
}
}
}<\/code><\/pre>- Send a PUT with this payload.\u00a0<\/li><\/ol>
Please let me know if you find any issue.<\/p>","className":"post__content__best_answer"}">
- Send a PUT with this payload.\u00a0<\/li><\/ol>