# Error creating VMs with templates

**URL:** <https://forum.opennebula.io/t/error-creating-vms-with-templates/833>\
**Category:** Product Support\
**Created:** [June 8, 2015, 5:40pm UTC](https://forum.opennebula.io/t/error-creating-vms-with-templates/833 "2015-06-08T17:40:41Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![cesarufmt](https://avatars.discourse-cdn.com/v4/letter/c/58f4c7/32.png) [@cesarufmt](https://forum.opennebula.io/u/cesarufmt)\
**Post date:** [June 8, 2015, 5:40pm UTC](https://forum.opennebula.io/t/error-creating-vms-with-templates/833/1 "2015-06-08T17:40:41Z")

</div>

Hello everybody.  
Okay !?

I have have two (one frontend and one host)physical machines (8GB RAM, 500GB HD) using Ubuntu Server 14 well.

I’m using version 4.12 OpenNebula.

When I try create new virtual machine appears in my front end (tail -f /var/log/one/oned.log):

* * *

_Message received: LOG I 2 Command execution fail: /var/lib/one/remotes/tm/shared/clone opennebula1:/var/lib/one//datastores/1/e4f885728f29142b3b0435b980f83e2d opennebula2:/var/lib/one//datastores/0/2/disk.0 2 1_

_Mon Jun 8 12:05:10 2015 [Z0][TM][D]: Message received: LOG I 2 clone: Cloning /var/lib/one/datastores/1/e4f885728f29142b3b0435b980f83e2d in opennebula2:/var/lib/one//datastores/0/2/disk.0_

_Mon Jun 8 12:05:10 2015 [Z0][TM][D]: Message received: LOG E 2 clone: Command “cd /var/lib/one/datastores/0/2; cp /var/lib/one/datastores/1/e4f885728f29142b3b0435b980f83e2d /var/lib/one/datastores/0/2/disk.0” failed: Warning: Permanently added ‘opennebula2,10.5.0.27’ (ECDSA) to the list of known hosts._

_Mon Jun 8 12:05:10 2015 [Z0][TM][D]: Message received: LOG I 2 cp: cannot stat ‘/var/lib/one/datastores/1/e4f885728f29142b3b0435b980f83e2d’: No such file or directory_

_Mon Jun 8 12:05:10 2015 [Z0][TM][D]: Message received: LOG E 2 Error copying opennebula1:/var/lib/one//datastores/1/e4f885728f29142b3b0435b980f83e2d to opennebula2:/var/lib/one//datastores/0/2/disk.0_

_Mon Jun 8 12:05:10 2015 [Z0][TM][D]: Message received: LOG I 2 ExitCode: 1_

_Mon Jun 8 12:05:10 2015 [Z0][TM][D]: Message received: TRANSFER FAILURE 2 Error copying opennebula1:/var/lib/one//datastores/1/e4f885728f29142b3b0435b980f83e2d to opennebula2:/var/lib/one//datastores/0/2/disk.0_

* * *

Maybe the problem is “//” in address. But how I solve it?

Could anyone help?

From already thank you very much.

---

<div class="post-metadata">

**Author:** ![mike](https://avatars.discourse-cdn.com/v4/letter/m/58f4c7/32.png) [@mike](https://forum.opennebula.io/u/mike)\
**Post date:** [June 8, 2015, 6:53pm UTC](https://forum.opennebula.io/t/error-creating-vms-with-templates/833/2 "2015-06-08T18:53:44Z")

</div>

Hello Cesar,  
There is no problem with double slashes, Linux is processing it very well. If I right, your resolve.conf doesn’t fully configured. All ONE hosts should be resolved by name and frontend has ssh password-less access. Try go through step-by-step quig start guide [http://docs.opennebula.org/4.12/design\_and\_installation/quick\_starts/qs\_ubuntu\_kvm.html](http://docs.opennebula.org/4.12/design_and_installation/quick_starts/qs_ubuntu_kvm.html)  
I’ve started lerning ONE from this guide.

Regards,  
Mike

---

<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:** [June 9, 2015, 7:11am UTC](https://forum.opennebula.io/t/error-creating-vms-with-templates/833/3 "2015-06-09T07:11:36Z")

</div>

hi Cesar,

I think that this message shows whats going on:  
Mon Jun 8 12:05:10 2015 [Z0][TM][D]: Message received: LOG E 2  
clone: Command “cd /var/lib/one/datastores/0/2; cp  
/var/lib/one/datastores/1/e4f885728f29142b3b0435b980f83e2d  
/var/lib/one/datastores/0/2/disk.0” failed: Warning: Permanently added  
’opennebula2,10.5.0.27’ (ECDSA) to the list of known hosts.

the cp command failed, either because of DNS, or because oneadmin cannot login without being asked for a password.  
Make sure the name of the host can be resolved, and make sure that oneadmin can login from master to node without being asked for a password (so, using ssh keys)

---

<div class="post-metadata">

**Author:** ![cesarufmt](https://avatars.discourse-cdn.com/v4/letter/c/58f4c7/32.png) [@cesarufmt](https://forum.opennebula.io/u/cesarufmt)\
**Post date:** [June 9, 2015, 2:35pm UTC](https://forum.opennebula.io/t/error-creating-vms-with-templates/833/4 "2015-06-09T14:35:29Z")

</div>

thanks Mike.

I’m already using that link as a reference.

---

<div class="post-metadata">

**Author:** ![cesarufmt](https://avatars.discourse-cdn.com/v4/letter/c/58f4c7/32.png) [@cesarufmt](https://forum.opennebula.io/u/cesarufmt)\
**Post date:** [June 9, 2015, 2:43pm UTC](https://forum.opennebula.io/t/error-creating-vms-with-templates/833/5 "2015-06-09T14:43:29Z")

</div>

Thanks VURland.

I’am already export ssh keys and I’m already created references for the host opennebula2 in /etc/hosts.

So I believe that is another problem.

Thank you for your help!

---

<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:** [June 10, 2015, 4:32pm UTC](https://forum.opennebula.io/t/error-creating-vms-with-templates/833/6 "2015-06-10T16:32:04Z")

</div>

The startupguide also mentions this part below, which prevent the question using SSH: “do you want to add host xxxxx to the known hosts? yes/no”. That way you need to type yes to continue and a driver or script doesnt do that.  
With this change to the .ssh/config file for user oneadmin on you master-server, you prevent that from happening.

QUOTE:  
Add the following snippet to ~/.ssh/config so it doesn’t prompt to add the keys to the known\_hosts file:  
$ cat \<\< EOT \> ~/.ssh/config  
Host \*  
StrictHostKeyChecking no  
UserKnownHostsFile /dev/null  
EOT  
$ chmod 600 ~/.ssh/config  
END QUOTE

I think this is why your error log shows:  
Warning: Permanently added ‘opennebula2,10.5.0.27’ (ECDSA) to the list of known hosts.

---

<div class="post-metadata">

**Author:** ![cesarufmt](https://avatars.discourse-cdn.com/v4/letter/c/58f4c7/32.png) [@cesarufmt](https://forum.opennebula.io/u/cesarufmt)\
**Post date:** [June 11, 2015, 2:03am UTC](https://forum.opennebula.io/t/error-creating-vms-with-templates/833/7 "2015-06-11T02:03:59Z")

</div>

It’s solved. Thank you!!
