Many thanks to Darius Davis from our engineering team who set me up on the solution.

This morning I “just wanted to spin up a container quickly”. Having a recent version of VMware workstation already on my computer, using vctl was my preferred choice (In case you missed the blog).

Problem#

My initial plans came to a halt as very attempt of a vctl system config or vctl system start threw an error:

ERROR Failed to prepare network: error code:exit status 4294967295, message:Error: Unrecognized command: listHostNetwork

Image Caption
vctl listnetworks error

Cause#

My system called an old version of vmrun in the %PATH%, in my case it was part of the VMware VIX package. This version didn’t provide the required commands for the needs of the most recent Workstation versions.
And this was the final clue from Darius, he asked me what the output of vmrun listHostNetworks is and it threw the same error as vctl.
As a reference, these are the versions involved:

  • VMware VIX: vmrun version 1.15.0 build-2985596
  • VMware Workstation 16.2.1: vmrun version 1.17.0 build-18811642

Resolution#

Verify the vmrun location that is executed by using Get-Command vmrun (this is essentially a which for Windows):

⚡ Dominik@MCSURFACE  C:\..\..\VMware Workstation  Get-Command vmrun | ft -auto

CommandType Name      Version Source
----------- ----      ------- ------
Application vmrun.exe 0.0.0.0 C:\Program Files (x86)\VMware\VMware VIX\vmrun.exe

Now, you need to remove this outdated vmrun from being called as the default. Uninstall the package (in my case VIX) if you do not need it, remove the directory from the %PATH% or find some other means (rename vmrun, …).

Next you can re-try setting up vmrun, here how it should look:

⚡ Dominik@MCSURFACE  C:\..\..\VMware Workstation  vctl system config
Preparing storage...
Container storage has been prepared successfully under C:\Users\dzorgnotti\.vctl\storage
Preparing container network...
Container network has been prepared successfully using vmnet: vmnet8
Checking installation of VMware Workstation...
VMware Workstation is ready, use 'vctl system start' to start container runtime
⚡ Dominik@MCSURFACE  C:\..\..\VMware Workstation  vctl system start
Downloading 3 files...
Downloading [crx.vmdk 35.12% kubectl.exe 16.30% kind-windows-amd64 86.67%]
Finished kind-windows-amd64 100.00%
Downloading [crx.vmdk 95.54% kubectl.exe 94.68%]
Finished crx.vmdk 100.00%

Finished kubectl.exe 100.00%
3 files successfully downloaded.
Preparing storage...
Container storage has been prepared successfully under C:\Users\dzorgnotti\.vctl\storage
Preparing container network...
Container network has been prepared successfully using vmnet: vmnet8
Launching container runtime...
Container runtime has been started.