Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(xo-web/new VM): warn if pool is not setup for secure boot #7562

Merged
merged 11 commits into from
Apr 30, 2024
3 changes: 3 additions & 0 deletions CHANGELOG.unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

- [i18n] Japanese translation (PR [#7582](https://github.com/vatesfr/xen-orchestra/pull/7582))
- [REST API] [Watch mode for the tasks collection](./packages/xo-server/docs/rest-api.md#all-tasks) (PR [#7565](https://github.com/vatesfr/xen-orchestra/pull/7565))
- [VM] At VM creation, warn if secure boot is on but pool is not setup for UEFI Secure Boot [#7500](https://github.com/vatesfr/xen-orchestra/issues/7500) (PR [#7562](https://github.com/vatesfr/xen-orchestra/pull/7562))

### Bug fixes

Expand Down Expand Up @@ -37,6 +38,8 @@
- @xen-orchestra/mixins minor
- xen-api patch
- xo-cli patch
- @vates/task minor
- @xen-orchestra/proxy minor
pdonias marked this conversation as resolved.
Show resolved Hide resolved
- xo-server minor
- xo-web minor

Expand Down
1 change: 1 addition & 0 deletions packages/xo-server/src/xapi-object-to-xo.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ const TRANSFORMS = {
const cpuInfo = obj.cpu_info
return {
auto_poweron: obj.other_config.auto_poweron === 'true',
secureBootSetup: (obj.custom_uefi_certificates !== undefined && obj.custom_uefi_certificates !== ''),
crashDumpSr: link(obj, 'crash_dump_SR'),
current_operations: obj.current_operations,
default_SR: link(obj, 'default_SR'),
Expand Down
1 change: 1 addition & 0 deletions packages/xo-web/src/common/intl/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -1721,6 +1721,7 @@ const messages = {
newVmNetworkConfigDoc: 'Network config documentation',
templateHasBiosStrings: 'The template already contains the BIOS strings',
secureBootLinkToDocumentationMessage: 'Click for more information about Guest UEFI Secure Boot.',
secureBootNotSetup: 'This pool has not yet been setup for Guest UEFI Secure Boot. Click for more information.',
seeVtpmDocumentation: 'See VTPM documentation',
vmBootFirmwareIsUefi: 'The boot firmware is UEFI',
destroyCloudConfigVdiAfterBoot: 'Destroy cloud config drive after first boot',
Expand Down
12 changes: 12 additions & 0 deletions packages/xo-web/src/xo-app/new-vm/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1781,6 +1781,18 @@ export default class NewVm extends BaseComponent {
<SectionContent>
<Item label={_('secureBoot')}>
<Toggle onChange={this._toggleState('secureBoot')} value={secureBoot} />
{secureBoot && pool !== undefined && !pool.secureBootSetup && (
<span className='align-self-center text-danger ml-1'>
<a
href='https://xcp-ng.org/docs/guides.html#guest-uefi-secure-boot'
rel='noopener noreferrer'
className='text-danger'
target='_blank'
>
<Icon icon='alarm' /> {_('secureBootNotSetup')}
</a>
</span>
)}
</Item>
<Item label={_('enableVtpm')} className='d-inline-flex'>
<Tooltip content={!isVtpmSupported ? _('vtpmNotSupported') : undefined}>
Expand Down
Loading