File tree Expand file tree Collapse file tree 6 files changed +85
-2
lines changed Expand file tree Collapse file tree 6 files changed +85
-2
lines changed Original file line number Diff line number Diff line change @@ -384,6 +384,31 @@ The following parameters can be specified to set up the controller:
384
384
}
385
385
```
386
386
387
+ ## <a name =" configLinuxVTPMs " />vTPMs
388
+
389
+ ** ` vtpms ` ** (array of objects, OPTIONAL) lists a number of emulated TPMs that
390
+ will be made available to the container.
391
+
392
+ Each entry has the following structure:
393
+
394
+ * ** ` Statepath ` ** * (string, REQUIRED)* - full path to a directory where the vTPM is to write its persistent state into
395
+ * ** ` VTPMVersion ` ** * (string, OPTIONAL)* - The version of TPM to emulate; either 1.2 or 2; default is 1.2
396
+ * ** ` CreateCertificates ` ** * (boolean, OPTIONAL)* - Whether to create certificates for the vTPM
397
+
398
+ The ` Statepath ` MUST be unique per container.
399
+
400
+ ### Example
401
+
402
+ ``` json
403
+ "vtpms" : [
404
+ {
405
+ "Statepath" : " /var/run/runc/ubuntu/tpm12_1" ,
406
+ "VTPMVersion" : " 1.2" ,
407
+ "CreateCertificates" : false
408
+ }
409
+ ]
410
+ ```
411
+
387
412
### <a name =" configLinuxHugePageLimits " />Huge page limits
388
413
389
414
** ` hugepageLimits ` ** (array of objects, OPTIONAL) represents the ` hugetlb ` controller which allows to limit the
Original file line number Diff line number Diff line change @@ -772,7 +772,14 @@ Here is a full example `config.json` for reference.
772
772
"rate" : 300
773
773
}
774
774
]
775
- }
775
+ },
776
+ "vtpms" : [
777
+ {
778
+ "Statepath" : " /var/run/runc/ubuntu/tpm12_1" ,
779
+ "VTPMVersion" : " 1.2" ,
780
+ "CreateCertificates" : false
781
+ }
782
+ ]
776
783
},
777
784
"rootfsPropagation" : " slave" ,
778
785
"seccomp" : {
Original file line number Diff line number Diff line change 47
47
"$ref" : " defs-linux.json#/definitions/DeviceCgroup"
48
48
}
49
49
},
50
+ "vtpms" : {
51
+ "id" : " https://opencontainers.org/schema/bundle/linux/resources/vtpms" ,
52
+ "type" : " array" ,
53
+ "items" : {
54
+ "$ref" : " defs-linux.json#/definitions/VTPM"
55
+ }
56
+ },
50
57
"pids" : {
51
58
"id" : " https://opencontainers.org/schema/bundle/linux/resources/pids" ,
52
59
"type" : " object" ,
Original file line number Diff line number Diff line change 109
109
"description" : " minor device number" ,
110
110
"$ref" : " defs.json#/definitions/int64"
111
111
},
112
+ "TPMVersion" : {
113
+ "description" : " The TPM version" ,
114
+ "type" : " string" ,
115
+ "enum" : [
116
+ " 1.2" ,
117
+ " 2"
118
+ ]
119
+ },
112
120
"FileMode" : {
113
121
"description" : " File permissions mode (typically an octal value)" ,
114
122
"type" : " integer" ,
202
210
}
203
211
]
204
212
},
213
+ "VTPM" : {
214
+ "type" : " object" ,
215
+ "properties" : {
216
+ "Statepath" : {
217
+ "type" : " string"
218
+ },
219
+ "VTPMVersion" : {
220
+ "$ref" : " #/definitions/TPMVersion"
221
+ },
222
+ "CreateCertificates" : {
223
+ "type" : " boolean"
224
+ }
225
+ },
226
+ "required" : [
227
+ " Statepath"
228
+ ]
229
+ },
205
230
"DeviceCgroup" : {
206
231
"type" : " object" ,
207
232
"properties" : {
Original file line number Diff line number Diff line change 303
303
"rate" : 300
304
304
}
305
305
]
306
- }
306
+ },
307
+ "vtpms" : [
308
+ {
309
+ "Statepath" : " /var/run/runc/ubuntu/tpm12_1" ,
310
+ "VTPMVersion" : " 1.2" ,
311
+ "CreateCertificates" : false
312
+ }
313
+ ]
307
314
},
308
315
"rootfsPropagation" : " slave" ,
309
316
"seccomp" : {
Original file line number Diff line number Diff line change @@ -161,6 +161,8 @@ type Linux struct {
161
161
// IntelRdt contains Intel Resource Director Technology (RDT) information
162
162
// for handling resource constraints (e.g., L3 cache) for the container
163
163
IntelRdt * LinuxIntelRdt `json:"intelRdt,omitempty"`
164
+ // VTPM configuration
165
+ VTPMS []* VTPM `json:"vtpms"`
164
166
}
165
167
166
168
// LinuxNamespace is the configuration for a Linux namespace
@@ -568,3 +570,13 @@ type LinuxIntelRdt struct {
568
570
// Format: "L3:<cache_id0>=<cbm0>;<cache_id1>=<cbm1>;..."
569
571
L3CacheSchema string `json:"l3CacheSchema,omitempty"`
570
572
}
573
+
574
+ // VTPM is used to hold the configuration state of a VTPM
575
+ type VTPM struct {
576
+ // The directory where the TPM emulator writes the TPM state to
577
+ Statepath string `json:"statepath"`
578
+ // Whether to create a certificate for the VTPM
579
+ Createcerts bool `json:"createcerts"`
580
+ // Version of the TPM
581
+ Vtpmversion string `json:"vtpmversion"`
582
+ }
You can’t perform that action at this time.
0 commit comments