diff --git a/docs/api.md b/docs/api.md index 5ffd07194..219af8694 100644 --- a/docs/api.md +++ b/docs/api.md @@ -89,6 +89,7 @@ Trigger power button of the VM | `/vm.power-button` | N/A Pause the VM | `/vm.pause` | N/A | N/A | The VM is booted Resume the VM | `/vm.resume` | N/A | N/A | The VM is paused Task a snapshot of the VM | `/vm.snapshot` | `/schemas/VmSnapshotConfig`| N/A | The VM is paused +Perform a coredump of the VM | `/vm.coredump` | `/schemas/VmCoredumpData` | N/A | The VM is paused Restore the VM from a snapshot | `/vm.restore` | `/schemas/RestoreConfig` | N/A | The VM is created but not booted Add/remove CPUs to/from the VM | `/vm.resize` | `/schemas/VmResize` | N/A | The VM is booted Add/remove memory from the VM | `/vm.resize` | `/schemas/VmResize` | N/A | The VM is booted diff --git a/vmm/src/api/openapi/cloud-hypervisor.yaml b/vmm/src/api/openapi/cloud-hypervisor.yaml index d3fbdbf14..d8b8ed5f2 100644 --- a/vmm/src/api/openapi/cloud-hypervisor.yaml +++ b/vmm/src/api/openapi/cloud-hypervisor.yaml @@ -366,6 +366,24 @@ paths: 405: description: The VM instance could not be snapshotted because it is not booted. + /vm.coredump: + put: + summary: Takes a VM coredump. + requestBody: + description: The coredump configuration + content: + application/json: + schema: + $ref: '#/components/schemas/VmCoredumpData' + required: true + responses: + 204: + description: The VM instance was successfully coredumped. + 404: + description: The VM instance could not be coredumped because it is not created. + 405: + description: The VM instance could not be coredumped because it is not booted. + /vm.restore: put: summary: Restore a VM from a snapshot. @@ -1098,6 +1116,12 @@ components: destination_url: type: string + VmCoredumpData: + type: object + properties: + destination_url: + type: string + RestoreConfig: required: - source_url