VM lag or freeze

Discussions related to using VirtualBox on Windows hosts.
Post Reply
arf730
Posts: 5
Joined: 15. Oct 2023, 15:17

VM lag or freeze

Post by arf730 »

Hi everyone,

I am a newbie on VirtualBox and I encounter some issue running Windows Server 2019 VM with small lag to several seconds or sometime it freeze.

I searched on the web and I found this error in the VM logs :
- "HM: HMR3Init: Attempting fall back to NEM: VT-x is not available"

I ran both following commands to solve it as lot of posts on this forum indicate to do to solve this issue (thanks to all) :
- bcdedit /set hypervisorlaunchtype off => "hypervisorlaunchtype Off"
- DISM /Online /Disable-Feature:Microsoft-Hyper-V
After that, I reboot the host.

After executing these commands, its is a bit better, but I always encounter some lag sometimes less than a second and other times several seconds (till now, the VM not freeze again).

In the VM logs, I can see the log when I have a lag :
- 00:02:22.248000 VMMDev: vmmDevHeartbeatFlatlinedTimer: Guest seems to be unresponsive. Last heartbeat received 4 seconds ago
- 00:02:26.258724 VMMDev: GuestHeartBeat: Guest is alive (gone 8 039 716 391 ns)
- 00:02:44.246623 VMMDev: vmmDevHeartbeatFlatlinedTimer: Guest seems to be unresponsive. Last heartbeat received 4 seconds ago
- 00:02:46.251534 VMMDev: GuestHeartBeat: Guest is alive (gone 6 028 730 199 ns)

The VM use only :
- 15% of the CPU (4 vCPU assign)
- 35% of th3 RAM (6 GB assign)
- Nothing pass trough the network
- And IPv6 is disabled

The host :
- Almost sleep.
- Is on Windows 11 22h2 up to date.
- VirtualBox is up to date (7.0.10 r158379 (Qt5.15.2)) with "Oracle VM VirtualBox Extension Pack" installed.

Could you help me to solve this issue ?

Thanks in advance for your time and your answer.

Best regard :)
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: VM lag or freeze

Post by mpack »

Provide a VM log. Make sure the VM is fully shut down, then right click it in the manager UI. Select "Show Log" and save "VBox.log" (no other file) to a zip file. Attach the zip here.
arf730
Posts: 5
Joined: 15. Oct 2023, 15:17

Re: VM lag or freeze

Post by arf730 »

Hi,

Here are the logs.
I've annonymized some fields, like username and IP.

Thanks for your help.

Best regards
Last edited by arf730 on 15. Oct 2023, 23:24, edited 1 time in total.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: VM lag or freeze

Post by scottgus1 »

Looks like you missed the log. Please use the Attachments tab.
arf730
Posts: 5
Joined: 15. Oct 2023, 15:17

Re: VM lag or freeze

Post by arf730 »

The logs :)
Last edited by arf730 on 16. Oct 2023, 23:47, edited 1 time in total.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: VM lag or freeze

Post by mpack »

Erm... I asked for VBox.log and "no other file", so I'm puzzled why I ended up with half a dozen files split over two zips? I can tell everything I need to from the one file I asked for. If that turned out not to be enough then I'd say so after.

Anyway...

You have allocated 100% of CPU cores (4) to the VM, leaving none for the host. This could cause lagging. Try reducing to 2 cores. To forestall the usual response: threads are not cores.

You have graphics acceleration disabled but you then indulge in full HD+ graphics. You should enable 3D acceleration.

But the main problem is probably that you have Hyper-v enabled, this can slow down VirtualBox a lot.
00:00:05.454210 HM: HMR3Init: Attempting fall back to NEM: VT-x is not available
00:00:05.529602 NEM: info: Found optional import WinHvPlatform.dll!WHvQueryGpaRangeDirtyBitmap.
00:00:05.529615 NEM: info: Found optional import vid.dll!VidGetHvPartitionId.
00:00:05.529618 NEM: info: Found optional import vid.dll!VidGetPartitionProperty.
00:00:05.529687 NEM: WHvCapabilityCodeHypervisorPresent is TRUE, so this might work...
To get rid of Hyper-v see HMR3Init: Attempting fall back to NEM (Hyper-V is active).
arf730
Posts: 5
Joined: 15. Oct 2023, 15:17

Re: VM lag or freeze

Post by arf730 »

Hi,

Sorry for all log files. I sent all because some was generated before I ran commands to disable Hyper-V and some other was generated after I ran the commands yesterday.

So, it seems good now after reduce the number of CPU. I work on the VM all the evening and I didn't experiment lag or freeze.
Thanks a lot !

But I let the graphics acceleration disabled because when I enable it, I have some strange side effects on the display with strange letters and the text change when I move the mouse on it.
I will let it like this, because it works fine.

Thanks for your time and your help !
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: VM lag or freeze

Post by mpack »

It appears that you deleted the log files from the above discussion. That is considered forum vandalism and is a big no-no, because the log became community property when it was uploaded. Please restore the requested VM log or any person using your IP will receive no further help here.
arf730
Posts: 5
Joined: 15. Oct 2023, 15:17

Re: VM lag or freeze

