Page 1 of 1

The resource allocation in virtualization

Posted: 3. Apr 2024, 09:40
by Supoettly1992
I am going to install a Virtual Box on my Laptop. And I learned some stuff on how Hypervisers like these work. BUT my one question is, when you allot you PC resources to a VM..are those resources only used when you are using a VM or they are completely allocated to the VM at all times and you cannot use it even if the Hypervisor isn't in use at the moment. I AM USING A FAIRLY OLD LAPTOP with 500Gigs of HDD and 4Gigs RAM.

Re: The resource allocation in virtualization

Posted: 4. Apr 2024, 14:29
by FranceBB
They're allocated only when you're using the VM.
For instance, you said your laptop has 4 GB of RAM.
If you were to allocate 800 MB of RAM to the guest, you would still have 4GB of RAM up until you start the guest.
Once the guest is started, Virtualbox would reserve 800 MB for the guest, so your host would only have 3.2GB available.
This is allocated anyway, it doesn't matter whether the guest is actually using all the 800 MB of RAM or not.
For instance, they guest - suppose Windows 95 - might only be using 128 MB of RAM, but on your host you would still see all the 800 MB pre-allocated to Virtualbox.