Fork an instance from stopped, standby, or running (with from_running=true)
/instances/{id}/fork
Fork an instance from stopped, standby, or running (with from_running=true)
Path Parameters
id: string
Body Parameters
name: string
Name for the forked instance (lowercase letters, digits, and dashes only; cannot start or end with a dash)
maxLength63
from_running: optional boolean
Allow forking from a running source instance. When true and source is Running, the source is put into standby, forked, then restored back to Running.
Returns
Fork an instance from stopped, standby, or running (with from_running=true)
curl http://localhost:8080/instances/$ID/fork \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $HYPEMAN_API_KEY" \
-d '{
"name": "my-workload-1-fork",
"target_state": "Running"
}'
{
"id": "tz4a98xxat96iws9zmbrgj3a",
"created_at": "2025-01-15T10:30:00Z",
"image": "docker.io/library/alpine:latest",
"name": "my-workload-1",
"state": "Created",
"disk_io_bps": "100MB/s",
"env": {
"foo": "string"
},
"exit_code": 137,
"exit_message": "killed by signal 9 (SIGKILL)",
"gpu": {
"mdev_uuid": "aa618089-8b16-4d01-a136-25a0f3c73123",
"profile": "L40S-1Q"
},
"has_snapshot": false,
"hotplug_size": "2GB",
"hypervisor": "cloud-hypervisor",
"network": {
"bandwidth_download": "125MB/s",
"bandwidth_upload": "125MB/s",
"enabled": true,
"ip": "192.168.100.10",
"mac": "02:00:00:ab:cd:ef",
"name": "default"
},
"overlay_size": "10GB",
"size": "2GB",
"started_at": "2025-01-15T10:30:05Z",
"state_error": "failed to query VMM: connection refused",
"stopped_at": "2025-01-15T12:30:00Z",
"tags": {
"team": "backend",
"env": "staging"
},
"vcpus": 2,
"volumes": [
{
"mount_path": "/mnt/data",
"volume_id": "vol-abc123",
"overlay": true,
"overlay_size": "1GB",
"readonly": true
}
]
}
Returns Examples
{
"id": "tz4a98xxat96iws9zmbrgj3a",
"created_at": "2025-01-15T10:30:00Z",
"image": "docker.io/library/alpine:latest",
"name": "my-workload-1",
"state": "Created",
"disk_io_bps": "100MB/s",
"env": {
"foo": "string"
},
"exit_code": 137,
"exit_message": "killed by signal 9 (SIGKILL)",
"gpu": {
"mdev_uuid": "aa618089-8b16-4d01-a136-25a0f3c73123",
"profile": "L40S-1Q"
},
"has_snapshot": false,
"hotplug_size": "2GB",
"hypervisor": "cloud-hypervisor",
"network": {
"bandwidth_download": "125MB/s",
"bandwidth_upload": "125MB/s",
"enabled": true,
"ip": "192.168.100.10",
"mac": "02:00:00:ab:cd:ef",
"name": "default"
},
"overlay_size": "10GB",
"size": "2GB",
"started_at": "2025-01-15T10:30:05Z",
"state_error": "failed to query VMM: connection refused",
"stopped_at": "2025-01-15T12:30:00Z",
"tags": {
"team": "backend",
"env": "staging"
},
"vcpus": 2,
"volumes": [
{
"mount_path": "/mnt/data",
"volume_id": "vol-abc123",
"overlay": true,
"overlay_size": "1GB",
"readonly": true
}
]
}