Skip to content

Add Cloud-init and TPM Support #101

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

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

aleskxyz
Copy link

Description:

This pull request introduces two major enhancements to the libvirt_vm role: Cloud-init integration and TPM support.

  1. Cloud-init Support:
  • Added cloud-init integration for VM provisioning
  • Implemented cloud-init configuration templates:
    • meta-data
    • user-data
    • network-config
  • Enhanced VM destruction process to clean up cloud-init resources
  • Updated network interface checking functionality
  • Updated documentation with cloud-init configuration examples
  1. TPM (Trusted Platform Module) Support:
  • Added TPM device configuration in VM XML template
  • Introduced new VM configuration parameters:
    • tpm_enabled: Toggle TPM support (default: false)
    • tpm_version: Select TPM version ('1.2' or '2.0', default: '2.0')

Dependencies:

  • genisoimage package is required for cloud-init support
  • swtpm and swtpm-tools packages are required for TPM support

Example Usage:

vm:
  name: example-vm
  # Cloud-init configuration
  cloud_init_enabled: true
  cloud_init_user_data:
    users:
      - name: myuser
        sudo: ALL=(ALL) NOPASSWD:ALL
  
  # TPM configuration
  tpm_enabled: true
  tpm_version: "2.0"

Signed-off-by: aleskxyz <39186039+aleskxyz@users.noreply.github.com>
Signed-off-by: aleskxyz <39186039+aleskxyz@users.noreply.github.com>
@aleskxyz aleskxyz requested a review from a team as a code owner December 30, 2024 21:50
Signed-off-by: aleskxyz <39186039+aleskxyz@users.noreply.github.com>
Signed-off-by: aleskxyz <39186039+aleskxyz@users.noreply.github.com>
@aleskxyz aleskxyz marked this pull request as draft January 1, 2025 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant