xref: /cloud-hypervisor/vmm/src/api/openapi/cloud-hypervisor.yaml (revision 3ce0fef7fd546467398c914dbc74d8542e45cf6f)
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  /vm.restore:
409    put:
410      summary: Restore a VM from a snapshot.
411      requestBody:
412        description: The restore configuration
413        content:
414          application/json:
415            schema:
416              $ref: "#/components/schemas/RestoreConfig"
417        required: true
418      responses:
419        204:
420          description: The VM instance was successfully restored.
421        404:
422          description: The VM instance could not be restored because it is already created.
423
424  /vm.receive-migration:
425    put:
426      summary: Receive a VM migration from URL
427      requestBody:
428        description: The URL for the reception of migration state
429        content:
430          application/json:
431            schema:
432              $ref: "#/components/schemas/ReceiveMigrationData"
433        required: true
434      responses:
435        204:
436          description: The VM migration was successfully received.
437        500:
438          description: The VM migration could not be received.
439
440  /vm.send-migration:
441    put:
442      summary: Send a VM migration to URL
443      requestBody:
444        description: The URL for sending the migration state
445        content:
446          application/json:
447            schema:
448              $ref: "#/components/schemas/SendMigrationData"
449        required: true
450      responses:
451        204:
452          description: The VM migration was successfully sent.
453        500:
454          description: The VM migration could not be sent.
455
456components:
457  schemas:
458    VmmPingResponse:
459      required:
460        - version
461      type: object
462      properties:
463        build_version:
464          type: string
465        version:
466          type: string
467        pid:
468          type: integer
469          format: int64
470        features:
471          type: array
472          items:
473            type: string
474      description: Virtual Machine Monitor information
475
476    VmInfo:
477      required:
478        - config
479        - state
480      type: object
481      properties:
482        config:
483          $ref: "#/components/schemas/VmConfig"
484        state:
485          type: string
486          enum: [Created, Running, Shutdown, Paused]
487        memory_actual_size:
488          type: integer
489          format: int64
490        device_tree:
491          type: object
492          additionalProperties:
493            $ref: "#/components/schemas/DeviceNode"
494      description: Virtual Machine information
495
496    DeviceNode:
497      type: object
498      properties:
499        id:
500          type: string
501        resources:
502          type: array
503          items:
504            # Rust enum type (with data) which can't be better represented here
505            type: object
506        children:
507          type: array
508          items:
509            type: string
510        pci_bdf:
511          type: string
512
513    VmCounters:
514      type: object
515      additionalProperties:
516        type: object
517        additionalProperties:
518          type: integer
519          format: int64
520
521    PciDeviceInfo:
522      required:
523        - id
524        - bdf
525      type: object
526      properties:
527        id:
528          type: string
529        bdf:
530          type: string
531      description: Information about a PCI device
532
533    PayloadConfig:
534      type: object
535      properties:
536        firmware:
537          type: string
538        kernel:
539          type: string
540        cmdline:
541          type: string
542        initramfs:
543          type: string
544      description: Payloads to boot in guest
545
546    VmConfig:
547      required:
548        - payload
549      type: object
550      properties:
551        cpus:
552          $ref: "#/components/schemas/CpusConfig"
553        memory:
554          $ref: "#/components/schemas/MemoryConfig"
555        payload:
556          $ref: "#/components/schemas/PayloadConfig"
557        rate_limit_groups:
558          type: array
559          items:
560            $ref: "#/components/schemas/RateLimitGroupConfig"
561        disks:
562          type: array
563          items:
564            $ref: "#/components/schemas/DiskConfig"
565        net:
566          type: array
567          items:
568            $ref: "#/components/schemas/NetConfig"
569        rng:
570          $ref: "#/components/schemas/RngConfig"
571        balloon:
572          $ref: "#/components/schemas/BalloonConfig"
573        fs:
574          type: array
575          items:
576            $ref: "#/components/schemas/FsConfig"
577        pmem:
578          type: array
579          items:
580            $ref: "#/components/schemas/PmemConfig"
581        serial:
582          $ref: "#/components/schemas/ConsoleConfig"
583        console:
584          $ref: "#/components/schemas/ConsoleConfig"
585        devices:
586          type: array
587          items:
588            $ref: "#/components/schemas/DeviceConfig"
589        vdpa:
590          type: array
591          items:
592            $ref: "#/components/schemas/VdpaConfig"
593        vsock:
594          $ref: "#/components/schemas/VsockConfig"
595        sgx_epc:
596          type: array
597          items:
598            $ref: "#/components/schemas/SgxEpcConfig"
599        numa:
600          type: array
601          items:
602            $ref: "#/components/schemas/NumaConfig"
603        iommu:
604          type: boolean
605          default: false
606        watchdog:
607          type: boolean
608          default: false
609        platform:
610          $ref: "#/components/schemas/PlatformConfig"
611        tpm:
612          $ref: "#/components/schemas/TpmConfig"
613      description: Virtual machine configuration
614
615    CpuAffinity:
616      required:
617        - vcpu
618        - host_cpus
619      type: object
620      properties:
621        vcpu:
622          type: integer
623        host_cpus:
624          type: array
625          items:
626            type: integer
627
628    CpuFeatures:
629      type: object
630      properties:
631        amx:
632          type: boolean
633
634    CpuTopology:
635      type: object
636      properties:
637        threads_per_core:
638          type: integer
639        cores_per_die:
640          type: integer
641        dies_per_package:
642          type: integer
643        packages:
644          type: integer
645
646    CpusConfig:
647      required:
648        - boot_vcpus
649        - max_vcpus
650      type: object
651      properties:
652        boot_vcpus:
653          minimum: 1
654          default: 1
655          type: integer
656        max_vcpus:
657          minimum: 1
658          default: 1
659          type: integer
660        topology:
661          $ref: "#/components/schemas/CpuTopology"
662        kvm_hyperv:
663          type: boolean
664          default: false
665        max_phys_bits:
666          type: integer
667        affinity:
668          type: array
669          items:
670            $ref: "#/components/schemas/CpuAffinity"
671        features:
672          $ref: "#/components/schemas/CpuFeatures"
673
674    PlatformConfig:
675      type: object
676      properties:
677        num_pci_segments:
678          type: integer
679          format: int16
680        iommu_segments:
681          type: array
682          items:
683            type: integer
684            format: int16
685        serial_number:
686          type: string
687        uuid:
688          type: string
689        oem_strings:
690          type: array
691          items:
692            type: string
693        tdx:
694          type: boolean
695          default: false
696
697    MemoryZoneConfig:
698      required:
699        - id
700        - size
701      type: object
702      properties:
703        id:
704          type: string
705        size:
706          type: integer
707          format: int64
708          default: 512 MB
709        file:
710          type: string
711        mergeable:
712          type: boolean
713          default: false
714        shared:
715          type: boolean
716          default: false
717        hugepages:
718          type: boolean
719          default: false
720        hugepage_size:
721          type: integer
722          format: int64
723        host_numa_node:
724          type: integer
725          format: int32
726        hotplug_size:
727          type: integer
728          format: int64
729        hotplugged_size:
730          type: integer
731          format: int64
732        prefault:
733          type: boolean
734          default: false
735
736    MemoryConfig:
737      required:
738        - size
739      type: object
740      properties:
741        size:
742          type: integer
743          format: int64
744          default: 512 MB
745        hotplug_size:
746          type: integer
747          format: int64
748        hotplugged_size:
749          type: integer
750          format: int64
751        mergeable:
752          type: boolean
753          default: false
754        hotplug_method:
755          type: string
756          default: "Acpi"
757        shared:
758          type: boolean
759          default: false
760        hugepages:
761          type: boolean
762          default: false
763        hugepage_size:
764          type: integer
765          format: int64
766        prefault:
767          type: boolean
768          default: false
769        thp:
770          type: boolean
771          default: true
772        zones:
773          type: array
774          items:
775            $ref: "#/components/schemas/MemoryZoneConfig"
776
777    TokenBucket:
778      required:
779        - size
780        - refill_time
781      type: object
782      properties:
783        size:
784          type: integer
785          format: int64
786          minimum: 0
787          description: The total number of tokens this bucket can hold.
788        one_time_burst:
789          type: integer
790          format: int64
791          minimum: 0
792          description: The initial size of a token bucket.
793        refill_time:
794          type: integer
795          format: int64
796          minimum: 0
797          description: The amount of milliseconds it takes for the bucket to refill.
798      description:
799        Defines a token bucket with a maximum capacity (_size_), an initial burst size
800        (_one_time_burst_) and an interval for refilling purposes (_refill_time_).
801        The refill-rate is derived from _size_ and _refill_time_, and it is the constant
802        rate at which the tokens replenish. The refill process only starts happening after
803        the initial burst budget is consumed.
804        Consumption from the token bucket is unbounded in speed which allows for bursts
805        bound in size by the amount of tokens available.
806        Once the token bucket is empty, consumption speed is bound by the refill-rate.
807
808    RateLimiterConfig:
809      type: object
810      properties:
811        bandwidth:
812          $ref: "#/components/schemas/TokenBucket"
813        ops:
814          $ref: "#/components/schemas/TokenBucket"
815      description:
816        Defines an IO rate limiter with independent bytes/s and ops/s limits.
817        Limits are defined by configuring each of the _bandwidth_ and _ops_ token buckets.
818
819    RateLimitGroupConfig:
820      required:
821        - id
822        - rate_limiter_config
823      type: object
824      properties:
825        id:
826          type: string
827        rate_limiter_config:
828          $ref: "#/components/schemas/RateLimiterConfig"
829
830    DiskConfig:
831      required:
832        - path
833      type: object
834      properties:
835        path:
836          type: string
837        readonly:
838          type: boolean
839          default: false
840        direct:
841          type: boolean
842          default: false
843        iommu:
844          type: boolean
845          default: false
846        num_queues:
847          type: integer
848          default: 1
849        queue_size:
850          type: integer
851          default: 128
852        vhost_user:
853          type: boolean
854          default: false
855        vhost_socket:
856          type: string
857        rate_limiter_config:
858          $ref: "#/components/schemas/RateLimiterConfig"
859        pci_segment:
860          type: integer
861          format: int16
862        id:
863          type: string
864        serial:
865          type: string
866        rate_limit_group:
867          type: string
868
869    NetConfig:
870      type: object
871      properties:
872        tap:
873          type: string
874        ip:
875          type: string
876          default: "192.168.249.1"
877        mask:
878          type: string
879          default: "255.255.255.0"
880        mac:
881          type: string
882        host_mac:
883          type: string
884        mtu:
885          type: integer
886        iommu:
887          type: boolean
888          default: false
889        num_queues:
890          type: integer
891          default: 2
892        queue_size:
893          type: integer
894          default: 256
895        vhost_user:
896          type: boolean
897          default: false
898        vhost_socket:
899          type: string
900        vhost_mode:
901          type: string
902          default: "Client"
903        id:
904          type: string
905        pci_segment:
906          type: integer
907          format: int16
908        rate_limiter_config:
909          $ref: "#/components/schemas/RateLimiterConfig"
910
911    RngConfig:
912      required:
913        - src
914      type: object
915      properties:
916        src:
917          type: string
918          default: "/dev/urandom"
919        iommu:
920          type: boolean
921          default: false
922
923    BalloonConfig:
924      required:
925        - size
926      type: object
927      properties:
928        size:
929          type: integer
930          format: int64
931        deflate_on_oom:
932          type: boolean
933          default: false
934          description: Deflate balloon when the guest is under memory pressure.
935        free_page_reporting:
936          type: boolean
937          default: false
938          description: Enable guest to report free pages.
939
940    FsConfig:
941      required:
942        - num_queues
943        - queue_size
944        - socket
945        - tag
946      type: object
947      properties:
948        tag:
949          type: string
950        socket:
951          type: string
952        num_queues:
953          type: integer
954          default: 1
955        queue_size:
956          type: integer
957          default: 1024
958        pci_segment:
959          type: integer
960          format: int16
961        id:
962          type: string
963
964    PmemConfig:
965      required:
966        - file
967      type: object
968      properties:
969        file:
970          type: string
971        size:
972          type: integer
973          format: int64
974        iommu:
975          type: boolean
976          default: false
977        discard_writes:
978          type: boolean
979          default: false
980        pci_segment:
981          type: integer
982          format: int16
983        id:
984          type: string
985
986    ConsoleConfig:
987      required:
988        - mode
989      type: object
990      properties:
991        file:
992          type: string
993        socket:
994          type: string
995        mode:
996          type: string
997          enum: ["Off", "Pty", "Tty", "File", "Socket", "Null"]
998        iommu:
999          type: boolean
1000          default: false
1001
1002    DeviceConfig:
1003      required:
1004        - path
1005      type: object
1006      properties:
1007        path:
1008          type: string
1009        iommu:
1010          type: boolean
1011          default: false
1012        pci_segment:
1013          type: integer
1014          format: int16
1015        id:
1016          type: string
1017
1018    TpmConfig:
1019      required:
1020        - socket
1021      type: object
1022      properties:
1023        socket:
1024          type: string
1025
1026    VdpaConfig:
1027      required:
1028        - path
1029        - num_queues
1030      type: object
1031      properties:
1032        path:
1033          type: string
1034        num_queues:
1035          type: integer
1036          default: 1
1037        iommu:
1038          type: boolean
1039          default: false
1040        pci_segment:
1041          type: integer
1042          format: int16
1043        id:
1044          type: string
1045
1046    VsockConfig:
1047      required:
1048        - cid
1049        - socket
1050      type: object
1051      properties:
1052        cid:
1053          type: integer
1054          format: int64
1055          minimum: 3
1056          description: Guest Vsock CID
1057        socket:
1058          type: string
1059          description: Path to UNIX domain socket, used to proxy vsock connections.
1060        iommu:
1061          type: boolean
1062          default: false
1063        pci_segment:
1064          type: integer
1065          format: int16
1066        id:
1067          type: string
1068
1069    SgxEpcConfig:
1070      required:
1071        - id
1072        - size
1073      type: object
1074      properties:
1075        id:
1076          type: string
1077        size:
1078          type: integer
1079          format: int64
1080        prefault:
1081          type: boolean
1082          default: false
1083
1084    NumaDistance:
1085      required:
1086        - destination
1087        - distance
1088      type: object
1089      properties:
1090        destination:
1091          type: integer
1092          format: int32
1093        distance:
1094          type: integer
1095          format: int32
1096
1097    NumaConfig:
1098      required:
1099        - guest_numa_id
1100      type: object
1101      properties:
1102        guest_numa_id:
1103          type: integer
1104          format: int32
1105        cpus:
1106          type: array
1107          items:
1108            type: integer
1109            format: int32
1110        distances:
1111          type: array
1112          items:
1113            $ref: "#/components/schemas/NumaDistance"
1114        memory_zones:
1115          type: array
1116          items:
1117            type: string
1118        sgx_epc_sections:
1119          type: array
1120          items:
1121            type: string
1122        pci_segments:
1123          type: array
1124          items:
1125            type: integer
1126            format: int32
1127
1128    VmResize:
1129      type: object
1130      properties:
1131        desired_vcpus:
1132          minimum: 1
1133          type: integer
1134        desired_ram:
1135          description: desired memory ram in bytes
1136          type: integer
1137          format: int64
1138        desired_balloon:
1139          description: desired balloon size in bytes
1140          type: integer
1141          format: int64
1142
1143    VmResizeZone:
1144      type: object
1145      properties:
1146        id:
1147          type: string
1148        desired_ram:
1149          description: desired memory zone size in bytes
1150          type: integer
1151          format: int64
1152
1153    VmRemoveDevice:
1154      type: object
1155      properties:
1156        id:
1157          type: string
1158
1159    VmSnapshotConfig:
1160      type: object
1161      properties:
1162        destination_url:
1163          type: string
1164
1165    VmCoredumpData:
1166      type: object
1167      properties:
1168        destination_url:
1169          type: string
1170
1171    RestoreConfig:
1172      required:
1173        - source_url
1174      type: object
1175      properties:
1176        source_url:
1177          type: string
1178        prefault:
1179          type: boolean
1180
1181    ReceiveMigrationData:
1182      required:
1183        - receiver_url
1184      type: object
1185      properties:
1186        receiver_url:
1187          type: string
1188
1189    SendMigrationData:
1190      required:
1191        - destination_url
1192      type: object
1193      properties:
1194        destination_url:
1195          type: string
1196        local:
1197          type: boolean
1198
1199    VmAddUserDevice:
1200      required:
1201        - socket
1202      type: object
1203      properties:
1204        socket:
1205          type: string
1206