I have a VTP server and 4 VTP clients. I wanted to create new VLANs on the VTP server and get the error
VTP VLAN configuration not allowed when device is not the primary server for vlan database.
The switch is actually the VTP server.
I got it. I rebooted the switch but the Primary Server role is not reboot-persistent, which means it may be lost if the switch reloads and another one taking over the Primary Server role.
You can make it the primary role again using this command in Exec Mode
vtp primary
After that, the switch will have the role of primary server again and you can create the Vlans.