VMware Communities
axel-d
Contributor
Contributor

VMware Workstation 17 Pro GUI does not open in RDP Session

Hello folks,
After unsuccessfully searching for a solution so far, I'm now trying it here in the community.
I have 2 problems with VMware Workstation 17 Pro.

Problem 1:
The VMware Workstation runs on a Windows 11 computer (freshly installed, both Windows 11 and VMware Workstation 17).
The User Administrator is activated and is used for all logins.
If I then log on directly to the Windows 11 computer and start the VMware Workstation everything is ok.
However, the Windows 11 computer usually does not have a screen/keyboard connected and is only administered via RDP (also with administrator login).
Unfortunately, this brings with it a problem:
When I log on to the Windows computer via RDP and start the VMware Workstation Pro program, it runs according to the task scheduler, but the GUI does not open.
When I then log on to the computer locally (without RDP), the GUI is already started and I can easily administer the VMs there.
What do I have to do to make this work in an RDP session?

Issue 2:
On the Windows 11 computer, a data backup runs at night via the task scheduler under the User Administrator with elevated rights.
Before backing up the partition on which the two virtual machines in use are located, I put the virtual machines in suspend mode with:
"C:\Program Files (x86)\VMware\VMware Workstation\vmrun.exe" -T ws suspend E:\Virtual-Machines\Cobalt\Cobalt.vmx
This works perfectly.
Then the backup runs, also perfectly.
However, if I want to start the virtual machines automatically again after the backup has been completed:
"C:\Program Files (x86)\VMware\VMware Workstation\vmrun.exe" -T ws start E:\Virtual-Machines\Cobalt\Cobalt.vmx nogui
then the error message comes:
Error: The file is already in use
and of course the virtual machine doesn't start.
What am I doing wrong here, what do I have to configure and where?

Please help me to solve the problem.

Greetings, Axel

axel-d
0 Kudos
9 Replies
DCasota
Expert
Expert

Hi,

For issue1, I think this is well explained here: A workaround for the fact that a scheduled task in Windows requires a user to be logged in - Stack O.... There are a few culprits with context of started VMware Workstation <> session user, onlogon and interactive. I remember to have coded something similar six years ago on Microsoft os version 10. For issue2, a background task might be unfinished.

 

edited: I just tried it out, and it still works on Windows 11, too.

1. Unzip the attached file yourtaskitem.zip e.g. to the public folder (typically c:\users\public). It contains one file named yourtaskitem.xml.

2. Open a Terminal (Administrator), and import the xml file 

$tmpxmlfile=$env:public+"\yourtaskitem.xml"

schtasks.exe /create /f /IT /tn "VMwareWorkstationOnLogon" /XML $tmpxmlfile

3. In System settings > Remodesktop > enable Remotedesktop.

4. From a remote system, start mstsc, connect to your computer with installed VMware Workstation and scheduled task, and login with a valid remote desktop user.

 

 

 

0 Kudos
axel-d
Contributor
Contributor

Hello DCasota,

thanks for your reply.

But it doen't match my problem.

It's not about having the workstation run without a user logged in.
In fact it's login concerned but it has to do with the Remote Desktop Session.
The machine which runs the VMware Workstation 17 is a Windows 11 host without screen and keyboard.
So I have to login with the help of RDP.
When I then login by RDP as an administrator and I want to check the 2 running virtual machines then I start the vmware.exe program.
But if I do it in the RDP session the program shows up in the taskmanager but not on the Desktop (the GUI is missing kompletely) nor in the taskbar.
When I close the RDP session (without logging off), attach screen and keyboard locally and log in there (same user) everything seems find.
I find the vmware.exe running fine, showing it's GUI and it sits in the taskbar as you would suppose.
Then, when I go back and open the RDP session again also everything is fine there.
So I guess it is a problem with vmware.exe, not correctly interacting with a remote desktop session.

Issue 2 I could fix last night.

axel-d
0 Kudos
DCasota
Expert
Expert

Hi,

Unfortunately I didn't understand the setup. The setup is important because of limitations. 

For instance, in Windows 11 Professional the ability to have multiple concurrent rdp sessions is not supported. By default, Windows 11 professional allows only one remote session at a time. However, there is a Windows 11 Enterprise version that supports multiple concurrent remote desktop sessions. 

 

0 Kudos
axel-d
Contributor
Contributor

Hi,

this is the Hard- and Software I use:

