Just clarify one thing ... VirtualBox machines are not only the VDI files, VBOX files are as important as VDI ones.
I share a Virtual Machine (i do not use a server but it is the same concept) between two Operating Systems that run on physical hardware on the same computer (only one at a tiem).
I install VirtualBOX on Linux and make it to save VirtualBox.xml on another disk, that i use only for Virtual Machines.
I install VirtualBOX on Windows and make it to save VirtualBox.xml on another disk, that i use only for Virtual Machines.
I really make that using (Linux Symbolic Link to folder) & (Windows Junction).
The i create the virtual machine (no matter if on Linux or on Windows), it will be seen on both, since the base store of Virtual Machines is on the same disk, both Linux VirtualBOX & Windows VirtualBOX will read/write to the same place.
That way any change maded to the VBOX file, or snapshots, etc... done while physical computer runs Linux will be seen while physical computer runs Windows and vice-versa.
Sometimes i want not ALL virtual machines be identical (VirtualBOX list) on both physical systems ... sometimes i want them to have a different list of virtual machines ... for that i create one or more folders on that drive (i call them Host_Windows10, Host_Windows11, Host_LinuxUbuntu, Host_LinuxManjaro, etc... each one represents an operating system that runs on physical hardware on the same computer.
That way VirtualBox.xml is different for each operating system.
But i want the same virtual machine on more that one of them... so i place all files (and folders) of that virtual machime onto that disk on an specific folder, then i boot the computer with the first operating system where i want that machive to be and add it to the list... then i boot the other operating system where i also want that machive to be and add it to the list... so on as many i want.
After that, each operating system has its own ´VirtualBox.xml´ and inside them, some of them has the reference to the same Virtual Machine.
Think of this:
Linux has VirtualBox.xml on /MyDrive/Host_LinuxManjaro/
Windows has a differente VirtualBox.xml on D:\Host_Windows10`
/MyDrive and D:\ are the same root folder on the same drive.
Virtual Machine files & folders are stored on:
If seen on Linux: /MyDrive/MyVirtualMachine/
If seen on Windows: D:\MyVirtualMachine\
Inside that folder is the VBOX file, all VDI/VHD/etc, Logs folder, Snapshot folder, etc... all the virtual machine is inside there (except the line that tells VirtualBox List that machine must appear on the list).
I edit the machine VBOX file to ensure there is no full path.
And that it, any change maded to the virtual machine (snapshoting, installing programs, etc) is done on a Route that is know by both VirtualBOX (Linux & Windows) that runs on the same hardware (boot Linux or boot Windows).
Beware both versions of VirtualBOX must be the same, if you update one do not forget to uptade the other prior to run the virtual machine.
It also works with ... running virtual machine, close it saving it state, reboot to other physical operating system and resume the virtual machine.
The key point here is where VirtualBOX saves what... not olny VDI is important... it is also important where VBOX files is and where is VirtualBox.xml file.
Tip: I normally make the changes to the VBOX of my virtual machines with Notepad++, not with the GUI of VirtualBox, that way i have much more fine control on what i change.
Extra: To all of thoose of you that want Inmutable machines to not loose changes on boot after a secure power off, inside the <HardDisk ...> section (inside the <MediaRegistry> section), it can be inside virtual machine VBOX file or inside VirtualBox.xml, ther is the text autoReset="true", just replace it with autoReset="false" or simply remove the parameter.
Tip (when autoReset is not true): If after define the machine (or after a reset is done) you can copy (to another sub-folder of the parent folder) the file in /Snapshots/ folder (small size), then when you want to do a reset you copy back the small file and all changes get lost... tip: do not put such copied files on any folder of the full path of the file been copied, for example if file is on /A/B/S/here do not put it on /A nor /A/B, nor /A/B/S etc... put it for example on /A/B/BackUPs ... VirtualBox and some tools on some operations looks for a file (any name) on the path going up to parente till they find a file with the UUID searched, changing the name does not help.
Extra: On <AttachedDevice ...> section for SSD/NVME it can be usefull to have nonrotational="true".
Extra: On <AttachedDevice ...> section for making the disk seen as removable it can be usefull to have hotpluggable="false".
Extra: To be able to connect a disk while machine is running, it is vital that machine has more ports defined that ports in use, on the <StorageController ...> section the parameter PortCount="..."; if no free ports VirtualBox will not allow to add on the fly another disk.
Extra: You can rename files inside Snapshots folder if you also change the reference inside the VBOX files (or VirtualBox.xml) wherever the file is registered inside <MediaRegistry> section.
Do not panic, all changes to VirtualBox.xml and / or VOXs files do them with Notepad (Notepad++) a plain text editor but with VirtualBox fully closed (no machine running, no GUI of VirtualBOX, etc); make a backUP of them before changing them, then do the changes, run VirtualBOX and see the reesults.
Some modifications must be done manualy (or at least i still not know how to do them).
Please ensure all paths inside that files that point to disk images are relative, not full paths; path delimiter is not important / or \ will work, also mixing them on the same route seems to work well.
Please ensure if you have physical Windows and physical Linux that VirtualBox.xml is saved on different folders Host_Windows10, Host_Windows11, Host_LinuxManjaro, etc... if is a pain to deal having it in common with multiple different (Linux/Windows) physical operating systems.
Hope all this info helps... sometimes manual edit VirtualBox.xml and *.vbox files is vital to get what one wants.
And sorry to make it so looooooong ... too much to teach for a single post, this VirtualBOX internal lines (on text files) need a full tutorial by them self, more when wanted 'special' things to happen... i only want to teach ... and to loudly say ... why on the hell VirtualBOX GUI lacks a lot of what can be done editing by hand the text files? such as Save/NotSave state on boot for inmutable virtual disks; allow doing inmutable the diferencing virtual disk of an inmutable disk (aka more than one level of changes) without needing snapshoting, aka inmutable chain, inmutable branches, etc... all that must be done by hand and is far long away of 'normal' users and totally undocumented.