Set Priority for VirtualBoxVM.exe
Set Priority for VirtualBoxVM.exe
Hi... I am attempting to set a higher priority in Windows 10 for my running Virtual Box Linux guest. I noticed that in Task Manager, the same program - VirtualBoxVM.exe is used multiple (3) times. Whenever I try to elevate the priority on this / these .exe programs, only the first one seems to work. I'm using Windows sysinternals, Process Explorer to do this. I ran this normally, and in an Administrator prompt. That did not make a difference.
I also wrote a 64bit C++ program which uses Win32 API SetPriorityClass, as in SetPriorityClass(hProcess, ABOVE_NORMAL_PRIORITY_CLASS) to try to automate this. As when I used Process Explorer, the first VirtualBoxVM.exe 's priority would elevate successfully... but not the other two.
My user is Administrator level in my Windows 10 pc... and I can with Process Explorer click on any other running task and set the priority higher, and reset it back to normal - no problem.... That is, except for the programs that really need to be elevated - the ones mentioned here for the Virtual Box Linux guest.
Trying a different approach... I right-mouse-clicked on the VirtualBoxVM.exe tasks to Take Ownership using my Windows logon id... As before, only the first VirtualBoxVM.exe task allows me to. When I try to take ownership on the subsequent two, they fail. Then I suspected that there may be a problem in Process Explorer with setting the priority - because all three tasks are under the same name(?) But then again that's probably not the cause, as there are many other tasks in Process Explorer that have duplicate names, such as svchost.exe, or a browser tab task Those are able to have their running priority adjusted no problem.
Thank You for any help you can provide.
ETA: Using VirtualBox version 6.1.26 r145957 (Qt5.6.2) copyright 2021 Oracle Corporation and/or its affiliates.
I also wrote a 64bit C++ program which uses Win32 API SetPriorityClass, as in SetPriorityClass(hProcess, ABOVE_NORMAL_PRIORITY_CLASS) to try to automate this. As when I used Process Explorer, the first VirtualBoxVM.exe 's priority would elevate successfully... but not the other two.
My user is Administrator level in my Windows 10 pc... and I can with Process Explorer click on any other running task and set the priority higher, and reset it back to normal - no problem.... That is, except for the programs that really need to be elevated - the ones mentioned here for the Virtual Box Linux guest.
Trying a different approach... I right-mouse-clicked on the VirtualBoxVM.exe tasks to Take Ownership using my Windows logon id... As before, only the first VirtualBoxVM.exe task allows me to. When I try to take ownership on the subsequent two, they fail. Then I suspected that there may be a problem in Process Explorer with setting the priority - because all three tasks are under the same name(?) But then again that's probably not the cause, as there are many other tasks in Process Explorer that have duplicate names, such as svchost.exe, or a browser tab task Those are able to have their running priority adjusted no problem.
Thank You for any help you can provide.
ETA: Using VirtualBox version 6.1.26 r145957 (Qt5.6.2) copyright 2021 Oracle Corporation and/or its affiliates.
-
- Volunteer
- Posts: 5677
- Joined: 14. Feb 2019, 03:06
- Primary OS: Mac OS X other
- VBox Version: PUEL
- Guest OSses: Linux, Windows 10, ...
- Location: Germany
Re: Set Priority for VirtualBoxVM.exe
You've just discovered that the VirtualBox Hardening code works, and it can even protect the VirtualBoxVM process from yourself.
Re: Set Priority for VirtualBoxVM.exe
Thank You for your reply. I found the Diagnosing VirtualBox Hardening Issues thread. Apparently there are no issues(?) In looking for them by doing a search on the VBoxHardening.log file, I found this file, with today's date:
Code: Select all
Directory of D:\UtilUso\VirtBox\ORACLE_VM_FILES\Ubuntu_20.04\Logs
09/03/2021 07:41 AM 0 VBoxHardening.log
1 File(s) 0 bytes
Re: Set Priority for VirtualBoxVM.exe
Can the VirtualBox - the three VirtualBoxVM.exe program priorities be elevated by others... fromTask Manager or via a different program? Is this just a problem that I have?
-
- Volunteer
- Posts: 5677
- Joined: 14. Feb 2019, 03:06
- Primary OS: Mac OS X other
- VBox Version: PUEL
- Guest OSses: Linux, Windows 10, ...
- Location: Germany
Re: Set Priority for VirtualBoxVM.exe
No, it should be the same for everybody.
-
- Volunteer
- Posts: 5677
- Joined: 14. Feb 2019, 03:06
- Primary OS: Mac OS X other
- VBox Version: PUEL
- Guest OSses: Linux, Windows 10, ...
- Location: Germany
Re: Set Priority for VirtualBoxVM.exe
You could try VBoxManage modifyvm "VM name" --vm-process-priority (see 8.8.1. General Settings).
Re: Set Priority for VirtualBoxVM.exe
Thanks for your help fth0.
This is what I tried - in an Administrator level - MS Cmd Prompt box:
There was no "command was successful" or "command failed" mesage
When I restarted the Virtual Machine... nothing changed.. All three VirtualBoxVM.exe programs started on '8' / Normal priority level. The first VirtualBoxVM.exe is adjustable via Process Explorer... but that's it.
Any other suggestions are welcome.
. . .
This is what I tried - in an Administrator level - MS Cmd Prompt box:
Code: Select all
D:\UtilUso\VirtBox>vboxmanage list vms
"Win10" {794606d9-0f22-4cd6-8260-788096e39c48}
"PopOs_Lnx" {402b6928-3229-45bf-99f1-9ce83ead5264}
"PopOs_Lnx_Devel" {d159183e-7094-4df4-96d5-10d49006c10f}
"Ubuntu_20.04" {86bd86ae-846c-416e-9724-472ed5dae3ab}
D:\UtilUso\VirtBox>VBoxManage modifyvm "Ubuntu_20.04" --vm-process-priority high
When I restarted the Virtual Machine... nothing changed.. All three VirtualBoxVM.exe programs started on '8' / Normal priority level. The first VirtualBoxVM.exe is adjustable via Process Explorer... but that's it.
Any other suggestions are welcome.
. . .
Re: Set Priority for VirtualBoxVM.exe
Thinking that somehow, may be the Oracle VM VirtualBox Manager main app was locking me out of a file or a privilege... I closed that app and the VirtualBox Ubuntu app both.... Then retried in an Administrator level MS Cmd prompt box:
It didn't matter. I got the same results as last time.
Don't read this the wrong way... because the first VirtualBoxVM.exe being changeable in way of Priority - at least showed me that I was probably going in the right direction.... but why would one VirtualBoxVM.exe in Process Explorer be allowed to have its priority changed by the user, but the other two 'No'? Overall, this seems like a problem. Or maybe it's just me(?)
Thanks.
. . .
Code: Select all
VBoxManage modifyvm "Ubuntu_20.04" --vm-process-priority high
Don't read this the wrong way... because the first VirtualBoxVM.exe being changeable in way of Priority - at least showed me that I was probably going in the right direction.... but why would one VirtualBoxVM.exe in Process Explorer be allowed to have its priority changed by the user, but the other two 'No'? Overall, this seems like a problem. Or maybe it's just me(?)
Thanks.
. . .
-
- Volunteer
- Posts: 5677
- Joined: 14. Feb 2019, 03:06
- Primary OS: Mac OS X other
- VBox Version: PUEL
- Guest OSses: Linux, Windows 10, ...
- Location: Germany
Re: Set Priority for VirtualBoxVM.exe
The VirtualBoxVM process is shielded by the VirtualBox Hardening code, and neither any Malware nor you or me can change its process priority while it's running.
The --vm-process-priority setting is not supposed to change the base priority of the VirtualBoxVM process, but to select a priority scheme for its threads. It's targeted to virtualization professionals who know how to handle the 42ish threads of the VirtualBoxVM process.
Did you also try to start the VirtualBoxVM process with a higher priority right from the beginning, something like start "" /High "VirtualBoxVM --startvm ..."?
The --vm-process-priority setting is not supposed to change the base priority of the VirtualBoxVM process, but to select a priority scheme for its threads. It's targeted to virtualization professionals who know how to handle the 42ish threads of the VirtualBoxVM process.
Did you also try to start the VirtualBoxVM process with a higher priority right from the beginning, something like start "" /High "VirtualBoxVM --startvm ..."?
Re: Set Priority for VirtualBoxVM.exe
Thank you for the suggs.
Unfortunately... no. The
command did not help. In Process Explorer, the first VirtualBoxVM.exe started in High / 13 priority, and the other two still start in 8 / Normal. What was interesting.. is that I could not adjust any of the priorities at that point. Another interesting thing is that I was able to start up the VirtualBox VM machine using that command syntax, without starting the main VirtualBox Manager program first. So that's good to know.. in case it's ever needed to start like that.
. . .
Unfortunately... no. The
start "" /High VirtualBoxVM --startvm "Ubuntu_20.04"
command did not help. In Process Explorer, the first VirtualBoxVM.exe started in High / 13 priority, and the other two still start in 8 / Normal. What was interesting.. is that I could not adjust any of the priorities at that point. Another interesting thing is that I was able to start up the VirtualBox VM machine using that command syntax, without starting the main VirtualBox Manager program first. So that's good to know.. in case it's ever needed to start like that.
. . .
-
- Volunteer
- Posts: 5677
- Joined: 14. Feb 2019, 03:06
- Primary OS: Mac OS X other
- VBox Version: PUEL
- Guest OSses: Linux, Windows 10, ...
- Location: Germany
Re: Set Priority for VirtualBoxVM.exe
I also tried it myself today. While I could not influence the process priority (just like you), applying priority schemes worked nonetheless. You'd have to understand the fine details, to not break the rest of the host OS and/or VirtualBoxVM. Depending on what you want to achieve, you could also reduce priorities of other processes ...
-
- Posts: 15
- Joined: 14. Sep 2021, 14:12
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Debian 10
Re: Set Priority for VirtualBoxVM.exe
You can set the process priority for VBoxSVC.exe and Virtualbox.exe. Thelaunched VBox instance will follow the priority.
-
- Volunteer
- Posts: 5677
- Joined: 14. Feb 2019, 03:06
- Primary OS: Mac OS X other
- VBox Version: PUEL
- Guest OSses: Linux, Windows 10, ...
- Location: Germany
Re: Set Priority for VirtualBoxVM.exe
Not in my attempts. Can you give some more details or prove it?eebssk1 wrote:Thelaunched VBox instance will follow the priority.
-
- Site Moderator
- Posts: 39134
- Joined: 4. Sep 2008, 17:09
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Mostly XP
Re: Set Priority for VirtualBoxVM.exe
Now you have me puzzled! This is the Windows Hosts forum and you suggested launching specific "exe" files. It would be assumed that your suggestion was something that should work on Windows. Did you join a discussion in the wrong forum? Did you mean to say "does not work"?