# Error deploying vm: Could not create domain on CentOS 7 + KVM

**URL:** <https://forum.opennebula.io/t/error-deploying-vm-could-not-create-domain-on-centos-7-kvm/948>\
**Category:** Product Support\
**Created:** [July 2, 2015, 8:07am UTC](https://forum.opennebula.io/t/error-deploying-vm-could-not-create-domain-on-centos-7-kvm/948 "2015-07-02T08:07:14Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![csyseng](https://avatars.discourse-cdn.com/v4/letter/c/c0e974/32.png) [@csyseng](https://forum.opennebula.io/u/csyseng)\
**Post date:** [July 2, 2015, 8:07am UTC](https://forum.opennebula.io/t/error-deploying-vm-could-not-create-domain-on-centos-7-kvm/948/1 "2015-07-02T08:07:14Z")

</div>

Hi,

i’m new into OpenNebula and follow the [Quickstar-Guide](http://docs.opennebula.org/4.14/design_and_installation/quick_starts/qs_centos7_kvm.html#qs-centos7-kvm) to making first steps. Every step works fine but i get the following error by running the virtual machine:

> Thu Jul 2 09:46:40 2015 [Z0][DiM][I]: New VM state is ACTIVE.  
> Thu Jul 2 09:46:40 2015 [Z0][LCM][I]: New VM state is PROLOG.  
> Thu Jul 2 09:48:53 2015 [Z0][LCM][I]: New VM state is BOOT  
> Thu Jul 2 09:48:53 2015 [Z0][VMM][I]: Generating deployment file: /var/lib/one/vms/1/deployment.4  
> Thu Jul 2 09:48:53 2015 [Z0][VMM][I]: ExitCode: 0  
> Thu Jul 2 09:48:53 2015 [Z0][VMM][I]: Successfully execute network driver operation: pre.  
> Thu Jul 2 09:48:53 2015 [Z0][VMM][I]: Command execution fail: cat \<\< EOT | /var/tmp/one/vmm/kvm/deploy ‘/var/lib/one//datastores/0/1/deployment.4’ ‘kvm-node01.cyon.ch’ 1 kvm-node01.cyon.ch  
> Thu Jul 2 09:48:53 2015 [Z0][VMM][I]: error: Failed to create domain from /var/lib/one//datastores/0/1/deployment.4  
> Thu Jul 2 09:48:53 2015 [Z0][VMM][I]: error: can’t canonicalize path ‘/var/lib/one//datastores/0/1/disk.1’: Permission denied  
> Thu Jul 2 09:48:53 2015 [Z0][VMM][E]: Could not create domain from /var/lib/one//datastores/0/1/deployment.4  
> Thu Jul 2 09:48:53 2015 [Z0][VMM][I]: ExitCode: 255  
> Thu Jul 2 09:48:53 2015 [Z0][VMM][I]: Failed to execute virtualization driver operation: deploy.  
> Thu Jul 2 09:48:53 2015 [Z0][VMM][E]: Error deploying virtual machine: Could not create domain from /var/lib/one//datastores/0/1/deployment.4  
> Thu Jul 2 09:48:53 2015 [Z0][DiM][I]: New VM state is FAILED

I have checked the permissions of the nfs-share at “/var/lib/one”; there are no permission problems to read and write on the node.

Do you have any ideas to bordering this failure?

Thank you!  
csyseng

---

<div class="post-metadata">

**Author:** ![csyseng](https://avatars.discourse-cdn.com/v4/letter/c/c0e974/32.png) [@csyseng](https://forum.opennebula.io/u/csyseng)\
**Post date:** [July 3, 2015, 7:30am UTC](https://forum.opennebula.io/t/error-deploying-vm-could-not-create-domain-on-centos-7-kvm/948/2 "2015-07-03T07:30:50Z")

</div>

Further details about the installation:

Centos 7 (Frontendserver and KVM-Node) with OpenNebula Version 4.12.1

Any ideas?

Thank you.  
csyseng

---

<div class="post-metadata">

**Author:** ![VURoland](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/vuroland/32/7682_2.png) [@VURoland](https://forum.opennebula.io/u/VURoland)\
**Post date:** [July 5, 2015, 2:28pm UTC](https://forum.opennebula.io/t/error-deploying-vm-could-not-create-domain-on-centos-7-kvm/948/3 "2015-07-05T14:28:14Z")

</div>

hi,

could you check if the same file in /var/lib/one is reachable from the node01 server as well ?  
(as user oneadmin)  
Cause might be that the master server can reach that disk, but the node can’t ?

hope this helps,

---

<div class="post-metadata">

**Author:** ![csyseng](https://avatars.discourse-cdn.com/v4/letter/c/c0e974/32.png) [@csyseng](https://forum.opennebula.io/u/csyseng)\
**Post date:** [July 6, 2015, 7:21am UTC](https://forum.opennebula.io/t/error-deploying-vm-could-not-create-domain-on-centos-7-kvm/948/4 "2015-07-06T07:21:02Z")

</div>

Hi Roland

ls on the frontend-server:

```
[oneadmin@mgt-one1 ~]$ ls -l /var/lib/one/vms/1/deployment.4
-rw-r--r-- 1 oneadmin oneadmin 872 Jul 2 09:48 /var/lib/one/vms/1/deployment.4
[oneadmin@mgt-one1 ~]$ ls -l /var/lib/one/datastores/0/1/
total 850228
-rw-rw-r-- 1 oneadmin oneadmin 873 Jul 2 09:48 deployment.4
-rw-r--r-- 1 oneadmin oneadmin 870252544 Jul 2 09:48 disk.0
-rw-r--r-- 1 oneadmin oneadmin 372736 Jul 2 09:48 disk.1
lrwxrwxrwx 1 oneadmin oneadmin 34 Jul 2 09:48 disk.1.iso -> /var/lib/one/datastores/0/1/disk.1

```

and on the node:

```
[oneadmin@kvm-node01 ~]$ ls -l /var/lib/one/vms/1/deployment.4
-rw-r--r-- 1 oneadmin oneadmin 872 Jul 2 09:48 /var/lib/one/vms/1/deployment.4
[oneadmin@kvm-node01 ~]$ ls -l /var/lib/one/datastores/0/1/
total 850228
-rw-rw-r-- 1 oneadmin oneadmin 873 Jul 2 09:48 deployment.4
-rw-r--r-- 1 oneadmin oneadmin 870252544 Jul 2 09:48 disk.0
-rw-r--r-- 1 oneadmin oneadmin 372736 Jul 2 09:48 disk.1
lrwxrwxrwx 1 oneadmin oneadmin 34 Jul 2 09:48 disk.1.iso -> /var/lib/one/datastores/0/1/disk.1

```

I have no problems with read and write from the node01 into /var/lib/one/. Strange is, that i setup and configuration the test-environment like the description in the Quickstart-Guide.

csyseng

---

<div class="post-metadata">

**Author:** ![VURoland](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/vuroland/32/7682_2.png) [@VURoland](https://forum.opennebula.io/u/VURoland)\
**Post date:** [July 6, 2015, 1:32pm UTC](https://forum.opennebula.io/t/error-deploying-vm-could-not-create-domain-on-centos-7-kvm/948/5 "2015-07-06T13:32:20Z")

</div>

hi, are you using a NFS datastore or a SSH system datastore ?

---

<div class="post-metadata">

**Author:** ![csyseng](https://avatars.discourse-cdn.com/v4/letter/c/c0e974/32.png) [@csyseng](https://forum.opennebula.io/u/csyseng)\
**Post date:** [July 7, 2015, 11:17am UTC](https://forum.opennebula.io/t/error-deploying-vm-could-not-create-domain-on-centos-7-kvm/948/6 "2015-07-07T11:17:24Z")

</div>

> [@VURoland](#):
>
> are you using a NFS datastore or a SSH system datastore ?

I think the NFS-Datastore. I setup the NFS-Mount on the Frontend-Server wich is described in the [Quick-Start-Guide Chapter 1.4.](http://docs.opennebula.org/4.14/design_and_installation/quick_starts/qs_centos7_kvm.html#qs-centos7-kvm)

---

<div class="post-metadata">

**Author:** ![csyseng](https://avatars.discourse-cdn.com/v4/letter/c/c0e974/32.png) [@csyseng](https://forum.opennebula.io/u/csyseng)\
**Post date:** [July 7, 2015, 12:47pm UTC](https://forum.opennebula.io/t/error-deploying-vm-could-not-create-domain-on-centos-7-kvm/948/7 "2015-07-07T12:47:01Z")

</div>

Here the output of “onedatastore list”

```
  ID NAME SIZE AVAIL CLUSTER IMAGES TYPE DS TM STAT
   0 system 14.6G 74% - 0 sys - shared on  
   1 default 14.6G 74% - 1 img fs shared on  
   2 files 14.6G 74% - 0 fil fs ssh on
```

---

<div class="post-metadata">

**Author:** ![VURoland](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/vuroland/32/7682_2.png) [@VURoland](https://forum.opennebula.io/u/VURoland)\
**Post date:** [July 7, 2015, 11:28pm UTC](https://forum.opennebula.io/t/error-deploying-vm-could-not-create-domain-on-centos-7-kvm/948/8 "2015-07-07T23:28:35Z")

</div>

ok looks like a NFS setup - can you check if you’ve mounted the datastore the same on both servers ?  
So the share might be mounted on /var/lib/one on the master, and as /var/lib/one/datastore on a host ?

---

<div class="post-metadata">

**Author:** ![csyseng](https://avatars.discourse-cdn.com/v4/letter/c/c0e974/32.png) [@csyseng](https://forum.opennebula.io/u/csyseng)\
**Post date:** [July 8, 2015, 8:34am UTC](https://forum.opennebula.io/t/error-deploying-vm-could-not-create-domain-on-centos-7-kvm/948/9 "2015-07-08T08:34:24Z")

</div>

Frontend-Server:

```
[root@mgt-one1 ~]# cat /etc/exports
/var/lib/one/ *(rw,sync,no_subtree_check,root_squash)

```

KVM-Node01:

```
[root@kvm-node01 ~]# df -h | grep one
192.168.200.111:/var/lib/one 15G 3.1G 11G 22% /var/lib/one

```

You said, to mount the nfs-share on the node under “/var/lib/one/datastore”? I have mounted it under “/var/lib/one/”.

---

<div class="post-metadata">

**Author:** ![VURoland](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/vuroland/32/7682_2.png) [@VURoland](https://forum.opennebula.io/u/VURoland)\
**Post date:** [July 12, 2015, 8:35pm UTC](https://forum.opennebula.io/t/error-deploying-vm-could-not-create-domain-on-centos-7-kvm/948/10 "2015-07-12T20:35:57Z")

</div>

mounting it as /var/lib/one is fine, as long as you mount it that way on all your physical servers.  
i’m out of ideas with what I could determine so far, hope someone else knows a fix or pointer ?

GL

---

<div class="post-metadata">

**Author:** ![michaudg](https://avatars.discourse-cdn.com/v4/letter/m/e9a140/32.png) [@michaudg](https://forum.opennebula.io/u/michaudg)\
**Post date:** [October 2, 2015, 12:12am UTC](https://forum.opennebula.io/t/error-deploying-vm-could-not-create-domain-on-centos-7-kvm/948/11 "2015-10-02T00:12:31Z")

</div>

I faced this problem and using **no\_root\_squash** in the export parameter solved the problem for me :

/etc/exports  
/var/lib/one/ \*(rw,sync,no\_subtree\_check,no\_root\_squash)

---

<div class="post-metadata">

**Author:** ![NicCOConnor](https://avatars.discourse-cdn.com/v4/letter/n/e495f1/32.png) [@NicCOConnor](https://forum.opennebula.io/u/NicCOConnor)\
**Post date:** [October 14, 2015, 6:54pm UTC](https://forum.opennebula.io/t/error-deploying-vm-could-not-create-domain-on-centos-7-kvm/948/12 "2015-10-14T18:54:53Z")

</div>

I had this issue with Ubuntu 14.04 after an upgrade from 4.12 to 4.14. I’m not sure how it occured but all new VMs were being blocked by apparmor. Even after setting the process with the aa-complain command I was still unable to get this to work. My only solution was to uninstall apparmor with sudo apt-get remove --purge apparmor

---

<div class="post-metadata">

**Author:** ![csyseng](https://avatars.discourse-cdn.com/v4/letter/c/c0e974/32.png) [@csyseng](https://forum.opennebula.io/u/csyseng)\
**Post date:** [February 2, 2016, 9:42am UTC](https://forum.opennebula.io/t/error-deploying-vm-could-not-create-domain-on-centos-7-kvm/948/13 "2016-02-02T09:42:58Z")

</div>

This solved the error, thank you. It would be good, to update the documentation.

---

<div class="post-metadata">

**Author:** ![jmelis](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/jmelis/32/24_2.png) [@jmelis](https://forum.opennebula.io/u/jmelis)\
**Post date:** [March 9, 2016, 11:06am UTC](https://forum.opennebula.io/t/error-deploying-vm-could-not-create-domain-on-centos-7-kvm/948/14 "2016-03-09T11:06:53Z")

</div>

It would be great if you could send a pull request to the documentation repository to contribute this suggestion.

> **[OpenNebula/docs](https://github.com/OpenNebula/docs)**
>
> OpenNebula Documentation. Contribute to OpenNebula/docs development by creating an account on GitHub.

Thanks!
