I have just installed Ubuntu on virtualbox, however I have noticed when opening or minimizing an application, like firefox, is getting a little bit slow.

Is it safe to increase the cpu usage to 2 (currently is set to 1) on vm settings after the installation, or is it something I should have done it before ?

And is it safe in general to change settings of my vm after the installation ?

I'm having a 6-core processor and ram 16GB (have set it to 2048 GB on vm settings)


Change a VM's settings

It is absolutely safe to increase or decrease the number of CPUs for your already installed virtual machine. In case we use all host CPU cores we may want to consider an execution cap (e.g. 90%) to allow the host OS to operate smoothly while running a virtual machine.

We can also freely assign more or less RAM or VRAM in the machine's settings after installation.

Nearly all settings can be adapted later, including USB support, Networking, Audio cards, and more.

Hotplug CPUs

When running Ubuntu as a guest it is even possible to hotplug a CPU while a virtual machine is running. Provided we had installed the guest additions we enable CPU hotplugging while the VM is not running with these commands:

VBoxManage modifyvm "VM name" --cpuhotplug on
VBoxManage modifyvm "VM name" --cpus 3  ## maximum number of CPUs

After that we can assign (plug) or remove (unplug) a CPU of a running instance with one of the following commands:

VBoxManage controlvm "VM name" plugcpu 1  ## number of CPU
VBoxManage controlvm "VM name" unplugcpu 1

Note that we can not unplug CPU 0 for obvious reasons.

It is not possible to change the amount of RAM assigned to the guest during runtime except we use memory ballooning, a technique to move already assigned RAM from one to another running virtual machine.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.