The CPU usage can be modified in the graphics state, and the command line is invalid.

Discussions related to using VirtualBox on Windows hosts.
Post Reply
340078023@QQ.COM
Posts: 2
Joined: 9. Dec 2018, 10:47

The CPU usage can be modified in the graphics state, and the command line is invalid.

Post by 340078023@QQ.COM »

图形状态下可以修改CPU占用率,命令行无效
vboxmanage modifyvm "111" --cpuexecutioncap 11
VBoxManage.exe: error: The machine '111' is already locked for a session (or bei
ng unlocked)
VBoxManage.exe: error: Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), c
omponent MachineWrap, interface IMachine, callee IUnknown
VBoxManage.exe: error: Context: "LockMachine(a->session, LockType_Write)" at lin
e 523 of file VBoxManageModifyVM.cpp

use gui modi ok
Last edited by socratis on 9. Dec 2018, 11:59, edited 2 times in total.
Reason: Changed title to something more appropriate.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: The CPU usage can be modified in the graphics state, and the command line is invalid.

Post by socratis »

Changed the title from "图形状态下可以修改CPU占用率,命令行无效" to the English "The CPU usage can be modified in the graphics state, and the command line is invalid."

The VM needs to be completely shut down if you want to modify the hardware. Not paused, not saved. Completely shut down from within the VM.
340078023@QQ.COM wrote:
vboxmanage modifyvm "111" --cpuexecutioncap 11
You can't use the "modifyvm" while the VM is running. You need to use the "controlvm". So, the command should be:
  • 
    VBoxManage controlvm "111" --cpuexecutioncap 11
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Post Reply