Skip to content

Preparing a golden image for virtualization

Take care when you put the Nanitor agent into a golden image or copy an existing virtual machine. When the agent is signed up, it gets a unique ID that identifies the machine in Nanitor. If several machines share this ID, Nanitor sees them as one machine that keeps changing.

There are two ways to avoid this.

Option 1: Sysprep the image before capture

Use Windows Sysprep to generalize the image before you capture it. Sysprep gives each clone a new Windows machine GUID. When copies of the same agent check in with different hostnames and different machine GUIDs, Nanitor detects them as copies, and each copy signs up again as a new asset. This is the simplest option if you already use Sysprep.

Run Sysprep only on the image, before capture. It removes the machine's identity and domain membership, so do not run it on a machine that is already deployed.

Option 2: Unregister before capture and sign up each clone

If Sysprep is not part of your workflow, unregister the agent before you capture the image, and sign up the agent on each clone.

On the machine you are about to capture, open a Command Prompt as administrator and run:

cd "C:\Program Files\Nanitor\Nanitor Agent"
net stop "Nanitor Agent"
nanitor-agent.exe unregister

On each clone, open a Command Prompt as administrator and run:

cd "C:\Program Files\Nanitor\Nanitor Agent"
net stop "Nanitor Agent"
nanitor-agent.exe signup --key <signup-url>
net start "Nanitor Agent"

The agent service starts automatically when the clone boots, before the agent is signed up. A service that is not signed up stays idle until it is restarted, so stop the service before signup and start it afterwards. Running only net start after signup is not enough, because the service is already running.

To find your signup URL, see Finding your Signup URL.