"Can I build on a virtual machine and connect as the Master to have a dedicated server in my game?"

Hello, I'm developing a project and I have a question about servers.

I understand that with Photon, I can transmit data from clients to the Master, but I need my project to support more than 500 players connected to the same room.

To achieve this, I need a dedicated server. So, I'm looking into Google Cloud VM.

To make this work, would it be enough for me to build my Unity game with Photon on a virtual machine with good internet access like Google Cloud VM, then join the room as the Master and leave it there indefinitely so that the VM becomes the Master of the room and handles the entire player load? Am I correct?

Or am I mistaken?