Skip to content

feat: enable virtual hardware-assisted virtualization#213

Merged
nywilken merged 1 commit intomainfrom
feat/enable-vhv
Jul 5, 2024
Merged

feat: enable virtual hardware-assisted virtualization#213
nywilken merged 1 commit intomainfrom
feat/enable-vhv

Conversation

@tenthirtyam
Copy link
Copy Markdown
Collaborator

Description

Adds explicit option to enable virtual hardware-assisted virtualization.

vhv_enabled (bool) - Enable virtual hardware-assisted virtualization for the virtual machine. Defaults to false.

vhv_enabled = true

Testing

packer-plugin-vmware on  feat/enable-vhvgo fmt ./...

packer-plugin-vmware …make generate
2024/07/02 00:33:05 Copying "docs" to ".docs/"
2024/07/02 00:33:05 Replacing @include '...' calls in .docs/
Compiling MDX docs in '.docs' to Markdown in '.web-docs'...

packer-plugin-vmware on  feat/enable-vhvmake build

packer-plugin-vmware on  feat/enable-vhvmake dev
packer plugins install --path packer-plugin-vmware "github.com/hashicorp/vmware"
Successfully installed plugin github.com/hashicorp/vmware from /Users/ryan/Library/Mobile Documents/com~apple~CloudDocs/Code/Personal/packer-plugin-vmware/packer-plugin-vmware to /Users/ryan/.packer.d/plugins/github.com/hashicorp/vmware/packer-plugin-vmware_v1.0.12-dev_x5.0_darwin_arm64

packer-plugin-vmware on  feat/enable-vhvmake test
?       github.com/hashicorp/packer-plugin-vmware       [no test files]
?       github.com/hashicorp/packer-plugin-vmware/version       [no test files]
ok      github.com/hashicorp/packer-plugin-vmware/builder/vmware/common 6.601s
ok      github.com/hashicorp/packer-plugin-vmware/builder/vmware/iso    1.829s
ok      github.com/hashicorp/packer-plugin-vmware/builder/vmware/vmx    2.207s

If vhv_enabled = true, results in the following in the .vmx:

...
uuid.action = "create"
vhv.enable = "TRUE"
virtualhw.productcompatibility = "hosted"
...

If vhv_enabled = false or not provided, results in the following in the .vmx:

...
uuid.action = "create"
vhv.enable = "FALSE"
virtualhw.productcompatibility = "hosted"
...

Reference

Closes #41

@tenthirtyam tenthirtyam added the enhancement Enhancement label Jul 2, 2024
@tenthirtyam tenthirtyam self-assigned this Jul 2, 2024
@tenthirtyam tenthirtyam requested a review from a team as a code owner July 2, 2024 04:36
@tenthirtyam tenthirtyam added this to the v1.0.12 milestone Jul 2, 2024
Copy link
Copy Markdown
Contributor

@nywilken nywilken left a comment

Choose a reason for hiding this comment

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

This looks good to me. I left a couple of suggestions to lean on the template engine for converting boolean types to strings.

Adds explicit option to enable virtual hardware-assisted virtualization.

Ref: #41

Signed-off-by: Ryan Johnson <ryan@tenthirtyam.org>
Copy link
Copy Markdown
Contributor

@nywilken nywilken left a comment

Choose a reason for hiding this comment

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

The updates look great! :shipit:

@nywilken nywilken merged commit 9354df9 into main Jul 5, 2024
@nywilken nywilken deleted the feat/enable-vhv branch July 5, 2024 13:26
@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 1, 2026

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 Feb 1, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancement Enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add property to set the vhv.enable vmx property

2 participants