JSON payload to create a VM using the Nutanix Prism Element v2.0 APIs. Please make sure you replace all {{variable}} instances with values appropriate for your environment and the ssh-rsa key with an SSH public key valid for your virtual machines.
{
"name": "{{vm_name}}",
"memory_mb": 4096,
"num_vcpus": 2,
"description": "",
"num_cores_per_vcpu": 1,
"timezone": "UTC",
"boot": {
"uefi_boot": false,
"boot_device_order": [
"CDROM",
"DISK",
"NIC"
]
},
"vm_disks": [
{
"is_cdrom": false,
"disk_address": {
"device_bus": "scsi"
},
"vm_disk_clone": {
"disk_address": {
"vmdisk_uuid": "{{cloud_init_image_uuid}}"
},
"minimum_size": 10737418240
}
}
],
"vm_nics": [
{
"network_uuid": "{{subnet_uuid}}",
"is_connected": true
}
],
"hypervisor_type": "ACROPOLIS",
"vm_customization_config": {
"userdata": "#cloud-config\nusers:\n - name: nutanix\n ssh-authorized-keys:\n - ssh-rsa KEY\n sudo: ['ALL=(ALL) NOPASSWD:ALL']\n groups: sudo\n shell: /bin/bash",
"files_to_inject_list": []
},
"vm_features": {
"AGENT_VM": false
}
}