Post by arf730 »

Hello,

I didn't know and didn't see this rule on the forum, hence the fact that I find the term vandalism and the threats a bit exaggerated.
Nevertheless, I've put back the log file you'd originally requested, the only one I'd kept following your previous message.

Having worked long hours yesterday with VirtualBox VMs, I again encountered regular lags. But in view of the climate of this discussion, I'm going to look for another solution to identify the root cause and resolve them.

Thank you and best regards
Attachments
VBox-SV01-2023-10-15-19-57-35-Posted.zip
(29.6 KiB) Downloaded 41 times
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: VM lag or freeze

Post by scottgus1 »

arf730 wrote: 18. Oct 2023, 12:53 I didn't know and didn't see this rule on the forum
Did you look for the forum rules? They are posted. Main page > Howtos and Tutorials > Rules and FAQ > The Forum Posting Guide.

However, not all rules for a body are always published. But now you know.

And, just like people who insist on fighting with the police at the stop instead of waiting for the proper place to do the fight in the courtroom, your feelings about the rule or the way it is expressed are immaterial here and at this time. You may discuss forum policies in Feedback & comment to the Administrators and Moderators.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: VM lag or freeze

Post by mpack »

arf730 wrote: 18. Oct 2023, 12:53 I didn't know and didn't see this rule on the forum
It's been a long time since I signed up for the forum, but it used to be the case that, before joining, you had to agree a contract which explicitly states that anything uploaded to the forum becomes community property and will remain behind for the benefit of the community. If you signed up to that then you should have been well aware that it's a no-no to delete community-owned posts or logs after your question is answered.

Also, I am a moderator, I am not your tech support. The job of a forum moderator is to ensure that forum rules are followed. Tech advice is secondary.

Thank you at least for remaining polite and restoring at least a partial log. And now that you know the rule, I suggest we put this behind us.
epri
Posts: 1
Joined: 29. Apr 2024, 11:04

Re: VM lag or freeze

Post by epri »

I have the same Problem.
I installed to new Version 7.0.14r161095 with the VirtualBox Extention Pack.
My System ist Windows 11 with actual Updates
Then I startet my VM with Windows 10 ant shutdown it without any action in the VM.
The System freeze during shutdon with this Log
00:06:33.704184 GUI: UISession::sltAdditionsChange: GA state change event came, notifying listeners
00:06:33.704199 GUI: UIMachineLogicNormal::sltCheckForRequestedVisualStateType: Requested-state=1, Machine-state=6
00:06:33.704373 GUI: UISession::sltAdditionsChange: GA state change event came, notifying listeners
00:06:33.704380 GUI: UIMachineLogicNormal::sltCheckForRequestedVisualStateType: Requested-state=1, Machine-state=6
00:06:33.746789 GUI: UISession::sltAdditionsChange: GA state change event came, notifying listeners
00:06:33.746802 GUI: UIMachineLogicNormal::sltCheckForRequestedVisualStateType: Requested-state=1, Machine-state=6
00:06:33.747128 VMMDev: Guest Log: 08:56:05.362759 main Ended.

Then J "Pause" the VM (Maschine / Pause) and remove the "Pause" in the Menue "Maschine" / "Pause". Then the VM continuing shutdown with the next Log-Entry
00:06:33.747128 VMMDev: Guest Log: 08:56:05.362759 main Ended.
00:07:41.061039 Changing the VM state from 'RUNNING' to 'SUSPENDING'
00:07:41.076163 AIOMgr: Endpoint for file 'F:\VM\Oracle\W10-Quicken\W10-Quicken.vdi' (flags 000c0781) created successfully
00:07:41.077533 PDMR3Suspend: 16 435 371 ns run time
00:07:41.077539 Changing the VM state from 'SUSPENDING' to 'SUSPENDED'
00:07:41.077545 Console: Machine state changed to 'Paused'
00:07:43.661354 Changing the VM state from 'SUSPENDED' to 'RESUMING'
00:07:43.661554 AIOMgr: Endpoint for file 'F:\VM\Oracle\W10-Quicken\W10-Quicken.vdi' (flags 000c0723) created successfully

Attached you will find the full Log
Attachments
VBox.zip
(50.32 KiB) Downloaded 1 time
multiOS
Volunteer
Posts: 877
Joined: 14. Sep 2019, 16:51
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: WIN11,10, 7, Linux (various)
Location: United Kingdom

Re: VM lag or freeze

Post by multiOS »

Your Log shows:
00:00:02.078852 ********************* End of CFGM dump **********************
00:00:02.078997 HM: HMR3Init: Attempting fall back to NEM: AMD-V is not available
00:00:02.101263 NEM: info: Found optional import WinHvPlatform.dll!WHvQueryGpaRangeDirtyBitmap.
00:00:02.101270 NEM: info: Found optional import vid.dll!VidGetHvPartitionId.
00:00:02.101272 NEM: info: Found optional import vid.dll!VidGetPartitionProperty.
00:00:02.101311 NEM: WHvCapabilityCodeHypervisorPresent is TRUE, so this might work...
That is the same issue as the OP had so the action recommended will be identical: See the guidance at: viewtopic.php?t=99390
Post Reply