[SOLVED] Error copying image via ssh

Hi all,

I’m new into Opennebula (and in Cloud Computing too). I create a Opennebula installation with 2 VMs (deployed over other Opennebula installation) and one PC as host, the installation scheme have the following elements:

  1. Front-End : Centos 7 minimal installed in a VM

  2. Datastore : Centos 7 minimal with a volatile disk (10 Gb formatted as ext4), also in a VM

  3. Host: My computer (ubuntu 14.04 LTS) which has virtualization support.

At first time I tried to use NFS between my Opennebula installation, mounting my ext4 disk in the VM (2) (Datastore) and sharing with the Host (3) and de FrontEnd (1) server. This installation runs well, i.e., only mount the following datastores in frontend and host, which are shared from the VM (2):

  1. /var/lib/one/datastore/1

  2. /var/lib/one/datastore/2

But now i’m trying another datastore configuration: Umount all in the Host, and share via ssh the system datastore (0) between the Front-End and the Host. I choose in Sunstone the following option:

  • Infrastructure > Datastores > ID 0 (system) > Attributes > TM_MAD -->>>> ssh

and the other two datastores remains in the TM_MAD = shared option.

(I have ssh authentification between the 3 elements)

Problem : When I want instantiate a VM with this system datastore configuration I have this problem

[oneadmin@ip-10-38-2-35 ~]$ cat /var/log/one/25.log Fri Jan 29 11:33:45 2016 [Z0][DiM][I]: New VM state is ACTIVE. Fri Jan 29 11:33:45 2016 [Z0][LCM][I]: New VM state is PROLOG. Fri Jan 29 11:33:45 2016 [Z0][TM][I]: Command execution fail: /var/lib/one/remotes/tm/shared/clone ip-10-38-2-35.localdomain:/var/lib/one//datastores/1/ef9299a0a084cb129a84766a18903d1b 193.144.44.136:/var/lib/one//datastores/0/25/disk.0 25 1 Fri Jan 29 11:33:45 2016 [Z0][TM][I]: clone: Cloning /var/lib/one/datastores/1/ef9299a0a084cb129a84766a18903d1b in 193.144.44.136:/var/lib/one//datastores/0/25/disk.0 Fri Jan 29 11:33:45 2016 [Z0][TM][E]: clone: Command "cd /var/lib/one/datastores/0/25; cp /var/lib/one/datastores/1/ef9299a0a084cb129a84766a18903d1b /var/lib/one/datastores/0/25/disk.0" failed: Warning: Permanently added '193.144.44.136' (ECDSA) to the list of known hosts. Fri Jan 29 11:33:45 2016 [Z0][TM][I]: cp: cannot stat '/var/lib/one/datastores/1/ef9299a0a084cb129a84766a18903d1b': No such file or directory Fri Jan 29 11:33:45 2016 [Z0][TM][E]: Error copying ip-10-38-2-35.localdomain:/var/lib/one//datastores/1/ef9299a0a084cb129a84766a18903d1b to 193.144.44.136:/var/lib/one//datastores/0/25/disk.0 Fri Jan 29 11:33:45 2016 [Z0][TM][I]: ExitCode: 1 Fri Jan 29 11:33:46 2016 [Z0][TM][E]: Error executing image transfer script: Error copying ip-10-38-2-35.localdomain:/var/lib/one//datastores/1/ef9299a0a084cb129a84766a18903d1b to 193.144.44.136:/var/lib/one//datastores/0/25/disk.0 Fri Jan 29 11:33:46 2016 [Z0][DiM][I]: New VM state is FAILED Fri Jan 29 12:46:07 2016 [Z0][DiM][I]: New VM state is DONE. Fri Jan 29 12:46:07 2016 [Z0][TM][W]: Ignored: TRANSFER SUCCESS 25 -
Does anyone knows if it is possible this configuration?

Thanks,

Hello

oneadmin user has to ssh to hosts via ssh key this line shows you dont have to try before
Warning: Permanently added '193.144.44.136' (ECDSA) to the list of known hosts.

second check you hostname is this true ip-10-38-2-35.localdomain

Hi,

thanks for the reply,

Finally we solved the problem, which comes from the hostname. As you say, we had to set in /etc/hosts the following information:

here my IP addres localhost localhost.localdomain localhost4 localhost4.localdomain4 ip-10-38-2-35.localdomain

and set the following configuration parameters for the datastore “default” and the datastore “system”

       TM_MAD = ssh

