VMware Communities
v_enom
Contributor
Contributor

VMware windows guest machine freezes during work by RDP

Preconditions:
I have a guest virtual machine on Windows 8.1 using VMWare Workstation 15.5.6 build-16341506. I use it for development. It is places on a separate SSD disk of the host machine.

I have a host machine on the same Windows 8.1 in my office with guest virtual machine above. Windows is installed on C:\ drive of own SSD disk.

Steps:

  1. I connect  via RDP  from home (windows 10) to host machine in office.
  2. From host machine I open virtual machine (guest)
  3. Write code and work in guest machine.
  4. Collapse RDP  connection to host machine (return to home)
  5. Return back to host machine and virtual machine (key step)
  6. Work, wait for 2-5 minutes. Make some operation like run desktop application or Visual Studio, or code in Visual Studio IDE. Or sometime (randomly) when SSD read or write operations accrued.

Expected result: no freezes for host or guest machine
Actual Result: guest machine freezes for about 15-30 seconds. CPU (previously I thought that HDD) usage of host machine rises to 100%.  I can collapse VMWare workstation while it it frozen and work by RDP with host machine without any problems

Additionally: If go to office and work with guest VMWare machine - I will never have any freezes. In version 12 I had no such a problem.

Also I already changed system HHD of host machine  to SSD. And mainboard was also changed

 

Could you please help to fix this problem?

Reply
0 Kudos
27 Replies
RaSystemlord
Expert
Expert

I'm no RDP specialist, but since you haven't got other replies ...

I'm not sure what your workflow really is. There is obscurity in the Steps. However, I assume that you mean that Guest freezes ONLY sometimes when used from the Host when the connection to the Host is RDP. Can you explain what those circumstances are in RDP use, when it freezes.

Since this isn't a problem when physically using the Host, this must be RDP related. We seem to be talking about a corporate PC as the virtualization platform. Is it possible that some implemented security is capable of analyzing the use of PC through RDP and deducting that SOME kind of use is suspicious?

In principle, a wrongly implemented virus scanner will freeze the Guest use for a certain time, if VMware disk files are being analyzed. Now, in this case it seems that this too-eager-scanning-of-files, would need to be related to RDP use, only ... and perhaps in SOME kind of RDP use only - complicated deduction process is not that far-fetched nowadays. This virus scanner thingy is just one thing - don't know what security programs actually would do in this case.

Reply
0 Kudos
v_enom
Contributor
Contributor

Thanks for reply, RaSystemlord.

>There is obscurity in the Steps. 

I just connect to my office machine (host) where I use virtual machines (guest) as an isolated environments. All like in steps.

>Can you explain what those circumstances are in RDP use, when it freezes.

 to reproduce I have to collapse RDP connection and return back to it. Then open Visual Studio IDE instance. In this moment if freezes.  I check HDD usage and see 100%. Sometime If I open VS IDE without collapse it also may freeze. Never during operations not related with HDD. But I want to take attention, that I tried to change my  HHD and even use SSD drive for guest VM was well for system itself.

>Is it possible that some implemented security is capable of analyzing the use of PC through RDP and deducting that SOME kind of use is suspicious
A good case, but we have low security protection. I don't have antivirus to scan.

Reply
0 Kudos
RaSystemlord
Expert
Expert

OK, I understand that something indeed happens between two RDP sessions (or between what exactly?, read further). I wonder what your corporate PC is doing and why? You say that disk activity is 100%. That would definitely point to some security measures going on.

A few questions:

- how long is there between RDP sessions? Is it possible that PC would go to suspend in between?

- what do you mean by "collapse RDP"? Does it involve interrupting RDP?

- have you studied RDP bugs? This doesn't seem like anything VMware-specific ... although, I'm not an expert in anticipating RDP-VMware -relationship, if there is something specific in that

Reply
0 Kudos
wila
Immortal
Immortal

Hi,

Unless it is a requirement, try disabling 3D acceleration on the VM.

