Skip to content

refactor: require network adapter type#374

Merged
kp2099 merged 1 commit intomainfrom
refactor/require-network-adapter-type
Aug 25, 2025
Merged

refactor: require network adapter type#374
kp2099 merged 1 commit intomainfrom
refactor/require-network-adapter-type

Conversation

@tenthirtyam
Copy link
Copy Markdown
Collaborator

Description

Warning

The network_adapter_type must be provided based on the guest operating system and CPU architecture of the host operating system for the desktop hypervisor based on allowed network adapter types (vmxnet3, e1000e, and e1000). A default of e1000 is not appropriate.

This is a breaking change and requires a major version release.

This pull request enforces which network adapter types are supported for virtual machines, improves documentation, and adds validation logic. The changes ensure users can only select from the officially supported adapter types, and the documentation now reflects these options more clearly.

  • Added a new list of allowed network adapter types (vmxnet3, e1000e, and e1000) and enforced validation in HWConfig.Prepare to prevent unsupported values. [1] [2] [3]
  • Updated the network_adapter_type field in HWConfig and related documentation to specify the allowed values and clarify compatibility guidance. [1] [2] [3]
  • Changed creation logic to use the user-specified adapter type rather than a hardcoded default, ensuring correct configuration in generated VMX files.
  • Removed the default network adapter type constant, as the adapter type is now explicitly set by the user.

Resolved Issues

Closes #260

Rollback Plan

Revert commit.

Changes to Security Controls

None.

Signed-off-by: Ryan Johnson <ryan.johnson@broadcom.com>
@tenthirtyam tenthirtyam added this to the v2.0.0 milestone Aug 21, 2025
@tenthirtyam tenthirtyam self-assigned this Aug 21, 2025
@tenthirtyam tenthirtyam added breaking-change Breaking Change version/bump major Version: Bump Major refactor Refactor labels Aug 21, 2025
@tenthirtyam tenthirtyam changed the title [wip] refactor: require network adapter type refactor: require network adapter type Aug 21, 2025
@tenthirtyam tenthirtyam marked this pull request as ready for review August 21, 2025 03:30
@tenthirtyam tenthirtyam requested a review from a team as a code owner August 21, 2025 03:30
Copy link
Copy Markdown
Contributor

@kp2099 kp2099 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@kp2099 kp2099 merged commit cddb475 into main Aug 25, 2025
14 checks passed
@kp2099 kp2099 deleted the refactor/require-network-adapter-type branch August 25, 2025 16:26
@github-actions
Copy link
Copy Markdown

I'm going to lock this pull request because it has been closed for 30 days. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 29, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

breaking-change Breaking Change refactor Refactor version/bump major Version: Bump Major

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use a network adapter based on guest os and hypervisor cpu architecture

2 participants