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

[PR #6533/01f21b1d backport][stable-7] proxmox_kvm: support for tpmstate0 parameter #6600

Conversation

patchback[bot]
Copy link

@patchback patchback bot commented May 29, 2023

This is a backport of PR #6533 as merged into main (01f21b1).

SUMMARY

Adds the tpmstate0 parameter, which is a hash containing two options (storage and version) to configure the TPM state disk. The TPM (Trusted Platform Module) is required for Windows 11 installations.

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

proxmox_kvm

ADDITIONAL INFORMATION

Before

changed: [localhost] => {
    "changed": true,
    "devices": {
        "sata0": "STOR1:253/vm-253-disk-1.qcow2",
        "sata1": "local:iso/Win11_22H2_English_x64v1_UEFI.iso"
    },
    "invocation": {
        "module_args": {
            "acpi": null,
            "agent": "True",
            "api_host": "pve1.domain.com",
            "api_password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
            "api_token_id": null,
            "api_token_secret": null,
            "api_user": "root@pam",
            "archive": null,
            "args": null,
            "autostart": true,
            "balloon": 8192,
            "bios": "ovmf",
            "boot": "cdn",
            "bootdisk": "sata0",
            "cicustom": null,
            "cipassword": null,
            "citype": null,
            "ciuser": null,
            "clone": null,
            "cores": 4,
            "cpu": "host",
            "cpulimit": null,
            "cpuunits": null,
            "delete": null,
            "description": null,
            "digest": null,
            "efidisk0": {
                "efitype": "4m",
                "format": "qcow2",
                "pre_enrolled_keys": true
            },
            "force": null,
            "format": null,
            "freeze": null,
            "full": true,
            "hostpci": null,
            "hotplug": null,
            "hugepages": null,
            "ide": null,
            "ipconfig": null,
            "keyboard": null,
            "kvm": true,
            "localtime": null,
            "lock": null,
            "machine": "q35",
            "memory": 8192,
            "migrate": false,
            "migrate_downtime": null,
            "migrate_speed": null,
            "name": "rdp.testautom8",
            "net": {
                "net0": "e1000,bridge=vmbr0,firewall=1"
            },
            "newid": null,
            "node": "pve1",
            "numa": null,
            "numa_enabled": null,
            "onboot": true,
            "ostype": "win11",
            "parallel": null,
            "pool": "rdp",
            "protection": null,
            "proxmox_default_behavior": "no_defaults",
            "reboot": null,
            "revert": null,
            "sata": {
                "sata0": "STOR1:420,format=qcow2",
                "sata1": "local:iso/Win11_22H2_English_x64v1_UEFI.iso,media=cdrom"
            },
            "scsi": null,
            "scsihw": "virtio-scsi-single",
            "serial": null,
            "shares": null,
            "skiplock": null,
            "smbios": null,
            "snapname": null,
            "sockets": null,
            "sshkeys": null,
            "startdate": null,
            "startup": null,
            "state": "present",
            "storage": null,
            "tablet": null,
            "tags": null,
            "target": null,
            "tdf": null,
            "template": null,
            "timeout": 300,
            "update": false,
            "validate_certs": false,
            "vcpus": null,
            "vga": null,
            "virtio": null,
            "vmid": null,
            "watchdog": null
        }
    },
    "mac": {
        "net0": "72:FF:2E:5B:26:BD"
    },
    "msg": "VM rdp.testautom8 with vmid 253 deployed",
    "vmid": 253
}

After

changed: [localhost] => {
    "changed": true,
    "devices": {
        "sata0": "STOR1:253/vm-253-disk-1.qcow2",
        "sata1": "local:iso/Win11_22H2_English_x64v1_UEFI.iso"
    },
    "invocation": {
        "module_args": {
            "acpi": null,
            "agent": "True",
            "api_host": "pve1.domain.com",
            "api_password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
            "api_token_id": null,
            "api_token_secret": null,
            "api_user": "root@pam",
            "archive": null,
            "args": null,
            "autostart": true,
            "balloon": 8192,
            "bios": "ovmf",
            "boot": "cdn",
            "bootdisk": "sata0",
            "cicustom": null,
            "cipassword": null,
            "citype": null,
            "ciuser": null,
            "clone": null,
            "cores": 4,
            "cpu": "host",
            "cpulimit": null,
            "cpuunits": null,
            "delete": null,
            "description": null,
            "digest": null,
            "efidisk0": {
                "efitype": "4m",
                "format": "qcow2",
                "pre_enrolled_keys": true
            },
            "force": null,
            "format": null,
            "freeze": null,
            "full": true,
            "hostpci": null,
            "hotplug": null,
            "hugepages": null,
            "ide": null,
            "ipconfig": null,
            "keyboard": null,
            "kvm": true,
            "localtime": null,
            "lock": null,
            "machine": "q35",
            "memory": 8192,
            "migrate": false,
            "migrate_downtime": null,
            "migrate_speed": null,
            "name": "rdp.testautom8",
            "net": {
                "net0": "e1000,bridge=vmbr0,firewall=1"
            },
            "newid": null,
            "node": "pve1",
            "numa": null,
            "numa_enabled": null,
            "onboot": true,
            "ostype": "win11",
            "parallel": null,
            "pool": "rdp",
            "protection": null,
            "proxmox_default_behavior": "no_defaults",
            "reboot": null,
            "revert": null,
            "sata": {
                "sata0": "STOR1:420,format=qcow2",
                "sata1": "local:iso/Win11_22H2_English_x64v1_UEFI.iso,media=cdrom"
            },
            "scsi": null,
            "scsihw": "virtio-scsi-single",
            "serial": null,
            "shares": null,
            "skiplock": null,
            "smbios": null,
            "snapname": null,
            "sockets": null,
            "sshkeys": null,
            "startdate": null,
            "startup": null,
            "state": "present",
            "storage": null,
            "tablet": null,
            "tags": null,
            "target": null,
            "tdf": null,
            "template": null,
            "timeout": 300,
            "tpmstate0": {
                "storage": "STOR1",
                "version": "2.0"
            },
            "update": false,
            "validate_certs": false,
            "vcpus": null,
            "vga": null,
            "virtio": null,
            "vmid": null,
            "watchdog": null
        }
    },
    "mac": {
        "net0": "26:B9:C9:35:AF:74"
    },
    "msg": "VM rdp.testautom8 with vmid 253 deployed",
    "vmid": 253
}

* proxmox_kvm: added support for tmpstate

adds hash of options for a TPM state disk, which is required for Windows 11 installations

* updated wrong version in docs

* bump version 7.1.0 -> 7.1.1

* fixed parameter name typo

* updated to pass sanity; assumed version_added to be next major (7.2.0)

* replaced 'tpmstate' with 'tpmstate0'; added suboptions to kvm_args

* fixed line too long

* use get() instead of pop() to preserve verbose invocation.module_args

* update comment to include tpmstate0

* added changelog fragment

* Revert "bump version 7.1.0 -> 7.1.1"

This reverts commit 772ed98.

* Include PR link in changelog fragment

Co-authored-by: Felix Fontein <[email protected]>

* Corrected version_added

Co-authored-by: Felix Fontein <[email protected]>

* corrected semantic markup for option name

Co-authored-by: Felix Fontein <[email protected]>

* set suboptions of tpmstate0 to required

* set default for tpmstate0.version (2.0)

* fixed typo

Co-authored-by: Felix Fontein <[email protected]>

* wrapped default version string in quotes

Co-authored-by: Felix Fontein <[email protected]>

* Improve changelog formatting.

---------

Co-authored-by: Felix Fontein <[email protected]>
(cherry picked from commit 01f21b1)
@ansibullbot
Copy link
Collaborator

@ansibullbot ansibullbot added backport feature This issue/PR relates to a feature request module module needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR new_contributor Help guide this first time contributor plugins plugin (any type) and removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR labels May 29, 2023
@felixfontein felixfontein merged commit 307a291 into stable-7 May 30, 2023
@felixfontein felixfontein deleted the patchback/backports/stable-7/01f21b1d4613b4bd49334641750e32da32148a79/pr-6533 branch May 30, 2023 04:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature This issue/PR relates to a feature request module module new_contributor Help guide this first time contributor plugins plugin (any type)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants