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

[Imprv] add functionality uefi boot_order to module ntnx_vms_v2 #579

Open
lm-sig opened this issue Jan 21, 2025 · 0 comments
Open

[Imprv] add functionality uefi boot_order to module ntnx_vms_v2 #579

lm-sig opened this issue Jan 21, 2025 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@lm-sig
Copy link

lm-sig commented Jan 21, 2025

Describe the request

The v4 API module ntnx_vms_v2 has the boot order parameters defined for legacy BIOS but not for UEFI.

The v4 API supports setting boot order but this was left out of the Ansible module. Adding 3 lines of code makes this work.

Current behaviour

Setting:

  boot_config:
    uefi_boot:
      boot_order:
        - DISK
        - CDROM
        - NETWORK

Fails.

Expected behaviour

Successful VM creation. VM boots from disk first.

I have modified my collection locally and this works as intended.

Modify:
plugins/module_utils/v4/vmm/spec/vms.py

Add "boot_order" to the uefi_boot_spec definition.

Line 321 of version 2.0.0

    uefi_boot_spec = dict(
        is_secure_boot_enabled=dict(type="bool"),
        nvram_device=dict(
            type="dict", options=nvram_device_spec, obj=vmm_sdk.NvramDevice
        ),
        boot_order=dict(
            type="list", elements="str", choices=["CDROM", "NETWORK", "DISK"]
        ),
    )

You could also add "boot_device" to UEFI as well as the v4 API also supports setting it.

@lm-sig lm-sig added the enhancement New feature or request label Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants