VirtualBox Headless Frontend - Uses too much resources

Discussions related to using VirtualBox on Windows hosts.
Post Reply
Mihail-Cosmin
Posts: 7
Joined: 26. Apr 2022, 13:31

VirtualBox Headless Frontend - Uses too much resources

Post by Mihail-Cosmin »

Hello,

For the past 2 weeks I have been using 5 Windows VMs running headless at the same time.
The resources (CPU, RAM, Disk, Power) used by the virtualbox processes were unnoticeable, until today. Meaning, until today I was seeing: CPU < 10 % and RAM < 1000 MB, no disk and power spikes, from all 5 VMs combined.

But starting today I get huge resource usage from just one VM.
CPU > 30%, With 1 core (from 6) in settings.
RAM more than 2048 ( 2048 is the amount specified in Settings)
Hight disk usage at moments > 40%
Power usage always: Very High.

I have not changed any settings, so I don't understand how this could have happened.

Since this has started, I have tried changing the settings as indicated in some posts online. Ex: disable Nested Paging, Enabling 3D acceleration, changing the chipset, etc
But no combination of settings was able to fix this issue.
I have also tried to reinstall Virtualbox, but this also didn't fix the issue.

Some info:
Host:
Windows 10 Pro, 21H2, build 19044.1348
Processor: AMD Ryzen 5 4500U with Radeon Graphics 2.38 GHz
RAM: 24.0 GB

Guest:
Windows 10 Pro, 21H2, build 19043.1645
RAM: 2 GB
Motherboard Chipset: ICH9
Enable I/O APIC checked
CPU: 1 Core
Enable PAE/NX checked
Acceleration: Default
Hardware Virtualization (Enable Nested Pagining) checked
Audio Disabled
Graphics VBoxSVGA
3D Acceleration disabled.

My issue seems to be related to the bug from ticket #20574 but that seems to have been solved.

Any idea what could have happened, or what can I do?
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: VirtualBox Headless Frontend - Uses too much resources

Post by scottgus1 »

Mihail-Cosmin wrote:But starting today I get huge resource usage from just one VM.
CPU > 30%, With 1 core (from 6) in settings.
RAM more than 2048 ( 2048 is the amount specified in Settings)
Hight disk usage at moments > 40%
Power usage always: Very High.
How have you discovered and gathered this information, and what is going on inside the VM at the time? Windows Updates scanning, for example, draws on an OS rather a bit.
Mihail-Cosmin wrote:Since this has started, I have tried changing the settings as indicated in some posts online. Ex: disable Nested Paging, Enabling 3D acceleration, changing the chipset, etc
I hope you took a backup of the VM's folder before doing this. This kind of thrashing can make the problem worse by breaking what didn't need to be fixed. If the VM was running fine with the Virtualbox settings it had before, those settings won't break the VM later. The problem will have been caused by a new development other than the settings. Without a backup, this VM may be toast now.

Restore the VM from your backup to what it was when the problem first started and before you started 'fixing' it. :D Please do this first before providing logs below; we don't want to fix the damaged VM, only the first properly-set-up one.

Once you have the original VM restored, start the offending VM from full normal shutdown, not save-state. Run until you see the problem happen, then shut down the VM from within the VM's OS if possible. If not possible, close the Virtualbox window for the VM with the Power Off option set.

Right-click the VM in the main Virtualbox window's VM list, choose Show Log. Save the far left tab's log, zip it, and post the zip file, using the forum's Upload Attachment tab.

If you cannot restore the VM because there is no backup, then you'll have to make a new VM. The damage from the attempted 'fixes' may be too much.
Mihail-Cosmin
Posts: 7
Joined: 26. Apr 2022, 13:31

Re: VirtualBox Headless Frontend - Uses too much resources

Post by Mihail-Cosmin »

Hi,

Thanks for your reply.
I have 5 VMs that are clones of a "default" VM that I am not using at all (only for cloning).

Also, the settings changes, I tried only on one of the 5 VMs.
So, I am attaching the log from one of the other 4 VMs that I have not touched since the issue started. Hope this is fine.

How have you discovered and gathered this information, and what is going on inside the VM at the time? Windows Updates scanning, for example, draws on an OS rather a bit.
Windows updates inside the VM is disabled, and windows is set to high performance.

I was checking the resource usage from the Host machine using Task Manager, as below:
h t t p s:// ibb.co/Ntj9xMr
Attachments
Win2-2022-04-26-16-04-10.zip
Log
(28.43 KiB) Downloaded 51 times
Mihail-Cosmin
Posts: 7
Joined: 26. Apr 2022, 13:31

Re: VirtualBox Headless Frontend - Uses too much resources

Post by Mihail-Cosmin »

Hi,

Some new info:

Yesterday I was checking the Windows Features I have turned on. And turned off the Virtual Machine Platform. After restart there was an interesting effect. The RAM usage and the disk usage returned to normal, RAM < 50 MB per VM and disk usage < 0.2.
But the CPU and Power usage are still not ok.
My computer almost freezes after opening only 4 VMs.


