Linux VM Type

This is for discussing general topics about how to use VirtualBox.
Post Reply
Plagrö
Posts: 140
Joined: 27. May 2018, 14:57

Linux VM Type

Post by Plagrö »

Hello

Why do we have so much versions of Linuxes to choose from?:
k20240120-130307.png
k20240120-130307.png (22.81 KiB) Viewed 3389 times

I understand, that there are versions with "different kernels" and "32 vs. 64 bit".

But what's the difference between for example "other Linux 64 bit" and "Debian 64 bit" and "Red Hat 64 bit".
Of course the name says, use Debian for Debian and Red Hat for Red Hat. But that's not what I am interested in.

1) What are the differences between them? Do they only use different kernels?
2) Or are there other differences? What?
3) What happens, when I create a "Red Hat" VM and install Debian in this "wrong" VM type?
4) Ubuntu uses Debian packets. Why do we need a separate Type specially for Ubuntu? What happens, if we use the VM-type "Debian" when we create an Ubuntu-system?

5) Can the selected VM version also have an influence on whether the guest additions will work correctly or not?

Would appreciate some answers. Thank you.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Linux VM Type

Post by scottgus1 »

I can't speak to any exact differences. But the different templates set up the Virtualbox VM environment differently.

Virtualbox wants to use whatever "hardware" the OS being installed has built-in drivers for. Also there may be special setup in some of the extradata information, different things like that.
Plagrö wrote: 20. Jan 2024, 14:15 Ubuntu uses Debian packets. Why do we need a separate Type specially for Ubuntu?
Newcomers to Linux may not know that Ubuntu is based on Debian, for example, so having the most recognizable name for new Linux users may be an influence in that list, too. And, frankly, some folks don't read more than a hint of something. So they may not see the "Ubuntu" in a combined "Debian/Ubuntu (64-bit)" template line. And, maybe, Ubuntu has slightly different requirements than Debian.
Plagrö wrote: 20. Jan 2024, 14:15 Do they only use different kernels?
I don't think the kernel is an influence, unless a Debian kernel is different than a Fedora kernel, then the differences may be important.
Plagrö wrote: 20. Jan 2024, 14:15 What happens, when I create a "Red Hat" VM and install Debian in this "wrong" VM type?
If there is a material difference in the two templates, then something may not work correctly.
Plagrö wrote: 20. Jan 2024, 14:15 Can the selected VM version also have an influence on whether the guest additions will work correctly or not?
Anything's possible. It would always be better to configure the VM as close to the expected OS as one can.

The only way to determine these questions for certain, short of perusing the source code, is to set up fresh new example VMs of each type, and compare the .vbox files. This comparison will reveal the template differences that Virtualbox sets up. No need to actually install the OS inside, I'd believe.
Plagrö
Posts: 140
Joined: 27. May 2018, 14:57

Re: Linux VM Type

Post by Plagrö »

Thank you for the tip to look into the *.vbox file.

I have created the type "other Linux 64bit" AND "Debian 64 bit" without installing anything.

They look exactly the same:

Other Linux:

Code: Select all

<?xml version="1.0"?>
<!--
** DO NOT EDIT THIS FILE.
** If you make changes to this file while any VirtualBox related application
** is running, your changes will be overwritten later, without taking effect.
** Use VBoxManage or the VirtualBox Manager GUI to make changes.
-->
<VirtualBox xmlns="http://www.virtualbox.org/" version="1.16-linux">
  <Machine uuid="{b5347bb6-1272-4c95-ac35-5c0d2997731a}" name="other Linux" OSType="Linux26_64" snapshotFolder="Snapshots" lastStateChange="2024-01-20T14:11:08Z">
    <MediaRegistry>
      <HardDisks>
        <HardDisk uuid="{7a126c73-6d53-48ed-a0bd-a88d517d9619}" location="other Linux.vdi" format="VDI" type="Normal"/>
      </HardDisks>
    </MediaRegistry>
    <ExtraData>
      <ExtraDataItem name="GUI/FirstRun" value="yes"/>
    </ExtraData>
    <Hardware>
      <CPU>
        <PAE enabled="false"/>
        <LongMode enabled="true"/>
        <X2APIC enabled="true"/>
        <HardwareVirtExLargePages enabled="false"/>
      </CPU>
      <Memory RAMSize="1024"/>
      <HID Pointing="USBTablet"/>
      <Display controller="VMSVGA" VRAMSize="16"/>
      <VideoCapture file="." fps="25"/>
      <BIOS>
        <IOAPIC enabled="true"/>
        <SmbiosUuidLittleEndian enabled="true"/>
      </BIOS>
      <USB>
        <Controllers>
          <Controller name="OHCI" type="OHCI"/>
          <Controller name="EHCI" type="EHCI"/>
        </Controllers>
      </USB>
      <Network>
        <Adapter slot="0" enabled="true" MACAddress="080027EAFD1E" type="82540EM">
          <NAT/>
        </Adapter>
      </Network>
      <AudioAdapter codec="AD1980" driver="Pulse" enabled="true" enabledIn="false"/>
      <RTC localOrUTC="UTC"/>
      <Clipboard/>
    </Hardware>
    <StorageControllers>
      <StorageController name="IDE" type="PIIX4" PortCount="2" useHostIOCache="true" Bootable="true">
        <AttachedDevice passthrough="false" type="DVD" hotpluggable="false" port="1" device="0"/>
      </StorageController>
      <StorageController name="SATA" type="AHCI" PortCount="1" useHostIOCache="false" Bootable="true" IDE0MasterEmulationPort="0" IDE0SlaveEmulationPort="1" IDE1MasterEmulationPort="2" IDE1SlaveEmulationPort="3">
        <AttachedDevice type="HardDisk" hotpluggable="false" port="0" device="0">
          <Image uuid="{7a126c73-6d53-48ed-a0bd-a88d517d9619}"/>
        </AttachedDevice>
      </StorageController>
    </StorageControllers>
  </Machine>
