xref: /cloud-hypervisor/vmm/src/api/openapi/cloud-hypervisor.yaml (revision b686a5bb24f949e3b201308d69b01e85c14f1ad6)
1openapi: 3.0.1
2info:
3  title: Cloud Hypervisor API
4  description: Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
5  license:
6    name: Apache 2.0
7    url: http://www.apache.org/licenses/LICENSE-2.0.html
8  version: 0.3.0
9
10servers:
11  - url: http://localhost/api/v1
12
13paths:
14  /vmm.ping:
15    get:
16      summary: Ping the VMM to check for API server availability
17      responses:
18        200:
19          description: The VMM information
20          content:
21            application/json:
22              schema:
23                $ref: "#/components/schemas/VmmPingResponse"
24
25  /vmm.shutdown:
26    put:
27      summary: Shuts the cloud-hypervisor VMM.
28      operationId: shutdownVMM
29      responses:
30        204:
31          description: The VMM successfully shutdown.
32
33  /vm.info:
34    get:
35      summary: Returns general information about the cloud-hypervisor Virtual Machine (VM) instance.
36      responses:
37        200:
38          description: The VM information
39          content:
40            application/json:
41              schema:
42                $ref: "#/components/schemas/VmInfo"
43
44  /vm.counters:
45    get:
46      summary: Get counters from the VM
47      responses:
48        200:
49          description: The VM counters
50          content:
51            application/json:
52              schema:
53                $ref: "#/components/schemas/VmCounters"
54
55  /vm.create:
56    put:
57      summary: Create the cloud-hypervisor Virtual Machine (VM) instance. The instance is not booted, only created.
58      operationId: createVM
59      requestBody:
60        description: The VM configuration
61        content:
62          application/json:
63            schema:
64              $ref: "#/components/schemas/VmConfig"
65        required: true
66      responses:
67        204:
68          description: The VM instance was successfully created.
69
70  /vm.delete:
71    put:
72      summary: Delete the cloud-hypervisor Virtual Machine (VM) instance.
73      operationId: deleteVM
74      responses:
75        204:
76          description: The VM instance was successfully deleted.
77
78  /vm.boot:
79    put:
80      summary: Boot the previously created VM instance.
81      operationId: bootVM
82      responses:
83        204:
84          description: The VM instance successfully booted.
85        404:
86          description: The VM instance could not boot because it is not created yet
87
88  /vm.pause:
89    put:
90      summary: Pause a previously booted VM instance.
91      operationId: pauseVM
92      responses:
93        204:
94          description: The VM instance successfully paused.
95        404:
96          description: The VM instance could not pause because it is not created yet
97        405:
98          description: The VM instance could not pause because it is not booted.
99
100  /vm.resume:
101    put:
102      summary: Resume a previously paused VM instance.
103      operationId: resumeVM
104      responses:
105        204:
106          description: The VM instance successfully paused.
107        404:
108          description: The VM instance could not resume because it is not booted yet
109        405:
110          description: The VM instance could not resume because it is not paused.
111
112  /vm.shutdown:
113    put:
114      summary: Shut the VM instance down.
115      operationId: shutdownVM
116      responses:
117        204:
118          description: The VM instance successfully shut down.
119        404:
120          description: The VM instance could not shut down because is not created.
121        405:
122          description: The VM instance could not shut down because it is not started.
123
124  /vm.reboot:
125    put:
126      summary: Reboot the VM instance.
127      operationId: rebootVM
128      responses:
129        204:
130          description: The VM instance successfully rebooted.
131        404:
132          description: The VM instance could not reboot because it is not created.
133        405:
134          description: The VM instance could not reboot because it is not booted.
135
136  /vm.power-button:
137    put:
138      summary: Trigger a power button in the VM
139      operationId: power-buttonVM
140      responses:
141        204:
142          description: Power button successfully triggered in the VM
143        404:
144          description: The button could not be triggered because it is not created yet
145        405:
146          description: The button could not be triggered because it is not booted.
147
148  /vm.resize:
149    put:
150      summary: Resize the VM
151      requestBody:
152        description: The target size for the VM
153        content:
154          application/json:
155            schema:
156              $ref: "#/components/schemas/VmResize"
157        required: true
158      responses:
159        204:
160          description: The VM instance was successfully resized.
161        404:
162          description: The VM instance could not be resized because it is not created.
163
164  /vm.resize-zone:
165    put:
166      summary: Resize a memory zone
167      requestBody:
168        description: The target size for the memory zone
169        content:
170          application/json:
171            schema:
172              $ref: "#/components/schemas/VmResizeZone"
173        required: true
174      responses:
175        204:
176          description: The memory zone was successfully resized.
177        500:
178          description: The memory zone could not be resized.
179
180  /vm.add-device:
181    put:
182      summary: Add a new device to the VM
183      requestBody:
184        description: The path of the new device
185        content:
186          application/json:
187            schema:
188              $ref: "#/components/schemas/DeviceConfig"
189        required: true
190      responses:
191        200:
192          description: The new device was successfully added to the VM instance.
193          content:
194            application/json:
195              schema:
196                $ref: "#/components/schemas/PciDeviceInfo"
197        204:
198          description: The new device was successfully (cold) added to the VM instance.
199        404:
200          description: The new device could not be added to the VM instance.
201
202  /vm.remove-device:
203    put:
204      summary: Remove a device from the VM
205      requestBody:
206        description: The identifier of the device
207        content:
208          application/json:
209            schema:
210              $ref: "#/components/schemas/VmRemoveDevice"
211        required: true
212      responses:
213        204:
214          description: The device was successfully removed from the VM instance.
215        404:
216          description: The device could not be removed from the VM instance.
217
218  /vm.add-disk:
219    put:
220      summary: Add a new disk to the VM
221      requestBody:
222        description: The details of the new disk
223        content:
224          application/json:
225            schema:
226              $ref: "#/components/schemas/DiskConfig"
227        required: true
228      responses:
229        200:
230          description: The new disk was successfully added to the VM instance.
231          content:
232            application/json:
233              schema:
234                $ref: "#/components/schemas/PciDeviceInfo"
235        204:
236          description: The new disk was successfully (cold) added to the VM instance.
237        500:
238          description: The new disk could not be added to the VM instance.
239
240  /vm.add-fs:
241    put:
242      summary: Add a new virtio-fs device to the VM
243      requestBody:
244        description: The details of the new virtio-fs
245        content:
246          application/json:
247            schema:
248              $ref: "#/components/schemas/FsConfig"
249        required: true
250      responses:
251        200:
252          description: The new device was successfully added to the VM instance.
253          content:
254            application/json:
255              schema:
256                $ref: "#/components/schemas/PciDeviceInfo"
257        204:
258          description: The new device was successfully (cold) added to the VM instance.
259        500:
260          description: The new device could not be added to the VM instance.
261
262  /vm.add-pmem:
263    put:
264      summary: Add a new pmem device to the VM
265      requestBody:
266        description: The details of the new pmem device
267        content:
268          application/json:
269            schema:
270              $ref: "#/components/schemas/PmemConfig"
271        required: true
272      responses:
273        200:
274          description: The new device was successfully added to the VM instance.
275          content:
276            application/json:
277              schema:
278                $ref: "#/components/schemas/PciDeviceInfo"
279        204:
280          description: The new device was successfully (cold) added to the VM instance.
281        500:
282          description: The new device could not be added to the VM instance.
283
284  /vm.add-net:
285    put:
286      summary: Add a new network device to the VM
287      requestBody:
288        description: The details of the new network device
289        content:
290          application/json:
291            schema:
292              $ref: "#/components/schemas/NetConfig"
293        required: true
294      responses:
295        200:
296          description: The new device was successfully added to the VM instance.
297          content:
298            application/json:
299              schema:
300                $ref: "#/components/schemas/PciDeviceInfo"
301        204:
302          description: The new device was successfully (cold) added to the VM instance.
303        500:
304          description: The new device could not be added to the VM instance.
305
306  /vm.add-vsock:
307    put:
308      summary: Add a new vsock device to the VM
309      requestBody:
310        description: The details of the new vsock device
311        content:
312          application/json:
313            schema:
314              $ref: "#/components/schemas/VsockConfig"
315        required: true
316      responses:
317        200:
318          description: The new device was successfully added to the VM instance.
319          content:
320            application/json:
321              schema:
322                $ref: "#/components/schemas/PciDeviceInfo"
323        204:
324          description: The new device was successfully (cold) added to the VM instance.
325        500:
326          description: The new device could not be added to the VM instance.
327
328  /vm.add-vdpa:
329    put:
330      summary: Add a new vDPA device to the VM
331      requestBody:
332        description: The details of the new vDPA device
333        content:
334          application/json:
335            schema:
336              $ref: "#/components/schemas/VdpaConfig"
337        required: true
338      responses:
339        200:
340          description: The new vDPA device was successfully added to the VM instance.
341          content:
342            application/json:
343              schema:
344                $ref: "#/components/schemas/PciDeviceInfo"
345        204:
346          description: The new vDPA device was successfully (cold) added to the VM instance.
347        500:
348          description: The new vDPA device could not be added to the VM instance.
349
350  /vm.add-user-device:
351    put:
352      requestBody:
353        content:
354          application/json:
355            schema:
356              $ref: '#/components/schemas/VmAddUserDevice'
357        description: The path of the new device
358        required: true
359      responses:
360        "200":
361          content:
362            application/json:
363              schema:
364                $ref: '#/components/schemas/PciDeviceInfo'
365          description: The new device was successfully added to the VM instance.
366        "204":
367          description: The new device was successfully (cold) added to the VM instance.
368        "404":
369          description: The new device could not be added to the VM instance.
370      summary: Add a new userspace device to the VM
371
372  /vm.snapshot:
373    put:
374      summary: Returns a VM snapshot.
375      requestBody:
376        description: The snapshot configuration
377        content:
378          application/json:
379            schema:
380              $ref: "#/components/schemas/VmSnapshotConfig"
381        required: true
382      responses:
383        204:
384          description: The VM instance was successfully snapshotted.
385        404:
386          description: The VM instance could not be snapshotted because it is not created.
387        405:
388          description: The VM instance could not be snapshotted because it is not booted.
389
390  /vm.coredump:
391    put:
392      summary: Takes a VM coredump.
393      requestBody:
394        description: The coredump configuration
395        content:
396          application/json:
397            schema:
398              $ref: "#/components/schemas/VmCoredumpData"
399        required: true
400      responses:
401        204:
402          description: The VM instance was successfully coredumped.
403        404:
404          description: The VM instance could not be coredumped because it is not created.
405        405:
406          description: The VM instance could not be coredumped because it is not booted.
407
408  /vmm.nmi:
409    put:
410      summary: Inject an NMI.
411      responses:
412        204:
413          description: The NMI successfully injected.
414
415  /vm.restore:
416    put:
417      summary: Restore a VM from a snapshot.
418      requestBody:
419        description: The restore configuration
420        content:
421          application/json:
422            schema:
423              $ref: "#/components/schemas/RestoreConfig"
424        required: true
425      responses:
426        204:
427          description: The VM instance was successfully restored.
428        404:
429          description: The VM instance could not be restored because it is already created.
430
431  /vm.receive-migration:
432    put:
433      summary: Receive a VM migration from URL
434      requestBody:
435        description: The URL for the reception of migration state
436        content:
437          application/json:
438            schema:
439              $ref: "#/components/schemas/ReceiveMigrationData"
440        required: true
441      responses:
442        204:
443          description: The VM migration was successfully received.
444        500:
445          description: The VM migration could not be received.
446
447  /vm.send-migration:
448    put:
449      summary: Send a VM migration to URL
450      requestBody:
451        description: The URL for sending the migration state
452        content:
453          application/json:
454            schema:
455              $ref: "#/components/schemas/SendMigrationData"
456        required: true
457      responses:
458        204:
459          description: The VM migration was successfully sent.
460        500:
461          description: The VM migration could not be sent.
462
463components:
464  schemas:
465    VmmPingResponse:
466      required:
467        - version
468      type: object
469      properties:
470        build_version:
471          type: string
472        version:
473          type: string
474        pid:
475          type: integer
476          format: int64
477        features:
478          type: array
479          items:
480            type: string
481      description: Virtual Machine Monitor information
482
483    VmInfo:
484      required:
485        - config
486        - state
487      type: object
488      properties:
489        config:
490          $ref: "#/components/schemas/VmConfig"
491        state:
492          type: string
493          enum: [Created, Running, Shutdown, Paused]
494        memory_actual_size:
495          type: integer
496          format: int64
497        device_tree:
498          type: object
499          additionalProperties:
500            $ref: "#/components/schemas/DeviceNode"
501      description: Virtual Machine information
502
503    DeviceNode:
504      type: object
505      properties:
506        id:
507          type: string
508        resources:
509          type: array
510          items:
511            # Rust enum type (with data) which can't be better represented here
512            type: object
513        children:
514          type: array
515          items:
516            type: string
517        pci_bdf:
518          type: string
519
520    VmCounters:
521      type: object
522      additionalProperties:
523        type: object
524        additionalProperties:
525          type: integer
526          format: int64
527
528    PciDeviceInfo:
529      required:
530        - id
531        - bdf
532      type: object
533      properties:
534        id:
535          type: string
536        bdf:
537          type: string
538      description: Information about a PCI device
539
540    PayloadConfig:
541      type: object
542      properties:
543        firmware:
544          type: string
545        kernel:
546          type: string
547        cmdline:
548          type: string
549        initramfs:
550          type: string
551        igvm:
552          type: string
553        host_data:
554          type: string
555      description: Payloads to boot in guest
556
557    VmConfig:
558      required:
559        - payload
560      type: object
561      properties:
562        cpus:
563          $ref: "#/components/schemas/CpusConfig"
564        memory:
565          $ref: "#/components/schemas/MemoryConfig"
566        payload:
567          $ref: "#/components/schemas/PayloadConfig"
568        rate_limit_groups:
569          type: array
570          items:
571            $ref: "#/components/schemas/RateLimitGroupConfig"
572        disks:
573          type: array
574          items:
575            $ref: "#/components/schemas/DiskConfig"
576        net:
577          type: array
578          items:
579            $ref: "#/components/schemas/NetConfig"
580        rng:
581          $ref: "#/components/schemas/RngConfig"
582        balloon:
583          $ref: "#/components/schemas/BalloonConfig"
584        fs:
585          type: array
586          items:
587            $ref: "#/components/schemas/FsConfig"
588        pmem:
589          type: array
590          items:
591            $ref: "#/components/schemas/PmemConfig"
592        serial:
593          $ref: "#/components/schemas/ConsoleConfig"
594        console:
595          $ref: "#/components/schemas/ConsoleConfig"
596        debug_console:
597          $ref: "#/components/schemas/DebugConsoleConfig"
598        devices:
599          type: array
600          items:
601            $ref: "#/components/schemas/DeviceConfig"
602        vdpa:
603          type: array
604          items:
605            $ref: "#/components/schemas/VdpaConfig"
606        vsock:
607          $ref: "#/components/schemas/VsockConfig"
608        sgx_epc:
609          type: array
610          items:
611            $ref: "#/components/schemas/SgxEpcConfig"
612        numa:
613          type: array
614          items:
615            $ref: "#/components/schemas/NumaConfig"
616        iommu:
617          type: boolean
618          default: false
619        watchdog:
620          type: boolean
621          default: false
622        pvpanic:
623          type: boolean
624          default: false
625        pci_segments:
626          type: array
627          items:
628            $ref: "#/components/schemas/PciSegmentConfig"
629        platform:
630          $ref: "#/components/schemas/PlatformConfig"
631        tpm:
632          $ref: "#/components/schemas/TpmConfig"
633        landlock_enable:
634          type: boolean
635          default: false
636        landlock_rules:
637          type: array
638          items:
639            $ref: "#/components/schemas/LandlockConfig"
640      description: Virtual machine configuration
641
642    CpuAffinity:
643      required:
644        - vcpu
645        - host_cpus
646      type: object
647      properties:
648        vcpu:
649          type: integer
650        host_cpus:
651          type: array
652          items:
653            type: integer
654
655    CpuFeatures:
656      type: object
657      properties:
658        amx:
659          type: boolean
660
661    CpuTopology:
662      type: object
663      properties:
664        threads_per_core:
665          type: integer
666        cores_per_die:
667          type: integer
668        dies_per_package:
669          type: integer
670        packages:
671          type: integer
672
673    CpusConfig:
674      required:
675        - boot_vcpus
676        - max_vcpus
677      type: object
678      properties:
679        boot_vcpus:
680          minimum: 1
681          type: integer
682        max_vcpus:
683          minimum: 1
684          type: integer
685        topology:
686          $ref: "#/components/schemas/CpuTopology"
687        kvm_hyperv:
688          type: boolean
689          default: false
690        max_phys_bits:
691          type: integer
692        affinity:
693          type: array
694          items:
695            $ref: "#/components/schemas/CpuAffinity"
696        features:
697          $ref: "#/components/schemas/CpuFeatures"
698
699    PciSegmentConfig:
700      required:
701        - pci_segment
702      type: object
703      properties:
704        pci_segment:
705          type: integer
706          format: int16
707        mmio32_aperture_weight:
708          type: integer
709          format: int32
710        mmio64_aperture_weight:
711          type: integer
712          format: int32
713
714    PlatformConfig:
715      type: object
716      properties:
717        num_pci_segments:
718          type: integer
719          format: int16
720        iommu_segments:
721          type: array
722          items:
723            type: integer
724            format: int16
725        iommu_address_width:
726          type: integer
727          format: uint8
728        serial_number:
729          type: string
730        uuid:
731          type: string
732        oem_strings:
733          type: array
734          items:
735            type: string
736        tdx:
737          type: boolean
738          default: false
739        sev_snp:
740          type: boolean
741          default: false
742
743    MemoryZoneConfig:
744      required:
745        - id
746        - size
747      type: object
748      properties:
749        id:
750          type: string
751        size:
752          type: integer
753          format: int64
754        file:
755          type: string
756        mergeable:
757          type: boolean
758          default: false
759        shared:
760          type: boolean
761          default: false
762        hugepages:
763          type: boolean
764          default: false
765        hugepage_size:
766          type: integer
767          format: int64
768        host_numa_node:
769          type: integer
770          format: int32
771        hotplug_size:
772          type: integer
773          format: int64
774        hotplugged_size:
775          type: integer
776          format: int64
777        prefault:
778          type: boolean
779          default: false
780
781    MemoryConfig:
782      required:
783        - size
784      type: object
785      properties:
786        size:
787          type: integer
788          format: int64
789        hotplug_size:
790          type: integer
791          format: int64
792        hotplugged_size:
793          type: integer
794          format: int64
795        mergeable:
796          type: boolean
797          default: false
798        hotplug_method:
799          type: string
800          default: "Acpi"
801        shared:
802          type: boolean
803          default: false
804        hugepages:
805          type: boolean
806          default: false
807        hugepage_size:
808          type: integer
809          format: int64
810        prefault:
811          type: boolean
812          default: false
813        thp:
814          type: boolean
815          default: true
816        zones:
817          type: array
818          items:
819            $ref: "#/components/schemas/MemoryZoneConfig"
820
821    TokenBucket:
822      required:
823        - size
824        - refill_time
825      type: object
826      properties:
827        size:
828          type: integer
829          format: int64
830          minimum: 0
831          description: The total number of tokens this bucket can hold.
832        one_time_burst:
833          type: integer
834          format: int64
835          minimum: 0
836          description: The initial size of a token bucket.
837        refill_time:
838          type: integer
839          format: int64
840          minimum: 0
841          description: The amount of milliseconds it takes for the bucket to refill.
842      description:
843        Defines a token bucket with a maximum capacity (_size_), an initial burst size
844        (_one_time_burst_) and an interval for refilling purposes (_refill_time_).
845        The refill-rate is derived from _size_ and _refill_time_, and it is the constant
846        rate at which the tokens replenish. The refill process only starts happening after
847        the initial burst budget is consumed.
848        Consumption from the token bucket is unbounded in speed which allows for bursts
849        bound in size by the amount of tokens available.
850        Once the token bucket is empty, consumption speed is bound by the refill-rate.
851
852    RateLimiterConfig:
853      type: object
854      properties:
855        bandwidth:
856          $ref: "#/components/schemas/TokenBucket"
857        ops:
858          $ref: "#/components/schemas/TokenBucket"
859      description:
860        Defines an IO rate limiter with independent bytes/s and ops/s limits.
861        Limits are defined by configuring each of the _bandwidth_ and _ops_ token buckets.
862
863    RateLimitGroupConfig:
864      required:
865        - id
866        - rate_limiter_config
867      type: object
868      properties:
869        id:
870          type: string
871        rate_limiter_config:
872          $ref: "#/components/schemas/RateLimiterConfig"
873
874    VirtQueueAffinity:
875      required:
876        - queue_index
877        - host_cpus
878      type: object
879      properties:
880        queue_index:
881          type: integer
882        host_cpus:
883          type: array
884          items:
885            type: integer
886
887    DiskConfig:
888      required:
889        - path
890      type: object
891      properties:
892        path:
893          type: string
894        readonly:
895          type: boolean
896          default: false
897        direct:
898          type: boolean
899          default: false
900        iommu:
901          type: boolean
902          default: false
903        num_queues:
904          type: integer
905          default: 1
906        queue_size:
907          type: integer
908          default: 128
909        vhost_user:
910          type: boolean
911          default: false
912        vhost_socket:
913          type: string
914        rate_limiter_config:
915          $ref: "#/components/schemas/RateLimiterConfig"
916        pci_segment:
917          type: integer
918          format: int16
919        id:
920          type: string
921        serial:
922          type: string
923        rate_limit_group:
924          type: string
925        queue_affinity:
926          type: array
927          items:
928            $ref: "#/components/schemas/VirtQueueAffinity"
929
930    NetConfig:
931      type: object
932      properties:
933        tap:
934          type: string
935        ip:
936          type: string
937          default: "192.168.249.1"
938        mask:
939          type: string
940          default: "255.255.255.0"
941        mac:
942          type: string
943        host_mac:
944          type: string
945        mtu:
946          type: integer
947        iommu:
948          type: boolean
949          default: false
950        num_queues:
951          type: integer
952          default: 2
953        queue_size:
954          type: integer
955          default: 256
956        vhost_user:
957          type: boolean
958          default: false
959        vhost_socket:
960          type: string
961        vhost_mode:
962          type: string
963          default: "Client"
964        id:
965          type: string
966        pci_segment:
967          type: integer
968          format: int16
969        rate_limiter_config:
970          $ref: "#/components/schemas/RateLimiterConfig"
971
972    RngConfig:
973      required:
974        - src
975      type: object
976      properties:
977        src:
978          type: string
979        iommu:
980          type: boolean
981          default: false
982
983    BalloonConfig:
984      required:
985        - size
986      type: object
987      properties:
988        size:
989          type: integer
990          format: int64
991        deflate_on_oom:
992          type: boolean
993          default: false
994          description: Deflate balloon when the guest is under memory pressure.
995        free_page_reporting:
996          type: boolean
997          default: false
998          description: Enable guest to report free pages.
999
1000    FsConfig:
1001      required:
1002        - num_queues
1003        - queue_size
1004        - socket
1005        - tag
1006      type: object
1007      properties:
1008        tag:
1009          type: string
1010        socket:
1011          type: string
1012        num_queues:
1013          type: integer
1014          default: 1
1015        queue_size:
1016          type: integer
1017          default: 1024
1018        pci_segment:
1019          type: integer
1020          format: int16
1021        id:
1022          type: string
1023
1024    PmemConfig:
1025      required:
1026        - file
1027      type: object
1028      properties:
1029        file:
1030          type: string
1031        size:
1032          type: integer
1033          format: int64
1034        iommu:
1035          type: boolean
1036          default: false
1037        discard_writes:
1038          type: boolean
1039          default: false
1040        pci_segment:
1041          type: integer
1042          format: int16
1043        id:
1044          type: string
1045
1046    ConsoleConfig:
1047      required:
1048        - mode
1049      type: object
1050      properties:
1051        file:
1052          type: string
1053        socket:
1054          type: string
1055        mode:
1056          type: string
1057          enum: ["Off", "Pty", "Tty", "File", "Socket", "Null"]
1058        iommu:
1059          type: boolean
1060          default: false
1061
1062    DebugConsoleConfig:
1063      required:
1064        - mode
1065      type: object
1066      properties:
1067        file:
1068          type: string
1069        mode:
1070          type: string
1071          enum: ["Off", "Pty", "Tty", "File", "Null"]
1072        iobase:
1073          type: integer
1074
1075    DeviceConfig:
1076      required:
1077        - path
1078      type: object
1079      properties:
1080        path:
1081          type: string
1082        iommu:
1083          type: boolean
1084          default: false
1085        pci_segment:
1086          type: integer
1087          format: int16
1088        id:
1089          type: string
1090        x_nv_gpudirect_clique:
1091          type: integer
1092          format: int8
1093    TpmConfig:
1094      required:
1095        - socket
1096      type: object
1097      properties:
1098        socket:
1099          type: string
1100
1101    VdpaConfig:
1102      required:
1103        - path
1104        - num_queues
1105      type: object
1106      properties:
1107        path:
1108          type: string
1109        num_queues:
1110          type: integer
1111          default: 1
1112        iommu:
1113          type: boolean
1114          default: false
1115        pci_segment:
1116          type: integer
1117          format: int16
1118        id:
1119          type: string
1120
1121    VsockConfig:
1122      required:
1123        - cid
1124        - socket
1125      type: object
1126      properties:
1127        cid:
1128          type: integer
1129          format: int64
1130          minimum: 3
1131          description: Guest Vsock CID
1132        socket:
1133          type: string
1134          description: Path to UNIX domain socket, used to proxy vsock connections.
1135        iommu:
1136          type: boolean
1137          default: false
1138        pci_segment:
1139          type: integer
1140          format: int16
1141        id:
1142          type: string
1143
1144    SgxEpcConfig:
1145      required:
1146        - id
1147        - size
1148      type: object
1149      properties:
1150        id:
1151          type: string
1152        size:
1153          type: integer
1154          format: int64
1155        prefault:
1156          type: boolean
1157          default: false
1158
1159    NumaDistance:
1160      required:
1161        - destination
1162        - distance
1163      type: object
1164      properties:
1165        destination:
1166          type: integer
1167          format: int32
1168        distance:
1169          type: integer
1170          format: int32
1171
1172    NumaConfig:
1173      required:
1174        - guest_numa_id
1175      type: object
1176      properties:
1177        guest_numa_id:
1178          type: integer
1179          format: int32
1180        cpus:
1181          type: array
1182          items:
1183            type: integer
1184            format: int32
1185        distances:
1186          type: array
1187          items:
1188            $ref: "#/components/schemas/NumaDistance"
1189        memory_zones:
1190          type: array
1191          items:
1192            type: string
1193        sgx_epc_sections:
1194          type: array
1195          items:
1196            type: string
1197        pci_segments:
1198          type: array
1199          items:
1200            type: integer
1201            format: int32
1202
1203    VmResize:
1204      type: object
1205      properties:
1206        desired_vcpus:
1207          minimum: 1
1208          type: integer
1209        desired_ram:
1210          description: desired memory ram in bytes
1211          type: integer
1212          format: int64
1213        desired_balloon:
1214          description: desired balloon size in bytes
1215          type: integer
1216          format: int64
1217
1218    VmResizeZone:
1219      type: object
1220      properties:
1221        id:
1222          type: string
1223        desired_ram:
1224          description: desired memory zone size in bytes
1225          type: integer
1226          format: int64
1227
1228    VmRemoveDevice:
1229      type: object
1230      properties:
1231        id:
1232          type: string
1233
1234    VmSnapshotConfig:
1235      type: object
1236      properties:
1237        destination_url:
1238          type: string
1239
1240    VmCoredumpData:
1241      type: object
1242      properties:
1243        destination_url:
1244          type: string
1245
1246    RestoreConfig:
1247      required:
1248        - source_url
1249      type: object
1250      properties:
1251        source_url:
1252          type: string
1253        prefault:
1254          type: boolean
1255
1256    ReceiveMigrationData:
1257      required:
1258        - receiver_url
1259      type: object
1260      properties:
1261        receiver_url:
1262          type: string
1263
1264    SendMigrationData:
1265      required:
1266        - destination_url
1267      type: object
1268      properties:
1269        destination_url:
1270          type: string
1271        local:
1272          type: boolean
1273
1274    VmAddUserDevice:
1275      required:
1276        - socket
1277      type: object
1278      properties:
1279        socket:
1280          type: string
1281
1282    LandlockConfig:
1283      required:
1284        - path
1285        - access
1286      type: object
1287      properties:
1288        path:
1289          type: string
1290        access:
1291          type: string
1292