VMware Communities
ansred
Contributor
Contributor
Jump to solution

Issue - vmrun - Running with -vp encryptedVirtualMachinePassword

Greetings,

 

I am trying to have a .bat file to run a workstation via command line.

 

It works fine with running unencrypted VM.

 

Example:

 

 

 off
echo Running Win 11 headless
SETLOCAL
SET Path=%path%;"C:\Program Files (x86)\VMware\VMware VIX"
vmrun start "T:\VMware\Windows 11\Windows 11.vmx"
ENDLOCAL

 

 

 

 

However, when trying to use the vmrun, with encrypted VM, it prompts to enter the password:

ansred_0-1644533126851.png

 

From the command line getting error:

 

C:\Program Files (x86)\VMware\VMware VIX>vmrun start "T:\VMware\Windows 11\Windows 11.vmx"
Encrypted virtual machine password:
Error: The operation is not supported

 

 

Note: Everything works fine from the GUI, however, I want to have it included within the .bat file.

ansred_0-1644534206335.png

 

 

I found the following KB:

https://docs.vmware.com/en/VMware-Fusion/12/com.vmware.fusion.using.doc/GUID-BA4C49B3-587C-4ED7-905E...

 

And tried to tweak the .bat file, but I am not able to run the machine.

 

Any idea what should be changed to get the .bat file working for the encrypted VM?

 

Thanks

 

 

 

 

Reply
0 Kudos
1 Solution

Accepted Solutions
ansred
Contributor
Contributor
Jump to solution

I found the fix.

 

Using the following .cmd file instead works fine.

 

"C:\Program Files (x86)\VMware\VMware VIX\vmrun.exe" -vp myVMpassword start "T:\VMware\Windows 11\Windows 11.vmx" nogui

View solution in original post

Reply
0 Kudos
2 Replies
ansred
Contributor
Contributor
Jump to solution

I found the fix.

 

Using the following .cmd file instead works fine.

 

"C:\Program Files (x86)\VMware\VMware VIX\vmrun.exe" -vp myVMpassword start "T:\VMware\Windows 11\Windows 11.vmx" nogui
Reply
0 Kudos
munrobasher
Enthusiast
Enthusiast
Jump to solution

FYI: The "nogui" parameter is mandatory when you use -vp switch.

Reply
0 Kudos