Cloning or imaging devices that have Datto RMM installed
Each endpoint in Datto RMM uses a unique identifier (ID) and encryption key to identify itself correctly. The ID and the key are stored locally on each device.
If you need to clone a device with a Datto RMM Agent installed, you must remove the ID and the key before cloning to avoid multiple machines taking over the same device record as they come online.
IMPORTANT Incorrectly editing the registry or system files can cause issues on your devices. We recommend that you back up the registry or system files before editing.
NOTE You also need to ensure that the primary wired network interface card (NIC) has a unique MAC address; otherwise, duplicate device IDs may be created.
Windows
- Disconnect the device from the internet.
- Stop the Agent Service by running the following command in Batch:
sc stop cagservice
Or stop the Agent Service by running the following command in PowerShell:
stop-service cagservice
- Open the Registry Editor (regedit.exe) from the Start menu search.
- Navigate to HKEY_LOCAL_MACHINE/Software/CentraStage in the registry and perform the following:
- Delete the DeviceID entry.
- Change the AgentFolderStatus value to 0.
- In Windows Explorer, navigate to C:\ProgramData\CentraStage\AEMAgent and delete the file named key or key.pending.
NOTE To delete the key or key.pending file, you may need to have your access permissions modified as this file is only accessible by the LocalSystem account.
- You can now proceed to clone the device.
NOTE If the master device (the device being cloned) is brought back online after cloning, the device's Agent will generate a new encryption key, which, depending on your account setup, may require approval in order for the Agent to be fully functional again. Refer to Agent encryption.
macOS
- Disconnect the device from the internet.
- Stop the Agent Service by running the following command in Terminal:
sudo su - launchctl stop com.centrastage.cag launchctl unload /Library/LaunchDaemons/com.centrastage.tray.plist /var/root/.mono/registry/CurrentUser/software/centrastage rm -f values.xml
- Navigate to /usr/local/share/CentraStage/AEMAgent and delete the file named key or key.pending.
NOTE You may need root permissions (using sudo) to delete the key or key.pending file.
- After completing any further checks and preparations and shutting down the OS, you can now proceed to clone the device.
NOTE If the master device (the device being cloned) is brought back online after cloning, the device's Agent will generate a new encryption key, which, depending on your account setup, may require approval in order for the Agent to be fully functional again. Refer to Agent encryption.
Linux
- Disconnect the device from the internet.
- Stop the Agent Service by running the following command in Terminal:
sudo su - systemctl stop cag /root/.mono/registry/CurrentUser/software/centrastage rm -f values.xml
- Navigate to /usr/local/share/CentraStage/AEMAgent and delete the file named key or key.pending.
NOTE You may need root permissions (using sudo) to delete the key or key.pending file.
- After completing any further checks and preparations and shutting down the OS, you can now proceed to clone the device.
NOTE If the master device (the device being cloned) is brought back online after cloning, the device's Agent will generate a new encryption key, which, depending on your account setup, may require approval in order for the Agent to be fully functional again. Refer to Agent encryption.