Unable to change CPU amount

Discussions related to using VirtualBox on Linux hosts.
Post Reply
noteirak
Site Moderator
Posts: 5229
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7
Contact:

Unable to change CPU amount

Post 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?
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Unable to change CPU amount

Post by Perryg »

Perhaps you could post the exact command?
What are the differences of the ones that worked ad the ones that did not?
noteirak
Site Moderator
Posts: 5229
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7
Contact:

Re: Unable to change CPU amount

Post 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:~$
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Unable to change CPU amount

Post by Perryg »

Could you post the *.vbox of one that does not work (as a compressed attachment please)
noteirak
Site Moderator
Posts: 5229
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7
Contact:

Re: Unable to change CPU amount

Post by noteirak »

Here are the .vbox of the 3 VMs I cannot change the CPU settings of
Attachments
vbox.zip
(57.72 KiB) Downloaded 77 times
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Unable to change CPU amount

Post by Perryg »

Is hotplug enabled on the ones that work?
noteirak
Site Moderator
Posts: 5229
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7
Contact:

Re: Unable to change CPU amount

Post by noteirak »

Nop, and now I wonder why the ones that don't work have it... Good catch!
It now works! Thank you Perryg
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Unable to change CPU amount

Post 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.
noteirak
Site Moderator
Posts: 5229
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7
Contact:

Re: Unable to change CPU amount

Post by noteirak »

Do you consider this as a bug and should be filled as such?
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Unable to change CPU amount

Post 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.
noteirak
Site Moderator
Posts: 5229
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7
Contact:

Re: Unable to change CPU amount

Post by noteirak »

Ok thank you, I'll report it as a bug then.

Edit: for anyone coming here, bug report is here
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
Post Reply