Ticket #11277 (new enhancement)

Opened 6 years ago

Last modified 3 years ago

CPU Hotplug prevents change in vCPU number

Reported by: noteirak Owned by:
Component: other Version: VirtualBox 4.2.4
Keywords: cpu hotplug Cc:
Guest type: all Host type: all


After setting up a VM with more than one vCPU and CPU hotplug off, then activating the CPU hotplug feature, it is not possible to reduce the amount of vCPU as long as hotplug is enabled.

Steps to reproduce :

  1. Create a VM with 2 or more CPUs
  2. Enable CPU hotplug via vboxmanage
  3. Start the VM then stop the VM
  4. Reduce the amount of CPUs using vboxmanage modifyvm VM --cpus x
  5. This will fail with the following code :
    NS_ERROR_INVALID_ARG (0x80070057) There is still a CPU attached to socket x.Detach the CPU before removing the socket.

The only way to make this work is to disable the hotplug feature before setting the amount of vCPU.

IMO this error shouldn't popup as the VM is a PowerOff state and therefore hotunplugging a CPU doesn't make sense...

Change History

comment:1 Changed 6 years ago by noteirak

comment:2 Changed 6 years ago by aeichner

You have to use "VBoxManage modifyvm <VM name> --unplugcpu <x>" before reducing the amount of maxmimum CPUs the VM can have. This currently works as designed but I agree that we can make this a bit more userfriendly in the future by detaching the CPUs automatically.

comment:3 Changed 3 years ago by aeichner

  • Type changed from defect to enhancement
Note: See TracTickets for help on using tickets.
ContactPrivacy policyTerms of Use