Page 1 of 1

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

Posted: 9. Dec 2018, 10:52
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

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

Posted: 9. Dec 2018, 10:53
by 340078023@QQ.COM
gui ok

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

Posted: 9. Dec 2018, 12:00
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