Kitchen-ci and VMware Fusion 12 + Vagrant plug-in

I have traditionally used Chef Test-Kitchen with VBox. Import a VM and run kitchen converge.

With Big Sur, migrating this to VMWare Fusion 12 and Vagrant Plugin 1.0.17. I’ve seen the setup working on previous macOS and Fusion 11.

I don’t create a vagrant box file, but import the .ovf into VMWare and start it up, so winrm ports are active. However it does not look as though the “vmware_desktop” driver is interacting with Fusion, but goes to download it, which it cannot of course.

Would greatly appreciate if anyone has had success configuring similar for Chef Kitchen and can share.

System configuration:

  • macOS 11.1
  • VMWare Fusion 12.1 (Latest)
  • Vagrant VMWare Plug-in 1.0.17 (purchased today)
  • Chef Workstation 20.7.96 (Infra Client 16.2.73)

VAGRANT_DEFAULT_PROVIDER

$ echo $VAGRANT_DEFAULT_PROVIDER
vmware_desktop

kitchen.yml:

driver:

name: vagrant provider: vmware_fusion

network:

  • [ “forwarded_port”, {guest: 5985, host: 55985} ]

provisioner: name: chef_zero log_level: warn

platforms:
  - name: W2012-3.2.12-14DEC20
    driver:
      host: 127.0.0.1
      port: 55985
      guest: windows
    transport:
      name: winrm
      elevated: true
      elevated_username: SYSTEM
      elevated_password: null
    driver_config:
      gui: true
      guest: windows
      username: Administrator
      password: *********
      communicator: winrm

suites:
....

When I run kitchen converge I get this:

-----> Starting Test Kitchen (v2.5.3)
-----> Creating <VM-W2012-3212-14DEC20>...
       Bringing machine 'default' up with 'vmware_fusion' provider...
       ==> default: Box 'W2012-3.2.12-14DEC20' could not be found. Attempting to find and install...
           default: Box Provider: vmware_desktop, vmware_fusion, vmware_workstation
           default: Box Version: >= 0
       ==> default: Box file was not detected as metadata. Adding it directly...
       ==> default: Adding box 'W2012-3.2.12-14DEC20' (v0) for provider: vmware_desktop, vmware_fusion, vmware_workstation
           default: Downloading: W2012-3.2.12-14DEC20
An error occurred while downloading the remote file. The error
       message, if any, is reproduced below. Please fix this error and try
       again.
       
       Couldn't open file /Users/<path_to>/.kitchen/kitchen-vagrant/VM-W2012-3212-14DEC20/W2012-3.2.12-14DEC20
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: 1 actions failed.
>>>>>>     Failed to complete #create action: [Expected process to exit with [0], but received '1'
---- Begin output of vagrant up --no-provision --provider vmware_fusion ----
STDOUT: Bringing machine 'default' up with 'vmware_fusion' provider...
==> default: Box 'W2012-3.2.12-14DEC20' could not be found. Attempting to find and install...
    default: Box Provider: vmware_desktop, vmware_fusion, vmware_workstation
    default: Box Version: >= 0
==> default: Box file was not detected as metadata. Adding it directly...
==> default: Adding box 'W2012-3.2.12-14DEC20' (v0) for provider: vmware_desktop, vmware_fusion, vmware_workstation
    default: Downloading: W2012-3.2.12-14DEC20

STDERR: An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.

Couldn't open file /Users/<path_to>.kitchen/kitchen-vagrant/VM-W2012-3212-14DEC20/W2012-3.2.12-14DEC20
---- End output of vagrant up --no-provision --provider vmware_fusion ----
Ran vagrant up --no-provision --provider vmware_fusion returned 1] on VM-W2012-3212-14DEC20

Regards and happy holidays.

Just to add plug-in installed:

$ vagrant plugin list
vagrant-vmware-desktop (2.0.3, global)