PS: Regarding the Windows Features. At the moment I have no Windows Feature related to virtualization turned on ( Hyper-V is off, VM Platform is off, Hypervisor Platform is off, WSL is off)
BillG
Volunteer
Posts: 5102
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: VirtualBox Headless Frontend - Uses too much resources

Post by BillG »

This entry in your log shows that hardware virtualization is not available, probably because the Windows hypervisor is loaded.

00:00:00.779293 ********************* End of CFGM dump **********************
00:00:00.779348 HM: HMR3Init: Attempting fall back to NEM: AMD-V is not available

Simply turning off a feature does not solve your problem, as the hypervisor will still be loaded. Have you rebooted the the PC since the feature change?

If you still have problems, see this guide. viewtopic.php?f=25&t=99390
Bill
Mihail-Cosmin
Posts: 7
Joined: 26. Apr 2022, 13:31

Re: VirtualBox Headless Frontend - Uses too much resources

Post by Mihail-Cosmin »

If you still have problems, see this guide. viewtopic.php?f=25&t=99390
After following the instructions from the link you posted and restarting the host everything returned to normal. Thanks a lot.
But it's strange how this issue started suddenly without changes from my side.

What I have seen is that in the day that the issues started, Edge was updated on the Host and another service related to Edge was installed... I deleted it that day, don't remember exactly what it was named... Something like WebView runtime...
Could that have activated Hyper-V ?
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: VirtualBox Headless Frontend - Uses too much resources

Post by mpack »

Mihail-Cosmin wrote: But it's strange how this issue started suddenly without changes from my side.
Not strange to us, since it is reported here regularly. A Windows update can cause a relevant feature to be enabled, or IT support can enable a new policy, or perhaps you experimented with a new Windows feature (e.g. Windows Linux Subsystem), not realizing that it implies Hyper-v whether you continue to use WSL or not.
Mihail-Cosmin
Posts: 7
Joined: 26. Apr 2022, 13:31

Re: VirtualBox Headless Frontend - Uses too much resources

Post by Mihail-Cosmin »

Hello again,

I have the same issue again.
Running 5 VMs and they use too much CPU and power.
I have already checked and made sure Hyper-V is disabled completely.
In services I see this:
https://ibb.co/hmK1wWq

In Windows Features:
https://ibb.co/kX9t57C

If I run "systeminfo.exe" I get this:

Code: Select all

Hyper-V Requirements:      VM Monitor Mode Extensions: Yes
                           Virtualization Enabled In Firmware: Yes
                           Second Level Address Translation: Yes
                           Data Execution Prevention Available: Yes

Disabled DeviceGuard, CredentialGuard and Windows Defender's Core Isolation.
Run these commands:

Code: Select all

bcdedit /set hypervisorlaunchtype off 
and

Code: Select all

DISM /Online /Disable-Feature:Microsoft-Hyper-V
Shutd own and restarted, and still the VMs consume too much CPU.


I have checked the logs and I don't see "AMD-V is not available".
But I see lots of rows containing Hyper-V.
Does this means Hyper-V is still somehow present?

See attached my log
Attachments
Win1-2022-07-05-10-03-06.7z
Log
(22.28 KiB) Downloaded 11 times
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: VirtualBox Headless Frontend - Uses too much resources

Post by mpack »

I see no sign of a problem in the log. It reaches the GAs loaded stage in only 5 seconds. It was terminated at user request after four minutes.

If you want smoother performance then give the VM 2 cores. Attempting to run Win10 on one core will become very tedious. Enable 3D acceleration too.

You said you are running 5 VMs. Do you mean at the same time? That is not a good idea IMO. You have a 6 core host, so at most you should be running two VMs, plus the host. Maybe if it wasn't Windows 10 the arithmetic could be different, but Win10 is no lightweight OS.
Mihail-Cosmin
Posts: 7
Joined: 26. Apr 2022, 13:31

Re: VirtualBox Headless Frontend - Uses too much resources

Post by Mihail-Cosmin »

But they did work, all 5 of them at the same time without any issues and with minimal resource usage.
So, how can it be that the same setup works flawlessly sometimes and then some other times it freezes the computer because of high CPU usage?
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: VirtualBox Headless Frontend - Uses too much resources

Post by mpack »

"Not recommended" does not mean guaranteed to fail immediately. E.g. in the case of Windows 10 VMs, come update day they'll all try to do work at once. That's when the poor recipes will tell.
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: VirtualBox Headless Frontend - Uses too much resources

Post by fth0 »

Mihail-Cosmin wrote:So, how can it be that the same setup works flawlessly sometimes and then some other times it freezes the computer because of high CPU usage?
Since everything runs on the host CPU, everything running in the host OS can play a role, too.
Mihail-Cosmin
Posts: 7
Joined: 26. Apr 2022, 13:31

Re: VirtualBox Headless Frontend - Uses too much resources

Post by Mihail-Cosmin »

mpack wrote:"Not recommended" does not mean guaranteed to fail immediately. E.g. in the case of Windows 10 VMs, come update day they'll all try to do work at once. That's when the poor recipes will tell.
I think this was it. Windows Update or other optimizations of the VM OSes.

I disabled Windows Updates in all VMs, also disabled Cortana, telemetry, adjusted the performance options for best perfromance and now it returned to normal.
Post Reply