vmm: api: Introduce new "add-device" HTTP endpoint

This commit introduces the new command "add-device" that will let a user
hotplug a VFIO PCI device to an already running VM.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
Sebastien Boeuf
2020-02-27 14:00:46 +01:00
committed by Rob Bradford
parent 0f1396acef
commit 0e58741a09
7 changed files with 134 additions and 4 deletions

View File

@@ -139,6 +139,22 @@ paths:
404:
description: The VM instance could not be resized because it is not created.
/vm.add-device:
put:
summary: Add a new device to the VM
requestBody:
description: The path of the new device
content:
application/json:
schema:
$ref: '#/components/schemas/VmAddDevice'
required: true
responses:
204:
description: The new device was successfully added to the VM instance.
404:
description: The new device could not be added to the VM instance.
components:
schemas:
@@ -427,3 +443,9 @@ components:
type: integer
desired_ram:
type: integer
VmAddDevice:
type: object
properties:
path:
type: string