</VirtualBox>

Debian:

Code: Select all

<?xml version="1.0"?>
<!--
** DO NOT EDIT THIS FILE.
** If you make changes to this file while any VirtualBox related application
** is running, your changes will be overwritten later, without taking effect.
** Use VBoxManage or the VirtualBox Manager GUI to make changes.
-->
<VirtualBox xmlns="http://www.virtualbox.org/" version="1.16-linux">
  <Machine uuid="{324f4662-8583-4273-b27d-3e14a0c5e165}" name="debian" OSType="Debian_64" snapshotFolder="Snapshots" lastStateChange="2024-01-20T14:10:27Z">
    <MediaRegistry>
      <HardDisks>
        <HardDisk uuid="{4f65ca92-3ba3-4a42-9518-55887cb8e944}" location="debian.vdi" format="VDI" type="Normal"/>
      </HardDisks>
    </MediaRegistry>
    <ExtraData>
      <ExtraDataItem name="GUI/FirstRun" value="yes"/>
    </ExtraData>
    <Hardware>
      <CPU>
        <PAE enabled="false"/>
        <LongMode enabled="true"/>
        <X2APIC enabled="true"/>
        <HardwareVirtExLargePages enabled="false"/>
      </CPU>
      <Memory RAMSize="1024"/>
      <HID Pointing="USBTablet"/>
      <Display controller="VMSVGA" VRAMSize="16"/>
      <VideoCapture file="." fps="25"/>
      <BIOS>
        <IOAPIC enabled="true"/>
        <SmbiosUuidLittleEndian enabled="true"/>
      </BIOS>
      <USB>
        <Controllers>
          <Controller name="OHCI" type="OHCI"/>
          <Controller name="EHCI" type="EHCI"/>
        </Controllers>
      </USB>
      <Network>
        <Adapter slot="0" enabled="true" MACAddress="080027755376" type="82540EM">
          <NAT/>
        </Adapter>
      </Network>
      <AudioAdapter codec="AD1980" driver="Pulse" enabled="true" enabledIn="false"/>
      <RTC localOrUTC="UTC"/>
      <Clipboard/>
    </Hardware>
    <StorageControllers>
      <StorageController name="IDE" type="PIIX4" PortCount="2" useHostIOCache="true" Bootable="true">
        <AttachedDevice passthrough="false" type="DVD" hotpluggable="false" port="1" device="0"/>
      </StorageController>
      <StorageController name="SATA" type="AHCI" PortCount="1" useHostIOCache="false" Bootable="true" IDE0MasterEmulationPort="0" IDE0SlaveEmulationPort="1" IDE1MasterEmulationPort="2" IDE1SlaveEmulationPort="3">
        <AttachedDevice type="HardDisk" hotpluggable="false" port="0" device="0">
          <Image uuid="{4f65ca92-3ba3-4a42-9518-55887cb8e944}"/>
        </AttachedDevice>
      </StorageController>
    </StorageControllers>
  </Machine>
</VirtualBox>
Strange to have these as separate types!
javispedro
Posts: 59
Joined: 29. Jan 2022, 15:31
Primary OS: openSUSE
VBox Version: OSE other
Guest OSses: Old & New Windows, Linux

Re: Linux VM Type

Post by javispedro »

Note that there may be differences not appearing in the .vbox file.


However most likely there is very little difference except between maybe 2.4 series and the rest. Very likely this is done just to have nicer icons which I appreciate.
fth0
Volunteer
Posts: 5678
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Linux VM Type

Post by fth0 »

If you really want to know the differences, you'd have to look into the VirtualBox source code. But before I tell you were to start to look, let me tell you that the guest OS selection will get an additional third level in the next major VirtualBox 7.1 version, and you will be able to select between more than 100 different Linux guest OSes, amongst them more than 50 Ubuntu variants.

The main specification of the guest OS details can be found in src/VBox/Main/src-all/Global.cpp (see the Global::sOSTypes[] array, which scottgus1 termed "template"). In addition to that, many parts of the VirtualBox implementation can query the guest OS type and variant at any time and act differently depending on that.

BTW, if you really had created a VM with "Other Linux (64-bit)" (and not with "Linux 2.6 / 3.x / 4.x / 5.x (64-bit)" ;)), you would have found a difference in the amount of RAM (512 MB vs. 1024 MB), and the PS/2 Mouse instead of the USB Tablet.
javispedro wrote: 20. Jan 2024, 17:25 Note that there may be differences not appearing in the .vbox file.
A simple example would be the size (capacity) of the virtual hard disk image. A not so simple example would be the Local APIC (not to be confused with the I/O APIC).
Post Reply