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