This post was originally published here.
The domain 0 in XenServer and XCP is currently a 32-bit CentOS VM. An interesting question which I often hear is
when will domain 0 become 64-bit?
I think this question is great because it represents a fantastic opportunity to discuss the architecture of the system and how it's expected to evolve over the next few years. If you'd like to know more, then read on!
XenServer and XCP are both 64-bit systems. Xen (the hypervisor) is compiled to run in 64-bit mode and therefore it requires 64-bit physical hardware to run on. Note however it is fully capable of running both 32-bit and 64-bit VMs on top. Xen does not contain device drivers; instead it allows physical hardware to be "passed through" to running VMs (known as "domains"). In the current version of XenServer and XCP the initial domain (domain 0) contains all the physical hardware drivers for the whole system and provides disk and network access for other VMs.
So, why do people ask about domain 0 being 32-bit? It usually boils down to two entirely reasonable concerns:
The plan is to split-up domain 0 into separate VMs (a technique known as disaggregation ).
Hardware device drivers will be placed in separate VMs, and granted access to individual PCI devices. This means that
Per-VM overhead such as legacy hardware emulation will be placed into "stub domains". This means that
Once these VMs have been created and domain 0 has been slimmed down, it then becomes worthwhile to turn on trusted boot (more information in a later post!)
Note: these new VMs generally won't be the size of regular OS installs; they can be based on cut-down images (see the Linux Based Stubdoms project) or on Mini-OS. If necessary for smaller systems it is also possible to further cut down on memory by having one VM perform multiple roles, although this loses some of the isolation benefits (e.g. one driver crash may affect multiple drivers, although not the host itself).
Disaggregation can also be performed incrementally; once the necessary XenAPI interfaces are in place then we can begin.
Once we've disaggregated domain 0, what will be left? The answer is: very little! We'll still have the logic for booting the host, for starting and stopping VMs, and for deciding which VM should control which piece of hardware... but that's about it. At this point domain 0 could be considered as a small "embedded" system, like a home NAT box or router.
So, will domain 0 ever become 64-bit? It eventually will. For the present it will remain a paravirtualised 32-bit linux VM. In the future it could be a fully virtualised (HVM) 64-bit linux PVops VM. Perhaps one day it might even be windows.
In summary: by "disaggregating" domain 0 and placing important services such as device drivers in separate VMs, we make the system more reliable, more flexible and more scalable. In the end it won't even matter if domain 0 is 32-bit or 64-bit
[[!tag tags/XCP tags/XenServer]]