Progress on creating storage driver domains for XCP

Currently all storage drivers in XCP must be in domain 0. I'd like to make it possible to put storage drivers into other domains (ie VM appliances) so that

  • they are independent of the domain 0 OS (linux distro, linux kernel etc);
  • if they crash then they can be rebooted independently; and
  • domain 0 can be made smaller, into something more like a little embedded system.

For more information, see the discussion about the future of domain 0.

Conceptually this isn't very difficult. We just need to

  1. remote the storage control plane (VDI.attach et al)
  2. configure blkback endpoints in domains other than 0
  3. make sure that qemu can still read the disks (it currently knows a little too much about the devices being in domain 0)
  4. create an example storage domain to prove it works

Here's my current task list:

DescriptionDependsStatus
1 create a method for remoting the SMAPI (storage control plane) merged
2 allow lots of blkfronts in domain 0 (for qemus) merged
3 VDI.attach needs to return the info we need for blkback, not a path in dom0 1 Not started
4 disks which qemu needs require blkfront instances in dom0 2 Not started
5 remoted SMAPI needs fleshed-out with SR.create, SR.destroy, VDI.create, VDI.destroy etc 1 Not started
6 add a simple policy associating a driver domain (VM) with an SR or PBD 1 Not started
7 create an example storage domain with FreeBSD? 1 Not started
8 create a domain 0 storage control multiplexor capable of (eg) starting storage domains on-demand 6 Not started

So far I've focused on pieces which also coincidentally fix existing bugs in XCP: this is why some changes have already been merged into mainline. The rest of the tasks are clearly only useful for the driver domain case so I'll keep these in a personal branch on github.