installing the xen hypervisor version 4.6.3-5 in CentOS 7.3.1611 (Core) x86_64 causes the systemd-modules-load service to fail to load when using the kernel version 3.18.44-20
this is just a aesthetic fix since that service failing to load doesn't automatically mean a real system failure but simply a potential one. what this error is telling us is that just some of the kernel modules marked in the start up scripts failed to load, whether or not this modules were really important for the system is something, we, should determine ourselves. the file which holds the xen kernel modules marked for load at start up is /usr/lib/modules-load.d/xen.conf and its contents are as follow:
xen-evtchn xen-gntdev xen-gntalloc xen-blkback xen-netback xen-pciback evtchn gntdev netbk blkbk xen-scsibk usbbk pciback xen-acpi-processor blktap
as we can quickly see there's s bunch of them who are actually "repeated", apparently, this is done to keep compatibility with different xen dom0 kernel and modules versions. then now we should just determine which ones exist and which ones don't in our system. we can do that with a command like this one for example:
for mod in $(cat /usr/lib/modules-load.d/xen.conf|tr -d '#'); do if [ -z "$(find /usr/lib/modules/ -name $mod.ko)" ]; then echo $mod; fi; done
once we've got what modules does not exist in our system all that is left is to comment those ones from the xen modules file to prevent the systemd service from trying to load them and thus failing. after commenting the modules which didn't exist for my system the xen.conf file just looked like this:
xen-evtchn xen-gntdev xen-gntalloc xen-blkback xen-netback xen-pciback #evtchn #gntdev #netbk #blkbk #xen-scsibk #usbbk #pciback xen-acpi-processor blktap
finally also note that in case we use our own or other custom xen dom0 kernel modules this will be the appropriate place where to put them to load them at start up.