--
Wil

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva
Reply
0 Kudos
v_enom
Contributor
Contributor

>>between two RDP sessions

The session is the same, I don't disconnect from RDP, I just switch to the desktop of my home computer.

>> what do you mean by "collapse RDP"? Does it involve interrupting RDP?

No, I never said that I interrupt RDP (disconnect). Collapse means exactly collapse:  press " - " button the RDP window to switch to home computer desktop. In this case I have like 3 working computers (desktops) at the same time.

>>have you studied RDP bugs? This doesn't seem like anything VMware-specific

The problem didn't happen with older VMWare player versions. Sine 11 or 10 I think. And I can' downgrade to it. But maybe it's RDP. Have no idea.

Reply
0 Kudos
RaSystemlord
Expert
Expert

@wila 

"try disabling 3D acceleration on the VM"

Now, that's a good candidate for VMware-RDP-relationship problem. Thanks!

Why the problem occurs on the second RDP session (or whatever that "second" really means, a question arised above) is still obscure ... but let's see what the answers and results are.

EDIT: There was already an answer before ending this post.

Yes, that is what collapse literally means. I just wanted to make sure.

Reply
0 Kudos
v_enom
Contributor
Contributor

@wila 
"try disabling 3D acceleration on the VM"

It was disabled and virtualization of CPU as well. This doesn't help.
I've just re-tested: I - tried to close Visual Studio window with projects reload. I check HDD load and it was 10% for host and guest machines. But CPU was 100%.

 

After that I tried to repeat operation with starting new instance of VS IDE to cause freeze and could not reproduce. Because the last freeze was minutes ago.

Also, previously I've added all SSD with virtual machines and process of VMware player to exclusion of Windows Defender (internal antivirus).

Reply
0 Kudos
v_enom
Contributor
Contributor

@RaSystemlord @wila 

I've mixed up with forum interface to edit a reply. Instead of that I pressed a "correct answer" because word correct also means edit in some languages and set your answer as correct, while it's wrong. There is still no solution! 

 

I've added a screenshot to display home-host-guest relations. Guest vmware machine works in full screen mode.

Снимок.JPG

Reply
0 Kudos
wila
Immortal
Immortal

Hi,

Seems you found how-to unmark the correct answer already.

re. the problem.

It sounds very much like a not enough available resources issue. Eg. either memory getting swapped or an overcommitment of CPU cores. My guess would be the former, especially so as newer VM's require more RAM than before.

What is the host RAM config and how much RAM did you assign the guest?

--
Wil

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva
Reply
0 Kudos
RaSystemlord
Expert
Expert

... and monitor how much memory RDP-session "rejoining" will consume. Is your Host memory allocation at the edge? You might not notice this when you first start your RDP-session, but when you "rejoin", you will notice it an interrupt, because nothing is supposed to happen.

Running out of memory, will cause an interrupt AND hard disk operation at the max. You may need to monitor&calculate with several ways, because Task Manager does not always show the correct vmware memory consumption (there is detailed view and all that), however you always know what vmware takes, because you set it up yourself.

Reply
0 Kudos
v_enom
Contributor
Contributor

@wila 

Guest VM RAM - 21GB of 32GB, Processor cores: 3 of 4 (core I5-3570), HDD - 120 GB, Graphic card integrated to mainboard. No acceleration. Host machine used RAM - 27 of 32

>Eg. either memory getting swapped or an overcommitment of CPU cores.
Also agree. but I tried reduce swap to minimum value. No difference. Now I have 256-2048 MB for single disc on guest machine and no swap for host machine.

@RaSystemlord 
Running out of memory, will cause an interrupt AND hard disk operation at the max. 

Sometime (once a month) I can meet this problem, all 21 GB may be eaten by IDE. But I reproduce problem with available 7-8 GB

>and monitor how much memory RDP-session "rejoining" will consume. What should I check? I just need to add the host office machine runs no services or app, but VMWare.