Thanks!

I am getting same error, even i made changes as you mentioned above
I am using opennebula 4.12.0-1 version
See my configuration

  1. NFS server
    cat /etc/exports
    /ibm/vms *(rw,fsid=0,insecure,sync,no_subtree_check,root_squash,anonuid=9869,anongid=9869)

  2. on frontend i mounted
    192.168.56.33://ibm/vms 48G 4.5G 41G 10% /var/lib/one/datastores

  3. ls -l /var/lib/one/datastores/
    total 16
    drwxr-xr-x 4 oneadmin oneadmin 4096 Apr 8 07:57 0
    drwxr-xr-x 2 oneadmin oneadmin 4096 Apr 8 07:58 1
    drwxr-xr-x 2 oneadmin oneadmin 4096 Apr 6 07:29 101
    drwxr-xr-x 2 oneadmin oneadmin 4096 Mar 17 04:07 2

  4. #onedatastore list
    ID NAME SIZE AVAIL CLUSTER IMAGES TYPE DS TM STAT
    0 system 145.7G 95% - 0 sys - shared on
    1 default 47.2G 86% - 1 img fs ssh on
    2 files 47.2G 86% - 0 fil fs ssh on
    101 nfs_ds 47.2G 86% - 0 img fs ssh on

5 if i used ssh to datastore “system” then output would be

onedatastore list
ID NAME SIZE AVAIL CLUSTER IMAGES TYPE DS TM STAT
0 system - - - 0 sys - ssh on
1 default 47.2G 86% - 1 img fs ssh on
2 files 47.2G 86% - 0 fil fs ssh on
101 nfs_ds 47.2G 86% - 0 img fs ssh on

Hi @Shreyu82,

Can you show us the content of the log of the failed machine? (/var/log/one/<VM_ID>.log)

Cheers

@pdiaz See below configuration and log

192.168.181.128 - Opennebula and opennebula-sunstone server - Debian7 , 48 GB
192.168.181.129 - Openebula node server on SUSE_11 , 145 GB
192.168.56.33 - NFS Kernel server , 48 GB

onedatastore list

ID NAME SIZE AVAIL CLUSTER IMAGES TYPE DS TM STAT
0 system 145.7G 97% - 0 sys - shared on <= it shows opennebula node drive
1 default 47.2G 86% - 1 img fs ssh on
2 files 47.2G 86% - 0 fil fs ssh on
101 nfs_ds 47.2G 86% - 0 img fs ssh on

When i mounting nfs on opennebula server

I got

tail -100f /var/log/one/71.log
New VM state is ACTIVE.
New VM state is PROLOG.
Command execution fail: /var/lib/one/remotes/tm/ssh/clone idafeld:/var/lib/one//datastores/1/1c4394048fdfc6b62c6c395d91bb7fe5 onenode:/var/lib/one//datastores/0/71/disk.0 71 1
clone: Cloning idafeld:/var/lib/one//datastores/1/1c4394048fdfc6b62c6c395d91bb7fe5 in /var/lib/one/datastores/0/71/disk.0
clone: Command “scp -r idafeld:/var/lib/one//datastores/1/1c4394048fdfc6b62c6c395d91bb7fe5 onenode:/var/lib/one//datastores/0/71/disk.0” failed: Warning: Permanently added ‘idafeld’ (EC

Warning: Permanently added ‘onenode,192.168.181.129’ (RSA) to the list of known hosts.
/var/lib/one//datastores/1/1c4394048fdfc6b62c6c395d91bb7fe5: No such file or directory
Error copying idafeld:/var/lib/one//datastores/1/1c4394048fdfc6b62c6c395d91bb7fe5 to onenode:/var/lib/one//datastores/0/71/disk.0
ExitCode: 1
Error executing image transfer script: Error copying idafeld:/var/lib/one//datastores/1/1c4394048fdfc6b62c6c395d91bb7fe5 to onenode:/var/lib/one//datastores/0/71/disk.0
New VM state is FAILED
New VM state is DONE.
Ignored: TRANSFER SUCCESS 71 -

