This line of code fails when executed, with message AttributeError: 'module' object has no attribute 'ERROR_CAUSE_NETWORK' https://github.com/xenserver/xscontainer/blob/master/src/xscontainer-prepare-vm#L80
See this bug reported by a user of XCP-ng, with full backtrace: xcp-ng/xcp#198
I don't know the code of xscontainer enough to provide a patch, but the fix should be easy.