We have only tried it successfully in Gen 1, we also tried to install minimal 7 centos in gen 2 and it was not possible. If you can install the Centos 7 in Gen 2, you can perfectly use the VPS scripts to install VitalPBX later.
https://github.com/VitalPBX/VPS