and without mount
tail -100f /var/log/one/72.log
New VM state is ACTIVE.
New VM state is PROLOG.
Command execution fail: /var/lib/one/remotes/tm/ssh/clone idafeld:/var/lib/one//datastores/1/1c4394048fdfc6b62c6c395d91bb7fe5 onenode:/var/lib/one//datastores/0/71/disk.0 71 1
clone: Cloning idafeld:/var/lib/one//datastores/1/1c4394048fdfc6b62c6c395d91bb7fe5 in /var/lib/one/datastores/0/71/disk.0
clone: Command “scp -r idafeld:/var/lib/one//datastores/1/1c4394048fdfc6b62c6c395d91bb7fe5 onenode:/var/lib/one//datastores/0/71/disk.0” failed: Warning: Permanently added 'idaf

Warning: Permanently added ‘onenode,192.168.181.129’ (RSA) to the list of known hosts.
/var/lib/one//datastores/1/1c4394048fdfc6b62c6c395d91bb7fe5: No such file or directory
Error copying idafeld:/var/lib/one//datastores/1/1c4394048fdfc6b62c6c395d91bb7fe5 to onenode:/var/lib/one//datastores/0/71/disk.0
ExitCode: 1
Error executing image transfer script: Error copying idafeld:/var/lib/one//datastores/1/1c4394048fdfc6b62c6c395d91bb7fe5 to onenode:/var/lib/one//datastores/0/71/disk.0
New VM state is FAILED
New VM state is DONE.
Ignored: TRANSFER SUCCESS 71 -

onedatastore list -x|grep -E "ID|BASE|TM_MAD"
0
0
0
<TM_MAD></TM_MAD>
<BASE_PATH></BASE_PATH>
<CLUSTER_ID>-1</CLUSTER_ID>
<TM_MAD></TM_MAD>
1
0
0
<TM_MAD></TM_MAD>
<BASE_PATH></BASE_PATH>
<CLUSTER_ID>-1</CLUSTER_ID>
0
<BASE_PATH></BASE_PATH>
<TM_MAD></TM_MAD>
2
0
0
<TM_MAD></TM_MAD>
<BASE_PATH></BASE_PATH>
<CLUSTER_ID>-1</CLUSTER_ID>
<BASE_PATH></BASE_PATH>
<TM_MAD></TM_MAD>
101
0
0
<TM_MAD></TM_MAD>
<BASE_PATH></BASE_PATH>
<CLUSTER_ID>-1</CLUSTER_ID>
<TM_MAD></TM_MAD>

Dear Friends,

I am also getting the same issue. Log File of VM failure is as follows:

Sun Jan 29 04:31:15 2017 [Z0][DiM][I]: New VM state is ACTIVE.
Sun Jan 29 04:31:15 2017 [Z0][LCM][I]: New VM state is PROLOG.
Sun Jan 29 04:31:16 2017 [Z0][TM][I]: Command execution fail: /var/lib/one/remotes/tm/shared/clone ubuntu:/var/lib/one//datastores/1/2c439c89cd4e95977f1ecd79f5fc6291 192.168.17.130:/var/lib/one//datastores/0/2/disk.0 2 1
Sun Jan 29 04:31:16 2017 [Z0][TM][I]: clone: Cloning /var/lib/one/datastores/1/2c439c89cd4e95977f1ecd79f5fc6291 in 192.168.17.130:/var/lib/one//datastores/0/2/disk.0
Sun Jan 29 04:31:16 2017 [Z0][TM][E]: clone: Command “cd /var/lib/one/datastores/0/2; cp /var/lib/one/datastores/1/2c439c89cd4e95977f1ecd79f5fc6291 /var/lib/one/datastores/0/2/disk.0” failed: Warning: Permanently added ‘192.168.17.130’ (ECDSA) to the list of known hosts.
Sun Jan 29 04:31:16 2017 [Z0][TM][I]: cp: cannot stat ‘/var/lib/one/datastores/1/2c439c89cd4e95977f1ecd79f5fc6291’: No such file or directory
Sun Jan 29 04:31:16 2017 [Z0][TM][E]: Error copying ubuntu:/var/lib/one//datastores/1/2c439c89cd4e95977f1ecd79f5fc6291 to 192.168.17.130:/var/lib/one//datastores/0/2/disk.0
Sun Jan 29 04:31:16 2017 [Z0][TM][I]: ExitCode: 1
Sun Jan 29 04:31:16 2017 [Z0][TM][E]: Error executing image transfer script: Error copying ubuntu:/var/lib/one//datastores/1/2c439c89cd4e95977f1ecd79f5fc6291 to 192.168.17.130:/var/lib/one//datastores/0/2/disk.0
Sun Jan 29 04:31:16 2017 [Z0][DiM][I]: New VM state is FAILED

Please Suggest.