What do I need to create my own VPS hosting?

Hello, dear readers of the forum.

Maybe this question was already answered here, but I did not find a link to the appropriate topic. Therefore, in my question: I would like to buy a motherboard of 2 processors, RAM and make a small VPS with Xen.

Can you please provide me with useful links where I can read more about this? For example, I do not understand how to assign IP-adderesses to the VPNs that I will create on the server, where to obtain these addresses, and so on.

Thank you.