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

Add support for additional console types (file, udp, and others) #1132

Open
Minivolk02 opened this issue Nov 24, 2024 · 0 comments
Open

Add support for additional console types (file, udp, and others) #1132

Minivolk02 opened this issue Nov 24, 2024 · 0 comments

Comments

@Minivolk02
Copy link

Issue Description:

Currently, when creating a virtual machine (VM) with Terraform Provider for libvirt (terraform-libvirt-provider), only three types of consoles are allowed: pty, tcp, and dev. However, the official libvirt API supports a wider range of console types, such as file, udp, and others, which can be necessary and useful in multiple scenarios.

The lack of support for these types limits the ability to configure VMs effectively and prevents users from leveraging the full potential of libvirt when working with console settings. This can critically impact advanced use cases like flexible logging, debugging, network integration, and setup customization.

Steps to Reproduce:

  1. In a Terraform configuration file, try to set up a console of type file or udp for a VM.
  2. Specify the console parameters in the VM configuration block.
  3. Execute terraform apply.

Expected Behavior:

The Terraform Provider should allow specifying console types such as file, udp, and all other types supported by libvirt. Appropriate documentation and validation for these types should also be provided within the provider.

Actual Behavior:

Currently, specifying any console type other than pty, tcp, or dev results in an error, as these options are not supported by terraform-libvirt-provider.

References to official libvirt documentation:

The official libvirt documentation highlights the availability of the following additional console types:
For example libvirt console type file (https://libvirt.org/formatdomain.html#consoles-serial-parallel-channel-devices)

Proposed Improvement:

  • Extend the list of supported console types to include options such as file, udp, and others.
  • Ensure proper handling and validation of these console types by both Terraform and libvirt.
  • Update the project documentation to reflect the changes, providing examples for the new console types.

Additional Context:

Extending the range of valid console types would allow developers to configure VMs more flexibly, covering scenarios like:

  • Logging console output to a file (file).
  • Streaming console data over the network using the UDP protocol (udp).
  • Other workflows enabled by libvirt's rich API.
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

No branches or pull requests

1 participant