Machine 1 (from which I start the RDP session)
Dell-T7820
Prozessor Intel(R) Xeon(R) Gold 5118 CPU @ 2.30GHz   2.29 GHz (2 Prozessors)
Installed RAM 64,0 GB
Systemtype 64-Bit
Edition Windows 11 Pro for Workstations
Version 22H2
Installed Jan. 2023
Build 22621.3296
Windows Feature Experience Pack 1000.22687.1000.0
 
Machine 2 (the Host where the VMware Workstation 17 is running)
Dell 7040
Prozessor Intel(R) Core(TM) i5-6500T CPU @ 2.50GHz
Installed RAM 32,0 GB
Systemtype 64-Bit
Edition Windows 11 Pro
Version 23H2
Installed Mar. 2024
Build 22631.3296
Windows Feature Experience Pack 1000.22687.1000.0
 

So when I login to machine 2 everything is normal as it should be.

If I start any program (except VMware Workstation) everything is fine.

It's only the missing GUI, when I start VMware Workstation remotely.

axel-d
0 Kudos
DCasota
Expert
Expert

So the rdp session from machine1 to machine2 has been successfully established, and

- you successfully identify the desktop of machine2 as that one of machine2, and

- VMware Workstation installation machine2 is a standard installation (no 3rd party application virtualization / published app), but 

- starting VMware Workstation (c:\program files (x86)\VMware\VMware Workstation\vmware.exe) inside the rdp session of machine2 doesn't show up the VMware Workstation GUI, right?

I'm asking maybe stupid questions, but

- taskbar and borders are not made intentionally transparent, right? If yes, try to reset the settings.

- Did you install VMware Workstation with Enhanced keyboard driver? If yes, try to reinstall without the keyboard driver for testing purposes.

- Are Hyperv components installed on Windows11 on machine2? This shouldn't be the root cause for this issue. I have a similar setup.

 

 

 

 

0 Kudos
axel-d
Contributor
Contributor

Hi,

to answer your questions:

So the rdp session from machine1 to machine2 has been successfully established, Yes
and
- you successfully identify the desktop of machine2 as that one of machine2, Yes
and
- VMware Workstation installation machine2 is a standard installation (no 3rd party application virtualization / published app), Yes
but
- starting VMware Workstation (c:\program files (x86)\VMware\VMware Workstation\vmware.exe) inside the rdp session of machine2 doesn't show up the VMware Workstation GUI, right? Yes

I'm asking maybe stupid questions, but
- taskbar and borders are not made intentionally transparent, right? If yes, try to reset the settings. No
- Did you install VMware Workstation with Enhanced keyboard driver? If yes, try to reinstall without the keyboard driver for testing purposes. No
- Are Hyperv components installed on Windows11 on machine2? This shouldn't be the root cause for this issue. I have a similar setup. No

Also I tried to login with another admin user, there is no change, it has the same effect.

axel-d
0 Kudos
DCasota
Expert
Expert

Seems that a meccano is detecting the startup of vmware.exe when logging in via rdp because otherwise the solution with the xml file would work. So, remote desktop users group membership impact is the next check.

Check local security policy settings, ntfs permissions. Audit local events (failures), and have a view to file execution attempts especially when starting from rdp sessions.

Good luck!

0 Kudos
axel-d
Contributor
Contributor

Hello, after 2 more days trying to find and resolve the problem I guess I found the answer.

Summary:
RDP session created, connection established as administrator,
So started mstsc.exe as administrator, logged in as administrator of the remote computer, made various settings and saved them.
Then called up the desktop shortcut you just created.
After logging in, vmware.exe is called.
Nothing happens, but the vmware.exe task is running in the task manager.
Strangely, the task cannot be ended in the task manager. Of course, it only disappears when you log out.

Workaround:
Shortcut created on the desktop with:
C:\Windows\System32\mstsc.exe /ADMIN /v:192.168.x.x /f
Then called up the properties of the shortcut and checked “Run as administrator” on the Advanced button and saved with OK.

With this link called there are no more problems, vmware.exe starts and also shows the GUI.

I then rebooted the computer and tried again, the GUI still starts.
Now I'll keep an eye on this for a few more days before I finally disconnect the screen and keyboard and move the computer to its actual location.

axel-d
0 Kudos
DCasota
Expert
Expert

Glad it worked for you.

Btw. calling mstsc with /admin is useless in Windows 11, see e.g. RDP admin switch - Microsoft Q&A.

Having enabled remote desktop on Windows 11, specified the interactive users which should be eligible to connect, and configured the onlogon task as described above, should be all.

0 Kudos