xref: /cloud-hypervisor/vmm/src/api/openapi/cloud-hypervisor.yaml (revision 4ad44caa5217cf55eed512fc10fd68416a37d31c)
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      description: Payloads to boot in guest
552
553    VmConfig:
554      required:
555        - payload
556      type: object
557      properties:
558        cpus:
559          $ref: "#/components/schemas/CpusConfig"
560        memory:
561          $ref: "#/components/schemas/MemoryConfig"
562        payload:
563          $ref: "#/components/schemas/PayloadConfig"
564        rate_limit_groups:
565          type: array
566          items:
567            $ref: "#/components/schemas/RateLimitGroupConfig"
568        disks:
569          type: array
570          items:
571            $ref: "#/components/schemas/DiskConfig"
572        net:
573          type: array
574          items:
575            $ref: "#/components/schemas/NetConfig"
576        rng:
577          $ref: "#/components/schemas/RngConfig"
578        balloon:
579          $ref: "#/components/schemas/BalloonConfig"
580        fs:
581          type: array
582          items:
583            $ref: "#/components/schemas/FsConfig"
584        pmem:
585          type: array
586          items:
587            $ref: "#/components/schemas/PmemConfig"
588        serial:
589          $ref: "#/components/schemas/ConsoleConfig"
590        console:
591          $ref: "#/components/schemas/ConsoleConfig"
592        debug_console:
593          $ref: "#/components/schemas/DebugConsoleConfig"
594        devices:
595          type: array
596          items:
597            $ref: "#/components/schemas/DeviceConfig"
598        vdpa:
599          type: array
600          items:
601            $ref: "#/components/schemas/VdpaConfig"
602        vsock:
603          $ref: "#/components/schemas/VsockConfig"
604        sgx_epc:
605          type: array
606          items:
607            $ref: "#/components/schemas/SgxEpcConfig"
608        numa:
609          type: array
610          items:
611            $ref: "#/components/schemas/NumaConfig"
612        iommu:
613          type: boolean
614          default: false
615        watchdog:
616          type: boolean
617          default: false
618        pvpanic:
619          type: boolean
620          default: false
621        pci_segments:
622          type: array
623          items:
624            $ref: "#/components/schemas/PciSegmentConfig"
625        platform:
626          $ref: "#/components/schemas/PlatformConfig"
627        tpm:
628          $ref: "#/components/schemas/TpmConfig"
629        landlock_enable:
630          type: boolean
631          default: false
632        landlock_rules:
633          type: array
634          items:
635            $ref: "#/components/schemas/LandlockConfig"
636      description: Virtual machine configuration
637
638    CpuAffinity:
639      required:
640        - vcpu
641        - host_cpus
642      type: object
643      properties:
644        vcpu:
645          type: integer
646        host_cpus:
647          type: array
648          items:
649            type: integer
650
651    CpuFeatures:
652      type: object
653      properties:
654        amx:
655          type: boolean
656
657    CpuTopology:
658      type: object
659      properties:
660        threads_per_core:
661          type: integer
662        cores_per_die:
663          type: integer
664        dies_per_package:
665          type: integer
666        packages:
667          type: integer
668
669    CpusConfig:
670      required:
671        - boot_vcpus
672        - max_vcpus
673      type: object
674      properties:
675        boot_vcpus:
676          minimum: 1
677          type: integer
678        max_vcpus:
679          minimum: 1
680          type: integer
681        topology:
682          $ref: "#/components/schemas/CpuTopology"
683        kvm_hyperv:
684          type: boolean
685          default: false
686        max_phys_bits:
687          type: integer
688        affinity:
689          type: array
690          items:
691            $ref: "#/components/schemas/CpuAffinity"
692        features:
693          $ref: "#/components/schemas/CpuFeatures"
694
695    PciSegmentConfig:
696      required:
697        - pci_segment
698      type: object
699      properties:
700        pci_segment:
701          type: integer
702          format: int16
703        mmio32_aperture_weight:
704          type: integer
705          format: int32
706        mmio64_aperture_weight:
707          type: integer
708          format: int32
709
710    PlatformConfig:
711      type: object
712      properties:
713        num_pci_segments:
714          type: integer
715          format: int16
716        iommu_segments:
717          type: array
718          items:
719            type: integer
720            format: int16
721        serial_number:
722          type: string
723        uuid:
724          type: string
725        oem_strings:
726          type: array
727          items:
728            type: string
729        tdx:
730          type: boolean
731          default: false
732
733    MemoryZoneConfig:
734      required:
735        - id
736        - size
737      type: object
738      properties:
739        id:
740          type: string
741        size:
742          type: integer
743          format: int64
744        file:
745          type: string
746        mergeable:
747          type: boolean
748          default: false
749        shared:
750          type: boolean
751          default: false
752        hugepages:
753          type: boolean
754          default: false
755        hugepage_size:
756          type: integer
757          format: int64
758        host_numa_node:
759          type: integer
760          format: int32
761        hotplug_size:
762          type: integer
763          format: int64
764        hotplugged_size:
765          type: integer
766          format: int64
767        prefault:
768          type: boolean
769          default: false
770
771    MemoryConfig:
772      required:
773        - size
774      type: object
775      properties:
776        size:
777          type: integer
778          format: int64
779        hotplug_size:
780          type: integer
781          format: int64
782        hotplugged_size:
783          type: integer
784          format: int64
785        mergeable:
786          type: boolean
787          default: false
788        hotplug_method:
789          type: string
790          default: "Acpi"
791        shared:
792          type: boolean
793          default: false
794        hugepages:
795          type: boolean
796          default: false
797        hugepage_size:
798          type: integer
799          format: int64
800        prefault:
801          type: boolean
802          default: false
803        thp:
804          type: boolean
805          default: true
806        zones:
807          type: array
808          items:
809            $ref: "#/components/schemas/MemoryZoneConfig"
810
811    TokenBucket:
812      required:
813        - size
814        - refill_time
815      type: object
816      properties:
817        size:
818          type: integer
819          format: int64
820          minimum: 0
821          description: The total number of tokens this bucket can hold.
822        one_time_burst:
823          type: integer
824          format: int64
825          minimum: 0
826          description: The initial size of a token bucket.
827        refill_time:
828          type: integer
829          format: int64
830          minimum: 0
831          description: The amount of milliseconds it takes for the bucket to refill.
832      description:
833        Defines a token bucket with a maximum capacity (_size_), an initial burst size
834        (_one_time_burst_) and an interval for refilling purposes (_refill_time_).
835        The refill-rate is derived from _size_ and _refill_time_, and it is the constant
836        rate at which the tokens replenish. The refill process only starts happening after
837        the initial burst budget is consumed.
838        Consumption from the token bucket is unbounded in speed which allows for bursts
839        bound in size by the amount of tokens available.
840        Once the token bucket is empty, consumption speed is bound by the refill-rate.
841
842    RateLimiterConfig:
843      type: object
844      properties:
845        bandwidth:
846          $ref: "#/components/schemas/TokenBucket"
847        ops:
848          $ref: "#/components/schemas/TokenBucket"
849      description:
850        Defines an IO rate limiter with independent bytes/s and ops/s limits.
851        Limits are defined by configuring each of the _bandwidth_ and _ops_ token buckets.
852
853    RateLimitGroupConfig:
854      required:
855        - id
856        - rate_limiter_config
857      type: object
858      properties:
859        id:
860          type: string
861        rate_limiter_config:
862          $ref: "#/components/schemas/RateLimiterConfig"
863
864    VirtQueueAffinity:
865      required:
866        - queue_index
867        - host_cpus
868      type: object
869      properties:
870        queue_index:
871          type: integer
872        host_cpus:
873          type: array
874          items:
875            type: integer
876
877    DiskConfig:
878      required:
879        - path
880      type: object
881      properties:
882        path:
883          type: string
884        readonly:
885          type: boolean
886          default: false
887        direct:
888          type: boolean
889          default: false
890        iommu:
891          type: boolean
892          default: false
893        num_queues:
894          type: integer
895          default: 1
896        queue_size:
897          type: integer
898          default: 128
899        vhost_user:
900          type: boolean
901          default: false
902        vhost_socket:
903          type: string
904        rate_limiter_config:
905          $ref: "#/components/schemas/RateLimiterConfig"
906        pci_segment:
907          type: integer
908          format: int16
909        id:
910          type: string
911        serial:
912          type: string
913        rate_limit_group:
914          type: string
915        queue_affinity:
916          type: array
917          items:
918            $ref: "#/components/schemas/VirtQueueAffinity"
919
920    NetConfig:
921      type: object
922      properties:
923        tap:
924          type: string
925        ip:
926          type: string
927          default: "192.168.249.1"
928        mask:
929          type: string
930          default: "255.255.255.0"
931        mac:
932          type: string
933        host_mac:
934          type: string
935        mtu:
936          type: integer
937        iommu:
938          type: boolean
939          default: false
940        num_queues:
941          type: integer
942          default: 2
943        queue_size:
944          type: integer
945          default: 256
946        vhost_user:
947          type: boolean
948          default: false
949        vhost_socket:
950          type: string
951        vhost_mode:
952          type: string
953          default: "Client"
954        id:
955          type: string
956        pci_segment:
957          type: integer
958          format: int16
959        rate_limiter_config:
960          $ref: "#/components/schemas/RateLimiterConfig"
961
962    RngConfig:
963      required:
964        - src
965      type: object
966      properties:
967        src:
968          type: string
969        iommu:
970          type: boolean
971          default: false
972
973    BalloonConfig:
974      required:
975        - size
976      type: object
977      properties:
978        size:
979          type: integer
980          format: int64
981        deflate_on_oom:
982          type: boolean
983          default: false
984          description: Deflate balloon when the guest is under memory pressure.
985        free_page_reporting:
986          type: boolean
987          default: false
988          description: Enable guest to report free pages.
989
990    FsConfig:
991      required:
992        - num_queues
993        - queue_size
994        - socket
995        - tag
996      type: object
997      properties:
998        tag:
999          type: string
1000        socket:
1001          type: string
1002        num_queues:
1003          type: integer
1004          default: 1
1005        queue_size:
1006          type: integer
1007          default: 1024
1008        pci_segment:
1009          type: integer
1010          format: int16
1011        id:
1012          type: string
1013
1014    PmemConfig:
1015      required:
1016        - file
1017      type: object
1018      properties:
1019        file:
1020          type: string
1021        size:
1022          type: integer
1023          format: int64
1024        iommu:
1025          type: boolean
1026          default: false
1027        discard_writes:
1028          type: boolean
1029          default: false
1030        pci_segment:
1031          type: integer
1032          format: int16
1033        id:
1034          type: string
1035
1036    ConsoleConfig:
1037      required:
1038        - mode
1039      type: object
1040      properties:
1041        file:
1042          type: string
1043        socket:
1044          type: string
1045        mode:
1046          type: string
1047          enum: ["Off", "Pty", "Tty", "File", "Socket", "Null"]
1048        iommu:
1049          type: boolean
1050          default: false
1051
1052    DebugConsoleConfig:
1053      required:
1054        - mode
1055      type: object
1056      properties:
1057        file:
1058          type: string
1059        mode:
1060          type: string
1061          enum: ["Off", "Pty", "Tty", "File", "Null"]
1062        iobase:
1063          type: integer
1064
1065    DeviceConfig:
1066      required:
1067        - path
1068      type: object
1069      properties:
1070        path:
1071          type: string
1072        iommu:
1073          type: boolean
1074          default: false
1075        pci_segment:
1076          type: integer
1077          format: int16
1078        id:
1079          type: string
1080        x_nv_gpudirect_clique:
1081          type: integer
1082          format: int8
1083    TpmConfig:
1084      required:
1085        - socket
1086      type: object
1087      properties:
1088        socket:
1089          type: string
1090
1091    VdpaConfig:
1092      required:
1093        - path
1094        - num_queues
1095      type: object
1096      properties:
1097        path:
1098          type: string
1099        num_queues:
1100          type: integer
1101          default: 1
1102        iommu:
1103          type: boolean
1104          default: false
1105        pci_segment:
1106          type: integer
1107          format: int16
1108        id:
1109          type: string
1110
1111    VsockConfig:
1112      required:
1113        - cid
1114        - socket
1115      type: object
1116      properties:
1117        cid:
1118          type: integer
1119          format: int64
1120          minimum: 3
1121          description: Guest Vsock CID
1122        socket:
1123          type: string
1124          description: Path to UNIX domain socket, used to proxy vsock connections.
1125        iommu:
1126          type: boolean
1127          default: false
1128        pci_segment:
1129          type: integer
1130          format: int16
1131        id:
1132          type: string
1133
1134    SgxEpcConfig:
1135      required:
1136        - id
1137        - size
1138      type: object
1139      properties:
1140        id:
1141          type: string
1142        size:
1143          type: integer
1144          format: int64
1145        prefault:
1146          type: boolean
1147          default: false
1148
1149    NumaDistance:
1150      required:
1151        - destination
1152        - distance
1153      type: object
1154      properties:
1155        destination:
1156          type: integer
1157          format: int32
1158        distance:
1159          type: integer
1160          format: int32
1161
1162    NumaConfig:
1163      required:
1164        - guest_numa_id
1165      type: object
1166      properties:
1167        guest_numa_id:
1168          type: integer
1169          format: int32
1170        cpus:
1171          type: array
1172          items:
1173            type: integer
1174            format: int32
1175        distances:
1176          type: array
1177          items:
1178            $ref: "#/components/schemas/NumaDistance"
1179        memory_zones:
1180          type: array
1181          items:
1182            type: string
1183        sgx_epc_sections:
1184          type: array
1185          items:
1186            type: string
1187        pci_segments:
1188          type: array
1189          items:
1190            type: integer
1191            format: int32
1192
1193    VmResize:
1194      type: object
1195      properties:
1196        desired_vcpus:
1197          minimum: 1
1198          type: integer
1199        desired_ram:
1200          description: desired memory ram in bytes
1201          type: integer
1202          format: int64
1203        desired_balloon:
1204          description: desired balloon size in bytes
1205          type: integer
1206          format: int64
1207
1208    VmResizeZone:
1209      type: object
1210      properties:
1211        id:
1212          type: string
1213        desired_ram:
1214          description: desired memory zone size in bytes
1215          type: integer
1216          format: int64
1217
1218    VmRemoveDevice:
1219      type: object
1220      properties:
1221        id:
1222          type: string
1223
1224    VmSnapshotConfig:
1225      type: object
1226      properties:
1227        destination_url:
1228          type: string
1229
1230    VmCoredumpData:
1231      type: object
1232      properties:
1233        destination_url:
1234          type: string
1235
1236    RestoreConfig:
1237      required:
1238        - source_url
1239      type: object
1240      properties:
1241        source_url:
1242          type: string
1243        prefault:
1244          type: boolean
1245
1246    ReceiveMigrationData:
1247      required:
1248        - receiver_url
1249      type: object
1250      properties:
1251        receiver_url:
1252          type: string
1253
1254    SendMigrationData:
1255      required:
1256        - destination_url
1257      type: object
1258      properties:
1259        destination_url:
1260          type: string
1261        local:
1262          type: boolean
1263
1264    VmAddUserDevice:
1265      required:
1266        - socket
1267      type: object
1268      properties:
1269        socket:
1270          type: string
1271
1272    LandlockConfig:
1273      required:
1274        - path
1275        - access
1276      type: object
1277      properties:
1278        path:
1279          type: string
1280        access:
1281          type: string
1282