Repository navigation
Expand file tree
/
Copy pathopenapi.yaml
More file actions
972 lines (970 loc) · 31.6 KB
/
Copy pathopenapi.yaml
File metadata and controls
972 lines (970 loc) · 31.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
openapi: 3.1.0
info:
title: vm-manager API
version: v1
description: |
REST mirror of the vm-manager MCP tools. Every operation exists once as an
MCP tool (served at /mcp) and once here; both call the same service and
return the same JSON shapes. Request bodies use the tool argument names
(snake_case); resources are returned as the service records them
(camelCase). Errors are `{"error":{"code","message"}}` with a stable
`code` (`not_found`, `invalid_request`, `conflict`, `unsupported`,
`timeout`, `vm_failed`, `internal_error`); MCP tool errors carry the same
code.
Lifecycle: a VM needs a network (`POST /networks`, or the `default`
network the server creates at startup). `POST /vms` installs the image
onto a fresh disk (state `installing`), reboots into it (`booting`),
attests from the initrd (`attesting`) and is `ready` once the guest's
ready-stage quote verified and it sent READY=1. A rejected quote, or a
boot that reaches READY=1 or the boot timeout without a verified ready
quote, is killed: the VM is `failed` with the reason in `lastError`.
`running` means the boot attested but READY never arrived within the boot
timeout. `wait_for` chooses
how long the call blocks. `user_data` is CAPI's bootstrap Secret as
Ignition JSON; the IMDS releases it to the guest only after a verified
attestation quote.
Every operation needs a bearer token: an id_token of the platform's
identity provider for a trusted audience (what muster forwards) or a token
of this server's own OAuth flow. Without one the answer is 401; there is
no anonymous mode.
servers:
- url: /api/v1
security:
- bearer: []
paths:
/host:
get:
operationId: getHost
summary: Report the KVM host's capabilities (MCP tool get_host)
description: |
Hostname, kernel, CPUs and memory; whether /dev/kvm and
/dev/vhost-vsock are accessible; the qemu-system-x86_64, swtpm and
systemd versions; the OVMF firmware image found; the systemd storage
providers present; and `ready` with the list of `missing`
prerequisites. Call it before creating VMs.
responses:
"200":
description: The host report.
content:
application/json:
schema:
$ref: "#/components/schemas/Host"
"500":
$ref: "#/components/responses/Error"
/images:
get:
operationId: listImages
summary: List the bootable images (MCP tool list_images)
responses:
"200":
description: Every image in the catalog, newest version first per id.
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/Image"
/images/{ref}:
get:
operationId: getImage
summary: Describe one image (MCP tool get_image)
parameters:
- name: ref
in: path
required: true
description: '"<id>_<version>" or the bare id for its newest version.'
schema:
type: string
responses:
"200":
description: The image.
content:
application/json:
schema:
$ref: "#/components/schemas/Image"
"404":
$ref: "#/components/responses/Error"
/networks:
get:
operationId: listNetworks
summary: List the virtual networks (MCP tool list_networks)
responses:
"200":
description: Every network with its gateway and leases, sorted by name.
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/Network"
post:
operationId: createNetwork
summary: Create a virtual network (MCP tool create_network)
description: |
A rootless gvisor-tap-vsock network with DHCP, DNS and the instance
metadata service at 169.254.169.254. Create one before creating VMs
unless the default network is enough.
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/CreateNetworkRequest"
responses:
"201":
description: The network.
content:
application/json:
schema:
$ref: "#/components/schemas/Network"
"400":
$ref: "#/components/responses/Error"
"409":
$ref: "#/components/responses/Error"
/networks/{name}:
parameters:
- name: name
in: path
required: true
schema:
type: string
get:
operationId: getNetwork
summary: Describe one network (MCP tool get_network)
responses:
"200":
description: The network.
content:
application/json:
schema:
$ref: "#/components/schemas/Network"
"404":
$ref: "#/components/responses/Error"
delete:
operationId: deleteNetwork
summary: Tear a network down (MCP tool delete_network)
description: Fails with `conflict` while any VM, running or stopped, is attached.
responses:
"204":
description: Deleted.
"404":
$ref: "#/components/responses/Error"
"409":
$ref: "#/components/responses/Error"
/vms:
get:
operationId: listVMs
summary: List every VM record, oldest first (MCP tool list_vms)
responses:
"200":
description: The VM records.
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/VM"
post:
operationId: createVM
summary: Create a VM (MCP tool create_vm)
description: |
Allocates a disk, a vTPM, a network lease and a vsock id, boots the
installer, reboots into the installed disk, attests, and serves
`user_data` once attestation passed. With `wait_for` `ready` (the
default) the call blocks until the guest is up, bounded by the install
and boot timeouts; with `none` it returns at once and `GET /vms/{id}`
follows the progress. When the awaited milestone fails or times out
the error message names the VM id, which still exists.
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/CreateVMRequest"
responses:
"201":
description: The VM record.
content:
application/json:
schema:
$ref: "#/components/schemas/VM"
"400":
description: Invalid spec, including an image or network that does not exist.
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"500":
description: The VM failed before the awaited milestone (`vm_failed`).
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"504":
description: The awaited milestone was not reached in time (`timeout`); the VM keeps running.
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/vms/{id}:
parameters:
- $ref: "#/components/parameters/VMID"
get:
operationId: getVM
summary: Fetch one VM record (MCP tool get_vm)
responses:
"200":
description: The VM record.
content:
application/json:
schema:
$ref: "#/components/schemas/VM"
"404":
$ref: "#/components/responses/Error"
delete:
operationId: deleteVM
summary: Stop the VM if it runs and remove it with its disk (MCP tool delete_vm)
responses:
"204":
description: Deleted.
"404":
$ref: "#/components/responses/Error"
"409":
$ref: "#/components/responses/Error"
/vms/{id}/start:
post:
operationId: startVM
summary: Boot a stopped or failed VM from its installed disk (MCP tool start_vm)
parameters:
- $ref: "#/components/parameters/VMID"
responses:
"200":
$ref: "#/components/responses/VM"
"404":
$ref: "#/components/responses/Error"
"409":
$ref: "#/components/responses/Error"
/vms/{id}/stop:
post:
operationId: stopVM
summary: Shut a running VM down (MCP tool stop_vm)
parameters:
- $ref: "#/components/parameters/VMID"
responses:
"200":
$ref: "#/components/responses/VM"
"404":
$ref: "#/components/responses/Error"
"409":
$ref: "#/components/responses/Error"
/vms/{id}/reboot:
post:
operationId: rebootVM
summary: Stop, then start the VM (MCP tool reboot_vm)
parameters:
- $ref: "#/components/parameters/VMID"
responses:
"200":
$ref: "#/components/responses/VM"
"404":
$ref: "#/components/responses/Error"
"409":
$ref: "#/components/responses/Error"
/vms/{id}/exec:
post:
operationId: execVM
summary: Run a command as root in the guest over ssh (MCP tool exec_vm)
description: A non-zero exit is a result (`exitCode`), not an error.
parameters:
- $ref: "#/components/parameters/VMID"
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/ExecRequest"
responses:
"200":
description: The command's output and exit code.
content:
application/json:
schema:
$ref: "#/components/schemas/ExecResult"
"400":
$ref: "#/components/responses/Error"
"404":
$ref: "#/components/responses/Error"
"409":
$ref: "#/components/responses/Error"
/vms/{id}/forward:
post:
operationId: forwardPort
summary: Expose a guest TCP port on a host loopback address (MCP tool forward_port)
description: The forward lives until the VM is deleted.
parameters:
- $ref: "#/components/parameters/VMID"
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/ForwardRequest"
responses:
"200":
description: The host address.
content:
application/json:
schema:
$ref: "#/components/schemas/Forward"
"400":
$ref: "#/components/responses/Error"
"404":
$ref: "#/components/responses/Error"
"409":
$ref: "#/components/responses/Error"
/vms/{id}/console:
get:
operationId: getVMConsole
summary: Return the tail of the serial console (MCP tool get_vm_console)
parameters:
- $ref: "#/components/parameters/VMID"
- name: lines
in: query
description: Trailing lines to return, default 100, at most 10000.
schema:
type: integer
responses:
"200":
description: The console tail; empty before the VM produced output.
content:
application/json:
schema:
$ref: "#/components/schemas/Console"
"400":
$ref: "#/components/responses/Error"
"404":
$ref: "#/components/responses/Error"
/vms/{id}/attestation:
get:
operationId: getVMAttestation
summary: Return the current boot's attestation (MCP tool get_vm_attestation)
parameters:
- $ref: "#/components/parameters/VMID"
responses:
"200":
description: The attestation summary.
content:
application/json:
schema:
$ref: "#/components/schemas/Attestation"
"404":
$ref: "#/components/responses/Error"
/vms/{id}/metrics:
get:
operationId: getVMMetrics
summary: Per-VM metrics (MCP tool get_vm_metrics)
description: |
The host's view of the VM (state, attestation, QEMU CPU time and resident
memory, disk size, phase durations, its network's counters) and a summary
of the guest's last systemd-report upload. Every series is also on the
Prometheus exposition at GET /metrics (outside /api/v1, behind the same
guard, which also admits the scrape token).
parameters:
- $ref: "#/components/parameters/VMID"
responses:
"200":
description: The metrics summary.
content:
application/json:
schema:
$ref: "#/components/schemas/Metrics"
"404":
$ref: "#/components/responses/Error"
/vms/{id}/report:
get:
operationId: getVMReport
summary: The guest's last systemd-report upload in full (REST only)
description: |
The JSON body systemd-report upload POSTed to the IMDS, re-indented. Not
mirrored as an MCP tool because a report is hundreds of kilobytes;
get_vm_metrics carries a summary and links here as raw_report_url.
parameters:
- $ref: "#/components/parameters/VMID"
responses:
"200":
description: The report as uploaded.
content:
application/json:
schema:
type: object
"404":
description: Unknown VM, or no upload yet.
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/openapi.yaml:
get:
operationId: getOpenAPI
summary: This document
responses:
"200":
description: The OpenAPI document.
content:
application/yaml:
schema:
type: string
components:
securitySchemes:
bearer:
type: http
scheme: bearer
description: An OAuth 2.1 access token or a trusted IdP id_token.
parameters:
VMID:
name: id
in: path
required: true
description: VM id as returned by POST /vms or GET /vms.
schema:
type: string
responses:
Error:
description: A failed request.
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
VM:
description: The VM record after the operation; poll GET /vms/{id} for the next state.
content:
application/json:
schema:
$ref: "#/components/schemas/VM"
schemas:
Host:
type: object
required: [hostname, kernel, cpus, memoryBytes, kvm, vhostVsock, qemu, swtpm, systemd, storageProviders, ready]
properties:
hostname:
type: string
kernel:
type: string
description: Running kernel release; empty when unreadable.
cpus:
type: integer
description: Logical CPUs available to vm-manager.
memoryBytes:
type: integer
format: int64
description: MemTotal from /proc/meminfo.
kvm:
$ref: "#/components/schemas/Device"
vhostVsock:
$ref: "#/components/schemas/Device"
qemu:
$ref: "#/components/schemas/Tool"
swtpm:
$ref: "#/components/schemas/Tool"
systemd:
$ref: "#/components/schemas/Tool"
ovmfCode:
type: string
description: Path of the OVMF firmware code image VMs boot with; absent when none is found.
storageProviders:
type: array
items:
type: string
description: io.systemd.StorageProvider sockets present (e.g. fs, block).
ready:
type: boolean
description: True when every prerequisite of creating a VM is met.
missing:
type: array
items:
type: string
description: Prerequisites that are not met; absent when ready.
Device:
type: object
required: [path, accessible]
properties:
path:
type: string
accessible:
type: boolean
description: Whether vm-manager can open the device read-write.
error:
type: string
description: Why it is not accessible.
Tool:
type: object
required: [found]
properties:
found:
type: boolean
version:
type: string
error:
type: string
description: Why the tool could not be run.
Image:
type: object
required: [id, version, uki, disk]
properties:
id:
type: string
description: Image id, the file stem before the version (giantswarm-vm-base).
version:
type: string
uki:
type: string
description: Path of the unified kernel image booted in the installer phase.
disk:
type: string
description: Path of the base disk image copied onto the VM's disk.
sysupdateDir:
type: string
description: The sysupdate tree the IMDS serves; absent when none.
kubernetesVersions:
type: array
items:
type: string
description: Kubernetes sysext versions available, highest first.
cniVersions:
type: array
items:
type: string
description: CNI sysext versions available ("<cni>-<release>", e.g. "cilium-1.20.5"), highest first.
policy:
type: object
description: The image's PCR policy as written by the image build; absent when none.
CreateNetworkRequest:
type: object
required: [name, cidr]
properties:
name:
type: string
description: A DNS label of at most 63 characters.
cidr:
type: string
description: IPv4 subnet, /16 to /29, outside 169.254.0.0/16; the gateway is its first address.
dns_search_domain:
type: string
description: DNS search domain handed to guests over DHCP.
NetworkSpec:
type: object
required: [name, cidr, enableIMDS]
properties:
name:
type: string
cidr:
type: string
gatewayIP:
type: string
dnsSearchDomain:
type: string
enableIMDS:
type: boolean
description: Always true for networks created through the API.
Lease:
type: object
required: [vmID, mac, ip]
properties:
vmID:
type: string
mac:
type: string
ip:
type: string
Network:
type: object
required: [spec, gateway, leases]
properties:
spec:
$ref: "#/components/schemas/NetworkSpec"
gateway:
type: string
description: The gateway (and IMDS upstream) address.
leases:
type: array
items:
$ref: "#/components/schemas/Lease"
CreateVMRequest:
type: object
required: [name]
properties:
name:
type: string
description: A DNS label of at most 63 characters; also the default hostname.
image:
type: string
description: '"<id>_<version>" or the bare id; default: the catalog''s newest image.'
kubernetes_version:
type: string
description: Served as /kubernetes-version; default: the newest the image offers.
cni_version:
type: string
description: 'CNI sysext ("<cni>-<release>") served as /cni-version; its plugins are the only ones containerd runs besides the reference plugins of the Kubernetes sysext. Default: the newest cilium release the image offers; only with a Kubernetes version.'
cpus:
type: integer
default: 2
memory_mib:
type: integer
default: 2048
minimum: 256
disk_gib:
type: integer
default: 20
network:
type: string
default: default
description: >-
Network to attach to. The default network is shared by every caller's VMs and refuses user_data
(400): a VM with user_data goes on a network its caller created, one per cluster.
user_data:
type: string
description: >-
CAPI bootstrap data as Ignition JSON, served at /user-data only after attestation and deleted once the
first boot is past Ignition. Refused on the default network.
hostname:
type: string
metadata:
type: object
additionalProperties:
type: string
description: Served as /metadata/<key>.
layer_certificates:
type: array
maxItems: 16
description: >-
Installation layer certificates, PEM X.509, one or more CERTIFICATE blocks per item and at most 16 certificates
in all; private keys, other PEM types, text outside the blocks and duplicates are rejected. Served in this order
as the IMDS key /layer-certificates; the ready attestation must measure exactly these into PCR 15.
items:
type: string
wait_for:
type: string
enum: [none, installed, attested, ready]
default: ready
Quote:
type: object
required: [verified, at]
properties:
verified:
type: boolean
message:
type: string
at:
type: string
format: date-time
akFingerprint:
type: string
description: sha256 of the attestation key's public area; set by the verifying attestor.
pcrs:
type: object
description: Quoted sha256 PCR values by index, set once the PCR digest verified.
additionalProperties:
type: string
layerCertificates:
type: array
description: >-
sha256 digests of the layer certificates the ready quote measured into PCR 15, in order; set once the
userspace measurement log replayed to the quoted value, also when they differ from those served.
items:
type: string
Attestation:
type: object
required: [userDataReleased]
properties:
userDataReleased:
type: boolean
nonceIssuedAt:
type: string
format: date-time
initrd:
$ref: "#/components/schemas/Quote"
ready:
$ref: "#/components/schemas/Quote"
Paths:
type: object
description: The VM's files below the state directory.
properties:
dir:
type: string
volume:
type: string
console:
type: string
tpmState:
type: string
ovmfVars:
type: string
qmpSocket:
type: string
sshKey:
type: string
userData:
type: string
report:
type: string
VM:
type: object
required: [id, name, image, cpus, memoryMiB, diskGiB, network, state, cid, machineID, booted, sshPublicKey, attestation, createdAt, paths]
properties:
id:
type: string
name:
type: string
image:
type: string
description: The resolved image reference.
kubernetesVersion:
type: string
cniVersion:
type: string
cpus:
type: integer
memoryMiB:
type: integer
diskGiB:
type: integer
network:
type: string
hostname:
type: string
metadata:
type: object
additionalProperties:
type: string
region:
type: string
zone:
type: string
layerCertificates:
type: array
description: The installation layer certificates in canonical PEM, one certificate per item, in the order served.
items:
type: string
state:
type: string
enum: [creating, installing, booting, attesting, ready, running, stopping, stopped, failed, deleting]
phase:
type: string
enum: [install, boot]
description: Boot phase of the current or last QEMU process.
ip:
type: string
mac:
type: string
cid:
type: integer
description: vsock context id.
uid:
type: integer
description: The user and group the VM's QEMU and swtpm run as when vm-manager runs as root (`--vm-uid-base`); absent otherwise.
machineID:
type: string
booted:
type: boolean
description: Whether an installed boot ever reached READY=1.
userDataConsumedAt:
type: string
format: date-time
description: >-
When the boot the user-data was released to was past Ignition (its verified ready-stage quote or
READY=1, whichever came first). The user-data was deleted then; the IMDS answers 410 for it and no
later boot runs Ignition. Absent for a VM without user-data.
kernelCmdlineExtra:
type: string
description: The command line the current (or last) installed boot passed to systemd-stub (io.systemd.stub.kernel-cmdline-extra), ignition.firstboot on a boot that runs Ignition; PCR 12 of that boot must measure exactly it.
status:
type: string
description: The last STATUS= the guest sent.
sshPublicKey:
type: string
description: vm-manager's per-VM key, the first root authorized key.
attestation:
$ref: "#/components/schemas/Attestation"
createdAt:
type: string
format: date-time
installedAt:
type: string
format: date-time
bootedAt:
type: string
format: date-time
readyAt:
type: string
format: date-time
lastError:
type: string
description: Why the VM is failed, stopped or degraded.
paths:
$ref: "#/components/schemas/Paths"
ExecRequest:
type: object
required: [command]
properties:
command:
type: array
items:
type: string
description: Program and arguments.
ExecResult:
type: object
required: [stdout, stderr, exitCode]
properties:
stdout:
type: string
stderr:
type: string
exitCode:
type: integer
ForwardRequest:
type: object
required: [port]
properties:
port:
type: integer
minimum: 1
maximum: 65535
Forward:
type: object
required: [id, port, address]
properties:
id:
type: string
port:
type: integer
address:
type: string
description: Host loopback address (ip:port) the guest port is reachable on.
Console:
type: object
required: [id, lines, console]
properties:
id:
type: string
lines:
type: integer
console:
type: string
Metrics:
type: object
required: [id, host, guest]
properties:
id:
type: string
host:
type: object
description: What the host knows about the VM without the guest's help.
required: [state, attestation, disk_bytes, network]
properties:
state:
type: string
attestation:
type: string
enum: [pending, released, failed]
pid:
type: integer
description: The QEMU process; absent when none runs.
cpu_seconds:
type: number
description: CPU time of the QEMU process; absent when none runs.
memory_rss_bytes:
type: integer
description: Resident memory of the QEMU process; absent when none runs.
disk_bytes:
type: integer
description: Provisioned size of the VM's volume.
install_seconds:
type: number
description: Creation to the end of the installer boot; absent until installed.
boot_to_ready_seconds:
type: number
description: Start of the current installed boot to READY=1; absent until ready.
network:
type: object
description: The VM's network; the counters are per network, shared by every VM on it.
required: [name, bytes_sent, bytes_received, frames_dropped, leases]
properties:
name:
type: string
bytes_sent:
type: integer
bytes_received:
type: integer
frames_dropped:
type: integer
description: Frames VMs on the network sent with another MAC or address than their lease's, dropped by port security.
leases:
type: integer
guest:
description: Summary of the guest's last systemd-report upload; null until the guest sent one.
oneOf:
- type: "null"
- type: object
required: [received_at, report_age_seconds, families, series, series_exported, series_dropped, sample]
properties:
received_at:
type: string
format: date-time
generated_at:
type: string
format: date-time
description: The report's own timestamp when it parsed.
report_age_seconds:
type: number
families:
type: integer
description: Distinct family names in the report.
series:
type: integer
description: Entries in the report.
series_exported:
type: integer
description: Entries on /metrics; the difference to series is series_dropped.
series_dropped:
type: integer
reports_rejected:
type: object
description: >-
Uploads the IMDS refused, by reason: too_large (over 8 MiB), invalid (not JSON). Absent when none
was refused.
additionalProperties:
type: integer
sample:
type: array
description: The first entries of the report as uploaded.
items:
type: object
required: [name, value]
properties:
name:
type: string
object:
type: string
fields:
type: object
additionalProperties: true
value: {}
raw_report_url:
type: string
description: Path of the verbatim upload (GET /vms/{id}/report); absent until the guest sent one.
note:
type: string
description: Why guest is null.
Error:
type: object
required: [error]
properties:
error:
type: object
required: [code, message]
properties:
code:
type: string
enum: [not_found, invalid_request, conflict, unsupported, timeout, vm_failed, internal_error]
message:
type: string