How to do a factory reset?
First , please backup your current configuration: system => Configuration files => export
Submit and download the XML file to your computer.
In order to perform a factory reset to the machine you will need to connect a monitor and a keyboard to the server.
In CLI write:
factory default
Now you can start from scratch according to the Quickstart guide (link to QSguide)