Xen/XCP + gaming

Looking at making at an home Xen/XCP to run truenas, back ups, unifi control, etc. Was thinking of going all out. Has anyone done gaming from a virtual perspective? I know bare metal is best and I’m not some professional, just want to be able to play games everyone once a while. Curious on if this is a good idea. Would adding a graphics card be a way to make this work? Thanks!

You can install a graphics card for your gaming machine, you would passthru the card to the virtual machine