Page 1 of 1

Unable to change CPU amount

Posted: 9. Dec 2012, 23:36
by noteirak
Using version 4.2.4, I have several machines setup with 4 CPUs. I am trying to put them back to 2 CPUs but I have the following errors on some of them :

Code: Select all

00:00:11.257331 nspr-3   ERROR [COM]: aRC=NS_ERROR_INVALID_ARG (0x80070057) aIID={22781af3-1c96-4126-9edf-67a020e0e858} aComponent={SessionMachine} aText={There is still a CPU attached to socket 2.Detach the CPU before removing the socket}, preserve=false
It did work on some of them, but not on some others...

The VMs are all shutdown, I even rebooted the host and directly tried to change this setting, but no luck...

Tried to lookup the issue but nothing came up on google or on the forum. Any idea what could cause this?

Re: Unable to change CPU amount

Posted: 9. Dec 2012, 23:42
by Perryg
Perhaps you could post the exact command?
What are the differences of the ones that worked ad the ones that did not?

Re: Unable to change CPU amount

Posted: 9. Dec 2012, 23:47
by noteirak
The ones that worked are Debian 64 bits, Windows 2008 64 bits & Windows 7 64 bits VMs.
The ones that didn't work are Debian 64 bits, Windows 2003 64 bits VMs.
There are no noticable differences between them really, none that I could find at least.

The command :

Code: Select all

virtualbox@gateway:~$ vboxmanage modifyvm vSRV002 --cpus 2
VBoxManage: error: There is still a CPU attached to socket 2.Detach the CPU before removing the socket
VBoxManage: error: Details: code NS_ERROR_INVALID_ARG (0x80070057), component SessionMachine, interface IMachine, callee nsISupports
VBoxManage: error: Context: "COMSETTER(CPUCount)(ValueUnion.u32)" at line 596 of file VBoxManageModifyVM.cpp
virtualbox@gateway:~$
But works fine here :

Code: Select all

virtualbox@gateway:~$ vboxmanage modifyvm vDESK001 --cpus 4
virtualbox@gateway:~$ vboxmanage modifyvm vDESK001 --cpus 2
virtualbox@gateway:~$

Re: Unable to change CPU amount

Posted: 10. Dec 2012, 00:00
by Perryg
Could you post the *.vbox of one that does not work (as a compressed attachment please)

Re: Unable to change CPU amount

Posted: 10. Dec 2012, 00:13
by noteirak
Here are the .vbox of the 3 VMs I cannot change the CPU settings of

Re: Unable to change CPU amount

Posted: 10. Dec 2012, 00:23
by Perryg
Is hotplug enabled on the ones that work?

Re: Unable to change CPU amount

Posted: 10. Dec 2012, 00:30
by noteirak
Nop, and now I wonder why the ones that don't work have it... Good catch!
It now works! Thank you Perryg

Re: Unable to change CPU amount

Posted: 10. Dec 2012, 00:39
by Perryg
Its just another layer and one that must have been overlooked by the DEVs. FIrst time I have heard anyone having an issue as well.

Re: Unable to change CPU amount

Posted: 10. Dec 2012, 00:47
by noteirak
Do you consider this as a bug and should be filled as such?

Re: Unable to change CPU amount

Posted: 10. Dec 2012, 01:00
by Perryg
I guess it is a bug since you need to remove/disable hotplug to change the cpu count. Like I said the first I have heard about it, but the socket warning was a give away.

Re: Unable to change CPU amount

Posted: 10. Dec 2012, 01:02
by noteirak
Ok thank you, I'll report it as a bug then.

Edit: for anyone coming here, bug report is here