# \[SOLVED\] Error: domain already exists

**URL:** <https://forum.opennebula.io/t/solved-error-domain-already-exists/3817>\
**Category:** Product Support\
**Created:** [February 18, 2017, 10:17pm UTC](https://forum.opennebula.io/t/solved-error-domain-already-exists/3817 "2017-02-18T22:17:56Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![oscar](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/oscar/32/5120_2.png) [@oscar](https://forum.opennebula.io/u/oscar)\
**Post date:** [February 18, 2017, 10:17pm UTC](https://forum.opennebula.io/t/solved-error-domain-already-exists/3817/1 "2017-02-18T22:17:56Z")

</div>

Hi,

I have instantiated a “non persistent” vm. System has copied image to system datastore as it is expected, later it has started it successufly, nevertheless, after the first poweroff I get the following error when I try to start it “virsh resume 22”:

> Sat Feb 18 23:04:18 2017 [Z0][VM][I]: New LCM state is BOOT\_POWEROFF  
> Sat Feb 18 23:04:18 2017 [Z0][VMM][I]: Generating deployment file: /var/lib/one/vms/22/deployment.8  
> Sat Feb 18 23:04:18 2017 [Z0][VMM][I]: Successfully execute transfer manager driver operation: tm\_context.  
> Sat Feb 18 23:04:18 2017 [Z0][VMM][I]: ExitCode: 0  
> Sat Feb 18 23:04:18 2017 [Z0][VMM][I]: Successfully execute network driver operation: pre.  
> Sat Feb 18 23:04:19 2017 [Z0][VMM][I]: Command execution fail: cat \<\< EOT | /var/tmp/one/vmm/kvm/deploy ‘/var/lib/one//datastores/0/22/deployment.8’ ‘vdicnode01-priv’ 22 vdicnode01-priv  
> Sat Feb 18 23:04:19 2017 [Z0][VMM][I]: error: Failed to create domain from /var/lib/one//datastores/0/22/deployment.8  
> Sat Feb 18 23:04:19 2017 [Z0][VMM][I]: error: operation failed: domain ‘one-22’ already exists with uuid 06892f7c-40c1-4f8a-8c87-431518150a04  
> Sat Feb 18 23:04:19 2017 [Z0][VMM][E]: Could not create domain from /var/lib/one//datastores/0/22/deployment.8  
> Sat Feb 18 23:04:19 2017 [Z0][VMM][I]: ExitCode: 255  
> Sat Feb 18 23:04:19 2017 [Z0][VMM][I]: Failed to execute virtualization driver operation: deploy.  
> Sat Feb 18 23:04:19 2017 [Z0][VMM][E]: Error deploying virtual machine: Could not create domain from /var/lib/one//datastores/0/22/deployment.8

I can start the virtual machine without problems from “virsth start one-22”.

Any help will be wellcome!

---

<div class="post-metadata">

**Author:** ![Pecadis](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/pecadis/32/5337_2.png) [@Pecadis](https://forum.opennebula.io/u/Pecadis)\
**Post date:** [February 19, 2017, 11:52am UTC](https://forum.opennebula.io/t/solved-error-domain-already-exists/3817/2 "2017-02-19T11:52:34Z")

</div>

Hi Oscar,

are you using multiple hosts?  
If yes, check the /etc/libvirt/libvirtd.conf in the `host_uuid =` part. If they are the same on the Hosts, the problem could be located there. I was facing this issue in the past and solved it with the following sed in my installation routine.

Suitable for Debian 8.7.1 you will need the `uuid-runtime`  
`sed -i 's|#host_uuid = "00000000-0000-0000-0000-000000000000"|host_uuid = \"'$(uuidgen)'\"|g' /etc/libvirt/libvirtd.conf`

Pecadis

---

<div class="post-metadata">

**Author:** ![oscar](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/oscar/32/5120_2.png) [@oscar](https://forum.opennebula.io/u/oscar)\
**Post date:** [February 21, 2017, 7:50am UTC](https://forum.opennebula.io/t/solved-error-domain-already-exists/3817/3 "2017-02-21T07:50:55Z")

</div>

Hi Pecadis,

I have forced the host\_uuid but I get exactly the same error.

Thanks a lot.

---

<div class="post-metadata">

**Author:** ![Pecadis](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/pecadis/32/5337_2.png) [@Pecadis](https://forum.opennebula.io/u/Pecadis)\
**Post date:** [February 24, 2017, 10:41pm UTC](https://forum.opennebula.io/t/solved-error-domain-already-exists/3817/4 "2017-02-24T22:41:52Z")

</div>

Hi Oscar,

another thought. Are you using a shared storage? Could you print the `onedatastore list` please?

Pecadis

---

<div class="post-metadata">

**Author:** ![oscar](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/oscar/32/5120_2.png) [@oscar](https://forum.opennebula.io/u/oscar)\
**Post date:** [February 25, 2017, 10:08pm UTC](https://forum.opennebula.io/t/solved-error-domain-already-exists/3817/5 "2017-02-25T22:08:20Z")

</div>

Yes, I’m using a shared datastore for images (nfs v3)

> [root@vdicone01 ~]# onedatastore list  
> ID NAME SIZE AVAIL CLUSTERS IMAGES TYPE DS TM STAT  
> 0 system - - 0,100 0 sys - ssh on  
> 1 default 6.7G 82% 0 0 img fs ssh on  
> 2 files 6.7G 82% 0 0 fil fs ssh on  
> 100 nfs-vdic-imag 80G 78% 0,100 1 img fs shared on

Afterwards, I have to nodes:

> [root@vdicone01 ~]# onehost list  
> ID NAME CLUSTER RVM ALLOCATED\_CPU ALLOCATED\_MEM STAT  
> 0 vdicnode01-priv vdicube 1 100 / 400 (25%) 1024M / 3.7G (27%) on  
> 1 vdicnode02-priv vdicube 0 0 / 200 (0%) 0K / 3.7G (0%) on

Un saludo,

---

<div class="post-metadata">

**Author:** ![Pecadis](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/pecadis/32/5337_2.png) [@Pecadis](https://forum.opennebula.io/u/Pecadis)\
**Post date:** [February 27, 2017, 2:27pm UTC](https://forum.opennebula.io/t/solved-error-domain-already-exists/3817/6 "2017-02-27T14:27:56Z")

</div>

Hi oscar,

I think you hit the same issue as i had ( [SOLVED Live Migration "failed: error: Cannot access storage file" on 5.2.1](https://forum.opennebula.io/t/solved-live-migration-failed-error-cannot-access-storage-file-on-5-2-1/3762/4) )

In short terms: Change your “system” Datastores to shared as well.

Best  
Pecadis

---

<div class="post-metadata">

**Author:** ![oscar](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/oscar/32/5120_2.png) [@oscar](https://forum.opennebula.io/u/oscar)\
**Post date:** [March 1, 2017, 7:40am UTC](https://forum.opennebula.io/t/solved-error-domain-already-exists/3817/7 "2017-03-01T07:40:54Z")

</div>

Hi, I have read the post you ha attached and I think I’m not experiencing the same issue.

In my scenario, system datastores are local and I don’t want to perform any live migration. I just want to start it from opennebula as I can executing virsh start xxx.

Thanks a lot

---

<div class="post-metadata">

**Author:** ![oscar](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/oscar/32/5120_2.png) [@oscar](https://forum.opennebula.io/u/oscar)\
**Post date:** [March 6, 2017, 7:58am UTC](https://forum.opennebula.io/t/solved-error-domain-already-exists/3817/8 "2017-03-06T07:58:24Z")

</div>

Hi!

Anybody has experienced the same issue?

Thanks a lot!

---

<div class="post-metadata">

**Author:** ![oscar](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/oscar/32/5120_2.png) [@oscar](https://forum.opennebula.io/u/oscar)\
**Post date:** [March 14, 2017, 12:39am UTC](https://forum.opennebula.io/t/solved-error-domain-already-exists/3817/9 "2017-03-14T00:39:24Z")

</div>

Hi,

In my case, for any extrange reason, the problem was that a “normal” kvm xml has been deployed. In my case:

`/etc/libvirt/qemu/one-22.xml`

As it was registered by libvirtd, it was not possible to register a new one-22 VM.

Thanks a lot,