>You may need to monitor&calculate with several ways, because 
What should I do? Where can I get instructions and tools to measure historical data (because during the freeze moment I can't check which process eats memory)

 

 

 

 

Reply
0 Kudos
wila
Immortal
Immortal

Hi,


@v_enom wrote:

@wila 

Guest VM RAM - 21GB of 32GB, Processor cores: 3 of 4 (core I5-3570), HDD - 120 GB, Graphic card integrated to mainboard. No acceleration. Host machine used RAM - 27 of 32

>Eg. either memory getting swapped or an overcommitment of CPU cores.
Also agree. but I tried reduce swap to minimum value. No difference. Now I have 256-2048 MB for single disc on guest machine and no swap for host machine.


On that CPU you should not use more than 2 cores for the VM IMO. Leaving just 1 core for the host can create CPU scheduling issues.

re. swap. I'm not sure that I am following what you are saying with "reduce to a minimum", sounds like you are talking about having reduced the swap file size.
Are you saying that you set "no swap" for the host? By default Windows handles the swap file size itself. You can limit that to a minimum or even disable it, but that won't fix issues once the host runs out of resources. Having no swap space when the host runs out of RAM will instead create issues.

Or are you talking about a setting in VMware workstation on how it should handle VM's running all in RAM or not?

--
Wil

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva
Reply
0 Kudos
RaSystemlord
Expert
Expert

Still cannot figure out why this is, but I can offer a few points:

- what I meant with memory "monitoring" is that you observe all the things that you do, which consume lots of memory (I cannot know, if you have any of such), while it is not freezing

- with 21 GB, I would assume that you cannot eat up all the memory with "extra software" running on host or with RDP

However, I cannot understand how much you have reserved space for your VM and how much memory you have allocated to Guest?

If you have a single 120 GB HDD and running a VM from that - this IS very bad, if the HDD is any older, which it probably is based on the size. Perhaps you mean SDD?

If you have a single file allocation for VM, running on an old HDD (ide?), I'm expecting anything bad happening. An old HDD is much more slower than a bandwidth comparison to SDD would suggest.

Even if you have a SDD of that size, I'm sure it is close to 90% consumption or even over that. That will deteriorate the disk fast (if it is from an older generation) and perhaps you feel the symptoms of that already?

The solution is easy and rather affordable: a second disk, which holds all the data including your VM, or if you have a laptop, an external disk with USB-3 interface with SDD inside. The disk cover costs under 20 euros and the SDD-disk is a standard one (M.2 NVME disk is also possible, but covers are much more expensive, and you might not have any speed advantage, if your USB-3 level isn't very recent). If not clear, an external USB-3 is exponentially better than any old HDD ... if not obvious, you need to have USB-3 interface in your computer, USB-2 is very bad, too).

However, none of those explain why it happens with the 2nd RDP usage. Running out of memory and a very slow disk, would explain everything.

Running out of memory, would mean that you need to have a badly behaving application, which will allocate much more memory than it needs and which behavior you cannot foresee. You could use, on the Host, the Task Manager Details and graphics to find what happens during collapsing RDP and getting back there.

Reply
0 Kudos
RaSystemlord
Expert
Expert

As an addition, similar thoughts as wila, which I forgot:

- there is no need to fiddle with swap in normal Windows use. Do not take swap OUT and think that it fixes anything. I would return everything to defaults and see what happens. You need to do something about your disk, if that is why you have done this (see my post above)

- I would also reserve only 2 cores out from 4 to a VM

Reply
0 Kudos
v_enom
Contributor
Contributor

@wila 

>CPU you should not use more than 2 cores for the VM IMO. Leaving just 1 core for the host can create CPU scheduling issues. re. swap.

I could agree, if the problem appears without RDP as well. But it related to RDP only (network connection). So it means that 1 core is enough for host. Also, I follow this rule for years and never meet any problems.

>sounds like you are talking about having reduced the swap file size.

Yes. I reduced size for host and disabled for guest (when I tried experiments to figure out issue). Previous time I increased this size. No difference

 

>>a setting in VMware workstation on how it should handle VM's running all in RAM or not?

I don't know about such setting.

 

 

Reply
0 Kudos
v_enom
Contributor
Contributor

@RaSystemlord 
>>However, I cannot understand how much you have reserved space for your VM and how much memory you have allocated to Guest?

1. Host machine: 32 GB of  RAM is installed. 21 GB reserved for guest (21 is in use). 

2. Guest machine: 21 of RAM is installed. Usually used about 12 GB of RAM realtime. No load. 

>>If you have a single 120 GB HDD and running a VM from that - this IS very bad, if the HDD is any older, which it probably is based on the size. Perhaps you mean SDD?

Yes, 120GB separate SSD for VM.

>>That will deteriorate the disk fast (if it is from an older generation) and perhaps you feel the symptoms of that already?

No, I didn't. If the problem was with a disk, I could meet it working on host machine directly. Also, sometime I can disconnect SSD with virtual machine, bring it home and use home PC as a host (32 GB and 4 CPUs). And here it also works perfectly.

 

>he solution is easy and rather affordable: a second disk, which holds all the data including your VM,
I have two separated physically SSD disks (2 devices. 120 GB each) on host machine in office: one for windows second  (Drive C:\windows ) one for virtual machine (Drive E:\vmware\ ) where my image is situated. So there is a parallel access of operation system to its files and to vmware image files (separate physical drives)

>You could use, on the Host, the Task Manager Details and graphics to find what happens during collapsing RDP and getting back there.

I tried, but I see nothing special or unusual. Some increase of cpu, disk or network. It could be good to have logs of some system profiler to find which app starts to eat resources and which type of the resource.

Reply
0 Kudos
wila
Immortal
Immortal

Hi,


@v_enom wrote:

@wila 

>CPU you should not use more than 2 cores for the VM IMO. Leaving just 1 core for the host can create CPU scheduling issues. re. swap.

I could agree, if the problem appears without RDP as well. But it related to RDP only (network connection). So it means that 1 core is enough for host. Also, I follow this rule for years and never meet any problems.

Well.. things change and requirements from host OS, virtualisation layer and RDP are all under constant change. What used to work doesn't keep on working after updates or XYZ and you'll have to adapt.


>sounds like you are talking about having reduced the swap file size.

Yes. I reduced size for host and disabled for guest (when I tried experiments to figure out issue). Previous time I increased this size. No difference

Your choice, I do not recommend.


>>a setting in VMware workstation on how it should handle VM's running all in RAM or not?

I don't know about such setting.


VMware Workstation Pro -> Edit -> Preferences -> Memory

Seems you are using Player. You can still apply these settings via the vmx, you'll have to google how-to do that (as I don't have those settings here ready and I would have to do the same.. )

Good luck,
--
Wil

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva
Reply
0 Kudos
RaSystemlord
Expert
Expert

@v_enom 

Obviously, we haven't found anything which would directly explain this. I'm trying to figure out reasons, which might indirectly influence this - something which is not configured optimally or something which could have a foreseeable bug in it ... and thus cause the failure that you are seeing.

In your system and the way how you use memory and disks, I cannot anticipate any problems. There is perhaps one thing: how is your VM storage space allocated, also how it is allocated in regard to overall 120 GB space? The normal way would be something like: max 90 GB with all the virtual disks (could be two inside the VM) and in slices, not one file.

Is your VM-computer on the level of 15.x?

If there is nothing there - I would search for Windows 8.1 and RDP themselves for a fix. 

EDIT: For the latter: Obviously Event Viewer needs to be checked, like if some service interrupted and started again. Also *temp* with its logs would be an important study.

Reply
0 Kudos
v_enom
Contributor
Contributor

>>VMware Workstation Pro -> Edit -> Preferences -> Memory

got what you mean. Yes, I don't use all the memory. Just 21 of 32 GB.

Reply
0 Kudos