vms

Create a VM

post/vms

Response

VM resource was successfully created

namestring

VM name

imagestring

VM image for this VM

imagePullPolicy'IfNotPresent' | 'Always'

VM image pull policy

cpunumber

Number of CPUs assigned to this VM

memorynumber

Amount of RAM in megabytes assigned to this VM

diskSizenumber

Disk size for this VM

net-softnetboolean

Whether to use Softnet network isolation

net-bridgedstring

Whether to use bridged network mode

headlessboolean

Whether to run without graphics

nestedboolean

Enable nested virtualization

status'pending' | 'running' | 'failed'

VM status

status_messagestring

VM status message

workerstring

Worker on which the VM was assigned to

usernamestring

SSH username to use when connecting to a VM

passwordstring

SSH password to use when connecting to a VM

restart_policy'Never' | 'OnFailure'

VM restart policy: specify "Never" to never restart or "OnFailure" to only restart when the VM fails

resourcesobject

Resources required by this VM on the worker

labelsobject

Labels required by this VM on the worker

Example response

{
  "name": "macos-tahoe-base",
  "image": "ghcr.io/cirruslabs/macos-tahoe-base:latest",
  "diskSize": 100,
  "net-bridged": "en0",
  "startup_script": {
    "script_content": "#!/bin/zsh\n\necho $GREETING\n",
    "env": {
      "GREETING": "Hello, World!"
    }
  },
  "resources": {
    "org.cirruslabs.logical-cores": 4,
    "org.cirruslabs.memory-mib": 8192
  },
  "labels": {
    "model": "macstudio"
  },
  "hostDirs": [
    {
      "path": "/path/on/host/to/sources",
      "ro": true
    },
    {
      "path": "/path/on/host/to/builds"
    }
  ]
}

Changes