What does selecting an OS in VirtualBox actually do?
In the setup process for a new virtual machine, VirtualBox presents several different OS types and versions to choose from:
I'm curious as to what VirtualBox actually does when you select an OS. I'm sure, for example, that it wouldn't present the same hardware to a Windows 3.1 guest as it would to Windows 7. What I'm less clear on, however, are the potential differences between, say, a Linux and a BSD guest: if they're both designed to run on the same hardware, then what optimizations could VirtualBox possibly make if it knows which OS it's hosting?
In other words, what types of changes does VirtualBox make to the VM when you select an OS?
Take a look at the relevant file in the VirtualBox source code:
https://www.virtualbox.org/browser/vbox/trunk/src/VBox/Main/src-all/Global.cpp
It looks like it's mainly choosing a few things:
- Reasonable default sizes for RAM, hard disk, etc.
- A set of virtual hardware that the OS presumably has built-in and/or stable drivers for (e.g., look at the old Windows versions, which get Sound Blaster 16).
- A set of miscellaneous system features (I/O APIC, EFI, PAE, VT-x/AMD-V extensions, etc.) that the OS supports or requires.
Ultimately, you could configure all of these items yourself via the Settings dialog box -- VirtualBox is just offering a default configuration that should work without a lot of fussing around.
Although, not all the answers:
For "Operating System Type", select the operating system that you want to install later. The supported operating systems are grouped; if you want to install something very unusual that is not listed, select "Other". Depending on your selection, VirtualBox will enable or disable certain VM settings that your guest operating system may require. This is particularly important for 64-bit guests (see the section called “64-bit guests”). It is therefore recommended to always set it to the correct value.
I would venture to guess it also helps VirtualBox decide what VirtualBox drivers it presents to the guest OS for both Generic and final drivers during the build and deployment process.
I cannot see this is documented anywhere more thoroughly.