You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PLT-1997: Added boot-loader support in virtual machine resource (#704)
* PLT-1997: Added bootloader support in virtual machine resource
* fix for firmware schema
* added feature support
* removed unwanted confusing schema defnition
* unit test fix
-`disk` (Block List) Disks describes disks, cdroms, floppy and luns which are connected to the vmi. (see [below for nested schema](#nestedblock--disk))
523
523
-`dns_policy` (String) DNSPolicy defines how a pod's DNS will be configured.
524
524
-`eviction_strategy` (String) EvictionStrategy can be set to "LiveMigrate" if the VirtualMachineInstance should be migrated instead of shut-off in case of a node drain.
525
+
-`features` (Block List, Max: 1) Features allows to configure various virtualization features. (see [below for nested schema](#nestedblock--features))
526
+
-`firmware` (Block List, Max: 1) Firmware configuration for the virtual machine. (see [below for nested schema](#nestedblock--firmware))
525
527
-`generate_name` (String) Prefix, used by the server, to generate a unique name ONLY IF the `name` field has not been provided. This value will also be combined with a unique suffix. Read more: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#idempotency
526
528
-`hostname` (String) Specifies the hostname of the vmi.
527
529
-`interface` (Block List) Interfaces describe network interfaces which are added to the vmi. (see [below for nested schema](#nestedblock--interface))
@@ -996,6 +998,76 @@ Optional:
996
998
997
999
998
1000
1001
+
<aid="nestedblock--features"></a>
1002
+
### Nested Schema for `features`
1003
+
1004
+
Optional:
1005
+
1006
+
-`acpi` (Block List, Max: 1) ACPI enables/disables ACPI inside the guest. Defaults to enabled. (see [below for nested schema](#nestedblock--features--acpi))
1007
+
-`apic` (Block List, Max: 1) APIC enables/disables APIC inside the guest. Defaults to enabled. (see [below for nested schema](#nestedblock--features--apic))
1008
+
-`smm` (Block List, Max: 1) SMM enables/disables System Management Mode. Required for Secure Boot with EFI. (see [below for nested schema](#nestedblock--features--smm))
1009
+
1010
+
<aid="nestedblock--features--acpi"></a>
1011
+
### Nested Schema for `features.acpi`
1012
+
1013
+
Optional:
1014
+
1015
+
-`enabled` (Boolean) Enabled determines if the feature should be enabled or disabled on the guest. Defaults to true.
1016
+
1017
+
1018
+
<aid="nestedblock--features--apic"></a>
1019
+
### Nested Schema for `features.apic`
1020
+
1021
+
Optional:
1022
+
1023
+
-`enabled` (Boolean) Enabled determines if the feature should be enabled or disabled on the guest. Defaults to true.
1024
+
1025
+
1026
+
<aid="nestedblock--features--smm"></a>
1027
+
### Nested Schema for `features.smm`
1028
+
1029
+
Optional:
1030
+
1031
+
-`enabled` (Boolean) Enabled determines if the feature should be enabled or disabled on the guest.
1032
+
1033
+
1034
+
1035
+
<aid="nestedblock--firmware"></a>
1036
+
### Nested Schema for `firmware`
1037
+
1038
+
Optional:
1039
+
1040
+
-`bootloader` (Block List, Max: 1) Settings to control the bootloader that is used. (see [below for nested schema](#nestedblock--firmware--bootloader))
1041
+
-`serial` (String) The system-serial-number in SMBIOS.
1042
+
-`uuid` (String) UUID reported by the vmi bios. Defaults to a random generated uid.
1043
+
1044
+
<aid="nestedblock--firmware--bootloader"></a>
1045
+
### Nested Schema for `firmware.bootloader`
1046
+
1047
+
Optional:
1048
+
1049
+
-`bios` (Block List, Max: 1) If set (default), BIOS will be used. (see [below for nested schema](#nestedblock--firmware--bootloader--bios))
1050
+
-`efi` (Block List, Max: 1) If set, EFI will be used instead of BIOS. (see [below for nested schema](#nestedblock--firmware--bootloader--efi))
-`persistent` (Boolean) If set to true, Persistent will persist the EFI NVRAM across reboots. Defaults to false.
1066
+
-`secure_boot` (Boolean) If set, SecureBoot will be enabled and the OVMF roms will be swapped for SecureBoot-enabled ones. Requires SMM to be enabled. Defaults to true.
Description: "Firmware configuration for the virtual machine.",
287
+
MaxItems: 1,
288
+
Optional: true,
289
+
Elem: &schema.Resource{
290
+
Schema: map[string]*schema.Schema{
291
+
"uuid": {
292
+
Type: schema.TypeString,
293
+
Description: "UUID reported by the vmi bios. Defaults to a random generated uid.",
294
+
Optional: true,
295
+
Computed: true,
296
+
},
297
+
"serial": {
298
+
Type: schema.TypeString,
299
+
Description: "The system-serial-number in SMBIOS.",
300
+
Optional: true,
301
+
},
302
+
"bootloader": {
303
+
Type: schema.TypeList,
304
+
Description: "Settings to control the bootloader that is used.",
305
+
MaxItems: 1,
306
+
Optional: true,
307
+
Elem: &schema.Resource{
308
+
Schema: map[string]*schema.Schema{
309
+
"bios": {
310
+
Type: schema.TypeList,
311
+
Description: "If set (default), BIOS will be used.",
312
+
MaxItems: 1,
313
+
Optional: true,
314
+
Elem: &schema.Resource{
315
+
Schema: map[string]*schema.Schema{
316
+
"use_serial": {
317
+
Type: schema.TypeBool,
318
+
Description: "If set, the BIOS output will be transmitted over serial.",
319
+
Optional: true,
320
+
},
321
+
},
322
+
},
323
+
},
324
+
"efi": {
325
+
Type: schema.TypeList,
326
+
Description: "If set, EFI will be used instead of BIOS.",
327
+
MaxItems: 1,
328
+
Optional: true,
329
+
Elem: &schema.Resource{
330
+
Schema: map[string]*schema.Schema{
331
+
"secure_boot": {
332
+
Type: schema.TypeBool,
333
+
Description: "If set, SecureBoot will be enabled and the OVMF roms will be swapped for SecureBoot-enabled ones. Requires SMM to be enabled. Defaults to true.",
334
+
Optional: true,
335
+
},
336
+
"persistent": {
337
+
Type: schema.TypeBool,
338
+
Description: "If set to true, Persistent will persist the EFI NVRAM across reboots. Defaults to false.",
339
+
Optional: true,
340
+
},
341
+
},
342
+
},
343
+
},
344
+
},
345
+
},
346
+
},
347
+
},
348
+
},
349
+
},
350
+
"features": {
351
+
Type: schema.TypeList,
352
+
Description: "Features allows to configure various virtualization features.",
353
+
MaxItems: 1,
354
+
Optional: true,
355
+
Elem: &schema.Resource{
356
+
Schema: map[string]*schema.Schema{
357
+
"acpi": {
358
+
Type: schema.TypeList,
359
+
Description: "ACPI enables/disables ACPI inside the guest. Defaults to enabled.",
360
+
MaxItems: 1,
361
+
Optional: true,
362
+
Elem: &schema.Resource{
363
+
Schema: map[string]*schema.Schema{
364
+
"enabled": {
365
+
Type: schema.TypeBool,
366
+
Description: "Enabled determines if the feature should be enabled or disabled on the guest. Defaults to true.",
367
+
Optional: true,
368
+
Default: true,
369
+
},
370
+
},
371
+
},
372
+
},
373
+
"apic": {
374
+
Type: schema.TypeList,
375
+
Description: "APIC enables/disables APIC inside the guest. Defaults to enabled.",
376
+
MaxItems: 1,
377
+
Optional: true,
378
+
Elem: &schema.Resource{
379
+
Schema: map[string]*schema.Schema{
380
+
"enabled": {
381
+
Type: schema.TypeBool,
382
+
Description: "Enabled determines if the feature should be enabled or disabled on the guest. Defaults to true.",
383
+
Optional: true,
384
+
Default: true,
385
+
},
386
+
},
387
+
},
388
+
},
389
+
"smm": {
390
+
Type: schema.TypeList,
391
+
Description: "SMM enables/disables System Management Mode. Required for Secure Boot with EFI.",
392
+
MaxItems: 1,
393
+
Optional: true,
394
+
Elem: &schema.Resource{
395
+
Schema: map[string]*schema.Schema{
396
+
"enabled": {
397
+
Type: schema.TypeBool,
398
+
Description: "Enabled determines if the feature should be enabled or disabled on the guest.",
0 commit comments