Skip to content

Commit

Permalink
Fixes #37692 - Add firmware option for Libvirt hosts creation
Browse files Browse the repository at this point in the history
New `firmware` option for creating new hosts in Libvirt,
allowing users to specify the VM firmware type, including Secure Boot.
  • Loading branch information
nofaralfasi committed Sep 15, 2024
1 parent 1cae776 commit 0c71eb5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions doc/host_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ Available keys for `--compute-attributes`:
cpus # number of CPUs
memory # string, amount of memory, value in bytes
start # Must be a 1 or 0, whether to start the machine or not
firmware # one of [automatic, bios, uefi, uefi_secure_boot]
```

Available keys for `--interface`:
Expand Down
7 changes: 5 additions & 2 deletions lib/hammer_cli_foreman/compute_resource/libvirt.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ def compute_attributes
[
['cpus', _('Number of CPUs'), { bold: true }],
['memory', _('String, amount of memory, value in bytes'), { bold: true }],
['boot_order', _('Device names to specify the boot order')]
['boot_order', _('Device names to specify the boot order')],
['firmware', _('automatic/bios/uefi/uefi_secure_boot (EFI with Secure Boot enabled)')]
]
end

Expand Down Expand Up @@ -49,7 +50,9 @@ def provider_vm_specific_fields
Fields::Field.new(:label => _('OS Type'), :path => [:os_type]),
Fields::Field.new(:label => _('Domain Type'), :path => [:domain_type]),
Fields::Field.new(:label => _('Persistent'), :path => [:persistent]),
Fields::List.new(:label => _('Boot order'), :path => [:boot_order])
Fields::List.new(:label => _('Boot order'), :path => [:boot_order]),
Fields::Field.new(:label => _('Firmware'), :path => [:firmware]),
Fields::Field.new(:label => _('Secure Boot'), :path => [:secure_boot])
]
end

Expand Down

0 comments on commit 0c71eb5

Please sign in to comment.