

| vmui| I005+ Failed to connect pipe to virtual machine: Unknown error 2 (0x2). Make sure you have rights to run the program, access all directories the program uses, and access all directories for temporary files. | vmui| I005: VigorOnline_StartAndConnectEx Failed: VMware Workstation cannot connect to the virtual machine. | vmui| I005: VigorExecVMXExCommon: Failed to connect the pipe: Unknown error 2 (0x2) | vmui| I005: Starting vmx as C:\Program Files (x86)\VMware\VMware Workstation\圆4\vmware-vmx.exe | vmui| I005: Found vmx as C:\Program Files (x86)\VMware\VMware Workstation\圆4\vmware-vmx.exe

| vmui| I005: SnapshotTree: Populating (C:\Users\vmware\Documents\Virtual Machines\headless_test\headless_test.vmx) | vmui| I005: SnapshotTree: Emitting refresh (C:\Users\vmware\Documents\Virtual Machines\headless_test\headless_test.vmx) | vmui| I005: VMMKS::OnMKSDeviceInfoChanged: reset pipe name now in offline. | vmui| I005: Vix: : FoundryVMPowerStateChangeCallback: C:\Users\vmware\Documents\Virtual Machines\headless_test\headless_test.vmx, vmx/execState/val = poweredOff. The following is the last most important logs I get: So, any chance to get a definitive answer from VMware about this setup? Thanks! The problem is: It's not documented anywhere by VMware, who should simply know how things work, if VMRUN is designed to work in this context at all.

VirtualBox has pretty similar limitations and all of this even makes sense when keeping in mind that there's an explicit featured called shared VMs working differently. I'm somewhat sure now that VMRUN can't work WITHOUT interactive logon, because it's always resulting in the same errors like problems in finding some special pipes, getting some ports for "authd" and stuff like that. I've read a lot of posts regarding this topic and there seem to be 3 parties in the end: People like me claiming that it doesn't work, those who claim it does work BUT enable in their task that it should fire only on interactive login and VERY few people how claim to not do the former and claim that things work. Though, launching the VM this way always fails, while the same command line always succeeds when using it e.g. "C:\Program Files (x86)\VMware\VMware Workstation\vmrun.exe" -T ws start "C:\\headless_test.vmx" nogui

That task is configured to fire INDEPENDENTLY of any user login and execute as the specially created user. Instead, the current approach is to use task scheduler with a task fired after system boot executing the following command line. The important thing is that the VM needs to be executed using a specially restricted default user of Windows which WILL NOT logon itself interactively to get a desktop or shell. I'm using VMware Workstation Pro 16.1.1 and need to run a VM after Windows booted.
