Attach multiple volumes to a virtual machine
The IBM® Cloud Infrastructure Center provides a new action API
to attach multiple volumes to a virtual machine. This API is an
extension to
OpenStack Server API. To use this API, specify the
bulkVolumeAttach
action in the
request body.
Request Method
POST
Request URL
/v2.1/{tenant_id}/servers/{server_id}/action
Request parameters
| Name | Style | Type | Required | Description |
|---|---|---|---|---|
| server_id | path | string | Required | The UUID of the virtual machine. |
| bulkVolumeAttach | body | object | Required | The action to attach a bulk of volumes to a virutal machine. |
| fcp_template_id | body | string | Optional | The FCP multipath template ID. You can attach a volume to a z/VM virtual machine with an FCP multipath template. Refer to How to use FCP multipath templates for more information. |
| volumeAttachment | body | array | Required | A list volumes information.
- volumeId: The volume id. - device: The name of the device, for example,
-is_boot_volume: "False". Currently bootable volume is not supported to be attached. |
Request example:
{
"bulkVolumeAttach": {
"volumeAttachment": [
{
"volumeId": "ae69e7d3-8887-4803-bc17-a9126e5fead3",
"device": null,
"is_boot_volume": "False"
},
{
"volumeId": "460c2e63-a3b0-4031-8aa4-b7bf8a086767",
"device": null,
"is_boot_volume": "False"
}
],
"fcp_template_id": "308c3116-7c58-11ee-8526-020103096378"
}
}
Response code
Normal response code:
202
and no
body is returned on successful request.