Failed when deploy VM on Xen Node

Hy Guys,

I have a problem when i use xen in node, I cant deploy any machine.

Tue Jun 9 09:51:23 2015 [Z0][TM][D]: Message received: TRANSFER SUCCESS 7 -

Tue Jun 9 09:51:24 2015 [Z0][VMM][D]: Message received: LOG I 7 ExitCode: 0

Tue Jun 9 09:51:24 2015 [Z0][VMM][D]: Message received: LOG I 7 Successfully execute network driver operation: pre.

Tue Jun 9 09:51:24 2015 [Z0][VMM][D]: Message received: LOG I 7 Command execution fail: cat << EOT | /var/tmp/one/vmm/xen4/deploy ‘/var/lib/one//datastores/0/7/deployment.0’ ‘189.X.X.X’ 7 189.X.X.X

Tue Jun 9 09:51:24 2015 [Z0][VMM][D]: Message received: LOG I 7 libxl: error: libxl_utils.c:304:libxl_read_file_contents: failed to open /var/lib/one//datastores/0/7/deployment.0: Permission denied

Tue Jun 9 09:51:24 2015 [Z0][VMM][D]: Message received: LOG I 7 Failed to read config file: /var/lib/one//datastores/0/7/deployment.0: Permission denied

Tue Jun 9 09:51:24 2015 [Z0][VMM][D]: Message received: LOG E 7 Unable

Tue Jun 9 09:51:24 2015 [Z0][VMM][D]: Message received: LOG I 7 ExitCode: 3

Tue Jun 9 09:51:24 2015 [Z0][VMM][D]: Message received: LOG I 7 Failed to execute virtualization driver operation: deploy.

Tue Jun 9 09:51:24 2015 [Z0][VMM][D]: Message received: DEPLOY FAILURE 7 Unable

Can you check the permissions of /var/lib/one//datastores/0/7/deployment.0 and the directories bellow in the execution host? Is root able to read that file?

No, only oneadmin have permission. When i use kvm this problem does not occour. When i use xen i have problem.

Root realy need this permissions?

De: Javi Fontán [mailto:forum@opennebula.org]
Enviada em: terça-feira, 9 de junho de 2015 14:29
Para: rafaelpstein@gmail.com
Assunto: [OpenNebula Community] [Support] Failed when deploy VM on Xen Node

https://sjc6.discourse-cdn.com/standard11/user_avatar/forum.opennebula.org/jfontan/45/18_1.png

https://forum.opennebula.io/users/jfontan jfontan https://forum.opennebula.io/users/jfontan Javi Fontán Developer
June 9

Can you check the permissions of /var/lib/one//datastores/0/7/deployment.0 and the directories bellow in the execution host? Is root able to read that file?

To respond, reply to this email or visit https://forum.opennebula.io/t/failed-when-deploy-vm-on-xen-node/840/2 Failed when deploy VM on Xen Node in your browser.

In KVM the VM process is run as oneadmin user, that’s why it works there. Xen daemon runs as root and needs to access the image files. In a local storage you will not have problems as root is able to read everything.

There are problems when the storage is mounted using NFS as by default root is mapped to nobody. See the no_root_squash option:

http://www.tldp.org/HOWTO/NFS-HOWTO/server.html#EXPORTS

many thanks. It´s working now!!!