Do read the specific section in docs about virtualizing xcp-ng.
https://docs.xcp-ng.org/guides/xcpng-in-a-vm/