Closed niwamo closed 2 months ago
Thought of a couple things to add --
First, if you want to follow my testing methodology as described above, you'll need to proxy incoming connections, as the VMRest API only listens on localhost (127.0.0.1). You can achieve this with a port proxy: netsh interface portproxy add v4tov4 listenport=8697 listenaddress=0.0.0.0 connectport=8697 connectaddress=127.0.0.1
.
Secondly, the WSL firewall rule I mentioned can be accomplished with: New-NetFirewallRule -DisplayName "Allow all WSL inbound" -Direction Inbound -InterfaceAlias "vEthernet (WSL)" -Action Allow
Finally, I added more details to my documentation updates in https://github.com/niwamo/packer-plugin-vmware
Now that VMware Workstation 17.6 has been released (and VMware Fusion 13.6), I can share that we (HashiCorp + VMware) plan to drive this towards the use of the new vmcli
in the plugin.
Release Notes excerpt:
"
vmcli
is a command-line tool included with VMware Workstation Pro, enabling users to interact with the hypervisor directly from a Linux or macOS terminal, or the Windows command prompt. Withvmcli
, you can perform a variety of operations such as creating new virtual machines, generating VM templates, powering on VMs, and modifying various VM settings. Additionally, you can also create scripts to run multiple commands sequentially."
vmcli
will eventually replace both vmrun
and vdisk-manager
and we'll work to update this plugin to use this method for the next major (v2) and remove deprecations.
Ryan Johnson Distinguished Engineer, VMware by Broadcom
Community Note
Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request. Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request. If you are interested in working on this issue or have submitted a pull request, please leave a comment.
Description
Create a new "driver" for
vmrest
, the API that ships with VMWare Workstation Pro. Due to API limitations, only the vmware-vmx builder can be implemented.Use Case(s)
Implement the vmware-vmx functionality using the API. Enables using Packer from a remote host or from a container.
Potential configuration
Already implemented and ready for a PR. See https://github.com/niwamo/packer-plugin-vmware.
I also updated /docs/builders/vmx.mdx and ran
.web-docs/scripts/compile-to-webdocs.sh
.Opening an issue for discussion prior to making the PR, as directed in the README.
The code is reasonably well-commented, and I endeavored to limit changes outside of the new driver file to the greatest extent possible. Please take a look and lmk if/when you're ready for a PR.
Potential References
If you'd like to repeat my tests:
Note that this test config requires