Create Virtual Machine Failed

Hey,
I try to make a virutal Machine out of my template, but the status is allways “failed”.
I am completely new OpenNebula and not very skilled in Linux
This is the log:

Mon Aug 10 10:13:11 2015 [Z0][DiM][I]: New VM state is ACTIVE.
Mon Aug 10 10:13:11 2015 [Z0][LCM][I]: New VM state is PROLOG.
Mon Aug 10 10:13:12 2015 [Z0][LCM][I]: New VM state is BOOT
Mon Aug 10 10:13:12 2015 [Z0][VMM][I]: Generating deployment file: /var/lib/one/vms/10/deployment.0
Mon Aug 10 10:13:13 2015 [Z0][VMM][I]: ExitCode: 0
Mon Aug 10 10:13:13 2015 [Z0][VMM][I]: Successfully execute network driver operation: pre.
Mon
Aug 10 10:13:15 2015 [Z0][VMM][I]: Command execution fail: cat <<
EOT | /var/tmp/one/vmm/kvm/deploy
’/var/lib/one//datastores/0/10/deployment.0’ ‘kvm2-bross’ 10 kvm2-bross
Mon Aug 10 10:13:15 2015 [Z0][VMM][I]: error: Failed to create domain from /var/lib/one//datastores/0/10/deployment.0
Mon
Aug 10 10:13:15 2015 [Z0][VMM][I]: error: internal error process exited
while connecting to monitor: kvm: -drive
file=/var/lib/one//datastores/0/10/disk.0,if=none,id=drive-scsi0-0-0,readonly=on,format=qcow2,cache=none:
could not open disk image /var/lib/one//datastores/0/10/disk.0: Invalid
argument
Mon Aug 10 10:13:15 2015 [Z0][VMM][I]:
Mon Aug 10 10:13:15 2015 [Z0][VMM][E]: Could not create domain from /var/lib/one//datastores/0/10/deployment.0
Mon Aug 10 10:13:15 2015 [Z0][VMM][I]: ExitCode: 255
Mon Aug 10 10:13:15 2015 [Z0][VMM][I]: Failed to execute virtualization driver operation: deploy.
Mon
Aug 10 10:13:15 2015 [Z0][VMM][E]: Error deploying virtual machine:
Could not create domain from /var/lib/one//datastores/0/10/deployment.0
Mon Aug 10 10:13:15 2015 [Z0][DiM][I]: New VM state is FAILED

Does anyone have suggestions for improvement?

Can you instantiate again, and when it fails, send the output of:

# in the hipervisor node
find /var/lib/one/datastores/0 -ls

Meanwhile I changed the settings in some places a litte.

KVM Server:
1441852 0 lrwxrwxrwx 1 oneadmin oneadmin 21 May 12 15:19 /var/lib/one/datastores/0 -> /mnt/nfs/datastores/0

NebulaServer:
4983367 4 drwxr-xr-x 5 oneadmin oneadmin 4096 Aug 12 11:53 /var/lib/one/datastores/0
5113840 4 drwxr-xr-x 2 oneadmin oneadmin 4096 Aug 12 11:53 /var/lib/one/datastores/0/14
5113845 364 -rw-r–r-- 1 oneadmin oneadmin 372736 Aug 12 11:53 /var/lib/one/datastores/0/14/disk.2
5113847 0 lrwxrwxrwx 1 oneadmin oneadmin 35 Aug 12 11:53 /var/lib/one/datastores/0/14/disk.2.iso -> /var/lib/one/datastores/0/14/disk.2
5113842 0 lrwxrwxrwx 1 oneadmin oneadmin 58 Aug 12 11:53 /var/lib/one/datastores/0/14/disk.0 -> /var/lib/one/datastores/1/79080f2b75d5ce95925f360d1c992c0a
5113844 0 lrwxrwxrwx 1 oneadmin oneadmin 58 Aug 12 11:53 /var/lib/one/datastores/0/14/disk.1 -> /var/lib/one/datastores/1/e85ba433eb7bf9c518af14dac893a3fe
5113849 4 -rw-r–r-- 1 oneadmin oneadmin 1091 Aug 12 11:53 /var/lib/one/datastores/0/14/deployment.0
5242931 4 drwxr-xr-x 2 oneadmin oneadmin 4096 Jun 9 15:02 /var/lib/one/datastores/0/6
5242938 0 lrwxrwxrwx 1 oneadmin oneadmin 34 Jun 9 15:02 /var/lib/one/datastores/0/6/disk.1.iso -> /var/lib/one/datastores/0/6/disk.1
5242933 40960 -rw-r–r-- 1 oneadmin oneadmin 41943040 Jun 9 15:02 /var/lib/one/datastores/0/6/disk.0
5242937 364 -rw-r–r-- 1 oneadmin oneadmin 372736 Jun 9 15:02 /var/lib/one/datastores/0/6/disk.1
5242891 4 drwxr-xr-x 2 oneadmin oneadmin 4096 May 12 18:24 /var/lib/one/datastores/0/2
5242903 0 lrwxrwxrwx 1 oneadmin oneadmin 34 May 12 18:24 /var/lib/one/datastores/0/2/disk.3.iso -> /var/lib/one/datastores/0/2/disk.3
5242898 8 -rw-r–r-- 1 root root 1073741825 May 12 18:24 /var/lib/one/datastores/0/2/disk.2
5242895 0 lrwxrwxrwx 1 oneadmin oneadmin 58 May 12 18:24 /var/lib/one/datastores/0/2/disk.0 -> /var/lib/one/datastores/1/0f4642b37a54d9f28d1a92d60119fb32
5242897 0 lrwxrwxrwx 1 oneadmin oneadmin 58 May 12 18:24 /var/lib/one/datastores/0/2/disk.1 -> /var/lib/one/datastores/1/fbb2c1cdcab9d2cc4c06a262b9e3cdc7
5242900 4 -rw-r–r-- 1 oneadmin oneadmin 1153 May 12 18:24 /var/lib/one/datastores/0/2/deployment.0
5242902 364 -rw-r–r-- 1 libvirt-qemu libvirt-qemu 372736 May 12 18:24 /var/lib/one/datastores/0/2/disk.3

the last part with libvirt-qemu libvirt-qemu looks wrong, right? :confused:

For OpenNebula, it will refer to /var/lib/one/datastores/0 but since you do symlink, in filesystem it will store at /mnt/nfs/datastores/0. In this case, i dont prefer to symlink. Have 2 options (what i have practice)

  1. Mount the external NFS to /var/lib/one/datastores instead of /mnt/nfs/datastores OR

  2. Add /mnt/nfs/datastores as DATASTORE_LOCATION & DATASTORE_BASE_PATH in oned.conf file

I agree with @anandharaj, it looks like a problem with the NFS configuration.

Another option would be to mount -o bind from /mnt/nfs/datastores to /var/lib/one/datastores in the hypervisor node.

Make sure you also have no_root_squash in your NFS configuration. By the way, does your /etc/libvirtd/qemu.conf say dynamic_ownership = 0?

Hey,

The problems could be solved.

file=/var/lib/one//datastores/0/10/disk.0,if=none,id=drive-scsi0-0-0,readonly=on,format=qcow2,cache=none: could not open disk image /var/lib/one//datastores/0/10/disk.0: Invalid argument

My template was set on raw instrad of qcow2 → Could not open disk

Thanks for your help :smile:

Btw: the symlinks were correct