Cloud-init user-data
Configure a VM on its first boot with cloud-init user-data, on both Linux and Windows images.
Passing user-data
POST /v3/flexVM/clouds/{cloudUuid}/vms
Host: api.i3d.net
PRIVATE-TOKEN: YOUR_API_KEY
Content-Type: application/json
{
"name": "development.ubuntu-2404",
"description": "DB1 VM",
"image_name": "ubuntu-2404-server-amd64",
"instance_type_name": "vm.gpu.1rtx4000.30c.240g",
"user_data": {
"data": "#cloud-config\nusers:\n - name: deploy\n sudo: ALL=(ALL) NOPASSWD:ALL\n shell: /bin/bash\n ssh_authorized_keys:\n - ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHwdgjY0AlmkeLknBpoVmJg/quNSifyBHEK1MREpV4Ri john.doe@i3d.net\npackage_update: true\npackages:\n - htop\n",
"is_base64": false
}
}ssh_keys or user_data
Request
Result
Format and size
Write-only and immutable
Linux images
Windows images
Example: enable OpenSSH with a key, without a password
Example: enable OpenSSH, rotate the default Administrator password
Example: Enable OpenSSH, RDP and rotate the default Administrator password
Example: enable WinRM, rotate the default Administrator password
Bringing your own Windows image
Troubleshooting
Last updated
Was this helpful?