Create a Cloud GPU VM
5 min
you can create a cloud gpu vm in a specific data center using a composite call, a specialized configuration containing a gpu card these resources must be defined simultaneously in a single composite request composite calls efficiently bundle a series of rest api https //api ionos com/docs/cloud/v6/#tag/servers requests into a single operation, allowing you to use the output of one request as the input for a subsequent request note the payload for a composite call that configures a cloud gpu vm differs significantly from a standard post request used to create an enterprise server with the composite call, you can simultaneously create a new instance, define its direct attached storage device, and select the image ( public image https //docs ionos com/cloud/backup and storage/images snapshots/public images , a private image https //docs ionos com/cloud/backup and storage/images snapshots/private images , or a snapshot https //docs ionos com/cloud/backup and storage/images snapshots/snapshots ) in a single request once the request is processed, the cloud gpu vm is created, and the direct attached storage is mounted automatically important considerations for cloud gpu vms live migrations are not supported cloud gpu vms cannot be migrated between hosts without downtime maintenance reboots may occur without warning system maintenance may require unexpected reboots limited availability the cloud gpu vms are only available in the frankfurt de/fra/2 region no direct attached storage for cloud gpu vm direct attached storage is not available for cloud gpu vms request endpoint use the following endpoint for the cloud gpu vm creation https //api ionos com/cloudapi/v6/datacenters/{datacenterid}/servers request use a post request to the servers collection endpoint within the target data center this single request acts as the composite call, provisioning the vm and its specialized devices simultaneously curl location \\ \ request post 'https //api ionos com/cloudapi/v6/datacenters/{datacenterid}/servers' \\ \ header 'authorization bearer eyj0exaioijkv1qilcjrawqio' \\ \ header 'content type application/json' '{ "properties" { "name" "my gpu server", "type" "gpu", "availabilityzone" "auto", "templateuuid" "e15d15e7 ea9a 48ae a60a 29b9463f4519" }, "entities" { "volumes" { "items" \[ { "properties" { "name" "gpu volume", "imagealias" "ubuntu\ latest", "imagepassword" "xxxxxxxxxx" } } ] } } }' request parameters header parameters to make authenticated requests to the api, the following fields are mandatory in the request header name type required description authorization string yes the bearer token content type string yes must be application/json path parameters to make authenticated requests to the api, the following fields are mandatory in the request header name type required description datacenterid string yes the id of the data center response a 202 message confirms that the instance is in the process of being created you may want to poll the status uri that is returned in the response header to follow the progress of provisioning the instance will be available once the status is set to "done" { "id" "5de45b21 9b54 4957 b3d6 4af44d0c12cd", "type" "server", "href" "\<resource uri>", "metadata" { "etag" "45480eb3fbfc31f1d916c1eaa4abdcc3", "createddate" "2015 12 04t14 34 09 809z", "createdby" "john doe\@example com", "createdbyuserid" "john doe\@example com", "lastmodifieddate" "2015 12 04t14 34 09 809z", "lastmodifiedby" "john doe\@example com", "lastmodifiedbyuserid" "63cef532 26fe 4a64 a4e0 de7c8a506c90", "state" "busy" }, "properties" { "name" "my gpu server", "cores" null, "ram" null, "availabilityzone" "auto", "vmstate" null, "bootvolume" null, "cpufamily" null, "type" "gpu", "templateuuid" "e15d15e7 ea9a 48ae a60a 29b9463f4519", "nicmultiqueue" null, "bootcdrom" null }, "entities" { "volumes" { "id" "5de45b21 9b54 4957 b3d6 4af44d0c12cd/volumes", "type" "collection", "href" "\<resource uri>" }, "nics" null } }
