Creating and Deleting a VM
Create a VM via the API
Use the POST /v3/flexVM/clouds/{cloudUuid}/vms endpoint with a JSON body.
Example request:
POST /v3/flexVM/clouds/{cloudUuid}/vms
Host: api.i3d.net
PRIVATE-TOKEN: YOUR_API_KEY
Content-Type: application/json
{
"description": "DB1 VM",
"image_name": "ubuntu-2404-server-amd64",
"instance_type_name": "vm.gpu.1rtx4000.30c.240g",
"name": "development.ubuntu-2404",
"ssh_keys": [
"ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTuRa6Gtysdg2EF+SIXheVFVpHJrKYs4kWfNoHQg8ZG6PH4= ecdsa-key-20240131"
],
"tags": [
"project:odyssey",
"env:build"
]
}Configuring access and first boot
The example above uses ssh_keys, which is the shortest path to a reachable Linux VM: FlexVM installs the keys on the default user for you.
Instead of ssh_keys you can pass a user_data object, which is processed by cloud-init on the VM's first boot. Use it to create your own users, install packages, write files, or run a provisioning script — on Linux as well as Windows. ssh_keys and user_data cannot be combined, and providing user_data makes you responsible for configuring access. See Cloud-init user-data.
Create a VM with Terraform
You can also create a VM with the i3D.net Terraform provider — see Using Terraform.
Deleting a VM
Use the DELETE /v3/flexVM/clouds/{cloudUuid}/vms/{vmUuid} endpoint. No request body is required.
Example request:
The VM's local LVM disk and NVMe passthrough disk are immediately wiped.
Last updated
Was this helpful?