Skip to main content

Guide

Create and Access a VM

This workflow covers the common provisioning path: create a project, decide how the VM will receive SSH access, submit the VM request, and fetch the resulting VM resource for later operations.

Create the project

Projects are the parent scope for the VM and most of the resources you will touch afterward.

curl --request POST \
  --url 'https://client-api.dc.dev.k8s.zenno.services/projects' \
  --header 'X-API-Key: <api-key>' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{
"name": "automation-project"
}'

Prepare access inputs

  • Use sshPublicKeys when your client already has raw OpenSSH public keys.

  • Use sshKeyIds when you want to reuse project-level SSH keys.

  • Decide whether the VM should request a public IP at creation time via publicIpMode.

Create the VM

The example below uses existing project SSH keys, requests a new public IP, and attaches one private network identifier. Adapt the payload to your own provisioning inputs.

curl --request POST \
  --url 'https://client-api.dc.dev.k8s.zenno.services/projects/{projectId}/vms' \
  --header 'X-API-Key: <api-key>' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{
"tariffId": "00000000-0000-0000-0000-000000000000",
"imageId": "00000000-0000-0000-0000-000000000000",
"vmName": "worker-01",
"sshKeyIds": [
  "00000000-0000-0000-0000-000000000000"
],
"publicIpMode": "New",
"privateNetworkIds": [
  "00000000-0000-0000-0000-000000000000"
]
}'
  1. 1

    Resolve image and tariff identifiers

    Query the image and tariff catalogs before building the VM payload so the request uses live identifiers.

  2. 2

    Create the project and keep its identifier

    You will reuse the same projectId for VM, SSH key, network, and backup calls.

  3. 3

    Create or select SSH access inputs

    Either create project SSH keys ahead of time or embed raw public keys directly in the VM creation request.

  4. 4

    Submit the VM creation request

    Expect a command-oriented response. The VM itself should be fetched afterward to inspect operation state and network attachments.

  5. 5

    Fetch the VM details

    Read the VM resource to confirm identifiers, sizing, interfaces, and any subsequent action you need to take.

Expected result

A successful flow leaves you with a created VM resource, its identifier, and a clear record of how access and initial networking were declared in the request.

Implementation note

The create response may include a command identifier and an optional password field. Treat the VM resource as the authoritative place to inspect ongoing status after the request is accepted.