[vbox-dev] cpu hotplug support

Alexey Eremenko al4321 at gmail.com
Thu Apr 22 17:00:51 GMT 2010

On Thu, Apr 22, 2010 at 5:29 AM, Alexander Eichner
<Alexander.Eichner at sun.com> wrote:
> Hi,
> any recent Linux kernel should support it. I used Ubuntu 9.10. Windows is
> also supported but Windows Server 2008 R2 x64 Datacenter edition
> implements CPU hot-add only.
> The following commands configure the VM for CPU hotplugging:
> Configuration:
> VBoxManage modifyvm name --cpuhotplug on -- switches CPu hot-plugging on
> VBoxManage modifyvm name --cpus <nr> -- sets the maximum number of CPus the
> VM can have
> VBoxManage modifyvm name --plugcpu <id> -- Adds the CPU with <id> to the VM
> while it is off
> VBoxManage modifyvm name --unplugcpu <id> -- Removes the CPU with <id> from
> the VM while it is off, CPU 0 can't be removed.
> Initiating hot-add/hot-remove events:
> VBoxManage controlvm name plugcpu <id> -- Adds CPU <id> while the VM is
> running
> VBoxManage controlvm name unplugcpu <id> -- Removes CPU <id> while the VM is
> running.
> Linux doesn't make use of new CPUs by default. You either need to update the
> guest additions which includes a service handling the events.
> If you don't want to update the guest additions you can also execute the
> following command as root:
> echo 1 > /sys/devices/cpus/cpu<id>/online
> To eject a CPU without installed guest additions you have to do the
> following before actually ejecting the CPU:
> echo 1 > /sys/devices/LNXSYSTEM:00/device:00/ACPI0004:<i>/LNXCPU:<i2>/eject
> The <i> and <i2> numbers don't need to be equal and they do not match the
> <id> value used to enable a CPU. So you have to search for the right CPU
> object unfortunately.
> The reason behind is to prevent ejection of CPUs while the guest may still
> use them. The above command will tell the kernel to disable the CPU.


Using Mandriva Linux 2010 guest OS. (kernel 2.6.31)
I don't have "cpus" folder under: "/sys/devices/..."

1. any ideas?

2. First email was co-sent by "Alexander Eichner" and "Sebastian
Dyroff"... Does it mean Alex studying in "TU-Berlin" and also works at
Oracle ?

-Alexey Eromenko "Technologov"

More information about the vbox-dev mailing list