# Modify ID of an installed agent

**URL:** <https://discuss.elastic.co/t/modify-id-of-an-installed-agent/353991>\
**Category:** SIEM\
**Created:** [February 23, 2024, 2:48pm UTC](https://discuss.elastic.co/t/modify-id-of-an-installed-agent/353991 "2024-02-23T14:48:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Amanda\_Riverol\_Quesa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/amanda_riverol_quesa/32/132021_2.png) [@Amanda\_Riverol\_Quesa](https://discuss.elastic.co/u/Amanda_Riverol_Quesa)\
**Post date:** [February 23, 2024, 2:48pm UTC](https://discuss.elastic.co/t/modify-id-of-an-installed-agent/353991/1 "2024-02-23T14:48:31Z")

</div>

\*Good afternoon!

I wanted to know if it is possible to change the ID of an agent once installed, the problem it would be presenting is that when cloning a VM the agent remains installed and with the ID the base machine, although it sends the events to the Fleet I only see one agent , which alternates its description between the original MV and the cloned MV, there is a possibility of modifying that ID

Thank you so much\*

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [February 23, 2024, 3:02pm UTC](https://discuss.elastic.co/t/modify-id-of-an-installed-agent/353991/2 "2024-02-23T15:02:29Z")

</div>

To change the agent id you would need to reenroll it using the `enroll` [command](https://www.elastic.co/guide/en/fleet/current/elastic-agent-cmd-options.html#elastic-agent-enroll-command).

Or you can also use the `install` command with the `-f` argument to force it to overwrite the current config.

Are you cloning a random VM or do you have an VM image that you use to create other VMs?

If you have an image you could install the agent using the `--delay-enroll` argument as explained in the [documentation](https://www.elastic.co/guide/en/fleet/current/elastic-agent-cmd-options.html#elastic-agent-install-command).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 22, 2024, 3:02pm UTC](https://discuss.elastic.co/t/modify-id-of-an-installed-agent/353991/3 "2024-03-22T15:02:48Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
