Error in Qcow2 image and openldap integration

Hello everyone, I have my qcow image along with xml file and trying to use that image to launch vm but I dont know how to accomplish this, I have uploaded the image to the default datastore using os as type and virtio as driver and then creating template from that image and adding the ssh key as context along with the xml file required and my both host frontend and node are ubuntu machine and yes I am able to launch iso image from the same. but dont understand hoe to launch qcow2 image.

the below is the error I am receiving :-
Fri Apr 12 11:39:53 2024 [Z0][VM][I]: New state is CLONING
Fri Apr 12 11:40:26 2024 [Z0][VM][I]: New state is PENDING
Fri Apr 12 11:40:38 2024 [Z0][VM][I]: New state is ACTIVE
Fri Apr 12 11:40:38 2024 [Z0][VM][I]: New LCM state is PROLOG
Fri Apr 12 11:40:41 2024 [Z0][TrM][I]: Command execution failed (exit code: 1): /var/lib/one/remotes/tm/qcow2/ln.ssh SanketA-CD417:/var/lib/one//datastores/100/31852cad62b41dc04c7f6dcfa0f28e9b 192.168.3.25:/var/lib/one//datastores/0/21/disk.0 21 100
Fri Apr 12 11:40:41 2024 [Z0][TrM][I]: ln.ssh: Copying /var/lib/one/datastores/100/31852cad62b41dc04c7f6dcfa0f28e9b in 192.168.3.25:/var/lib/one//datastores/0/21/disk.0
Fri Apr 12 11:40:41 2024 [Z0][TrM][E]: ln.ssh: Command “set -ex -o pipefail
Fri Apr 12 11:40:41 2024 [Z0][TrM][I]: rebase_backing_files ()
Fri Apr 12 11:40:41 2024 [Z0][TrM][I]: {
Fri Apr 12 11:40:41 2024 [Z0][TrM][I]: local DST_FILE=$1;
Fri Apr 12 11:40:41 2024 [Z0][TrM][I]: for SNAP_ID in $(find * -maxdepth 0 -type f -print);
Fri Apr 12 11:40:41 2024 [Z0][TrM][I]: do
Fri Apr 12 11:40:41 2024 [Z0][TrM][I]: INFO=$(qemu-img info --output=json $SNAP_ID);
Fri Apr 12 11:40:41 2024 [Z0][TrM][I]: if [[ $INFO =~ “backing-filename” ]]; then
Fri Apr 12 11:40:41 2024 [Z0][TrM][I]: BACKING_FILE=${INFO/backing-filename": "/};
Fri Apr 12 11:40:41 2024 [Z0][TrM][I]: BACKING_FILE=${BACKING_FILE/"
/};
Fri Apr 12 11:40:41 2024 [Z0][TrM][I]: BACKING_FILE=$(basename ${BACKING_FILE});
Fri Apr 12 11:40:41 2024 [Z0][TrM][I]: qemu-img rebase -f qcow2 -F qcow2 -u -b “${DST_FILE}.snap/$BACKING_FILE” $SNAP_ID;
Fri Apr 12 11:40:41 2024 [Z0][TrM][I]: fi;
Fri Apr 12 11:40:41 2024 [Z0][TrM][I]: done
Fri Apr 12 11:40:41 2024 [Z0][TrM][I]: }
Fri Apr 12 11:40:41 2024 [Z0][TrM][I]:
Fri Apr 12 11:40:41 2024 [Z0][TrM][I]: mkdir -p “/var/lib/one/datastores/0/21/disk.0.snap”
Fri Apr 12 11:40:41 2024 [Z0][TrM][I]: cd /var/lib/one/datastores/0/21/disk.0.snap
Fri Apr 12 11:40:41 2024 [Z0][TrM][I]: rm -f “disk.0.snap”
Fri Apr 12 11:40:41 2024 [Z0][TrM][I]: ln -sf “.” “disk.0.snap”
Fri Apr 12 11:40:41 2024 [Z0][TrM][I]: rebase_backing_files “disk.0”
Fri Apr 12 11:40:41 2024 [Z0][TrM][I]: SNAP=”$(ls | grep ‘[1]$’ | sort -n | tail -n 1 || :)"
Fri Apr 12 11:40:41 2024 [Z0][TrM][I]: if [ -z “${SNAP}” ]; then
Fri Apr 12 11:40:41 2024 [Z0][TrM][I]: SNAP=0
Fri Apr 12 11:40:41 2024 [Z0][TrM][I]: cp “/var/lib/one/datastores/100/31852cad62b41dc04c7f6dcfa0f28e9b” “/var/lib/one/datastores/0/21/disk.0.snap/0”
Fri Apr 12 11:40:41 2024 [Z0][TrM][I]: fi
Fri Apr 12 11:40:41 2024 [Z0][TrM][I]:
Fri Apr 12 11:40:41 2024 [Z0][TrM][I]: cd …
Fri Apr 12 11:40:41 2024 [Z0][TrM][I]: rm -f “disk.0”
Fri Apr 12 11:40:41 2024 [Z0][TrM][I]: ln -sf “disk.0.snap/$SNAP” “disk.0"” failed: + mkdir -p /var/lib/one/datastores/0/21/disk.0.snap
Fri Apr 12 11:40:41 2024 [Z0][TrM][I]: + cd /var/lib/one/datastores/0/21/disk.0.snap
Fri Apr 12 11:40:41 2024 [Z0][TrM][I]: + rm -f disk.0.snap
Fri Apr 12 11:40:41 2024 [Z0][TrM][I]: + ln -sf . disk.0.snap
Fri Apr 12 11:40:41 2024 [Z0][TrM][I]: + rebase_backing_files disk.0
Fri Apr 12 11:40:41 2024 [Z0][TrM][I]: + local DST_FILE=disk.0
Fri Apr 12 11:40:41 2024 [Z0][TrM][I]: ++ find disk.0.snap -maxdepth 0 -type f -print
Fri Apr 12 11:40:41 2024 [Z0][TrM][I]: ++ ls
Fri Apr 12 11:40:41 2024 [Z0][TrM][I]: ++ grep '[2]
$’
Fri Apr 12 11:40:41 2024 [Z0][TrM][I]: ++ sort -n
Fri Apr 12 11:40:41 2024 [Z0][TrM][I]: ++ tail -n 1
Fri Apr 12 11:40:41 2024 [Z0][TrM][I]: ++ :
Fri Apr 12 11:40:41 2024 [Z0][TrM][I]: + SNAP=
Fri Apr 12 11:40:41 2024 [Z0][TrM][I]: + ‘[’ -z ‘’ ‘]’
Fri Apr 12 11:40:41 2024 [Z0][TrM][I]: + SNAP=0
Fri Apr 12 11:40:41 2024 [Z0][TrM][I]: + cp /var/lib/one/datastores/100/31852cad62b41dc04c7f6dcfa0f28e9b /var/lib/one/datastores/0/21/disk.0.snap/0
Fri Apr 12 11:40:41 2024 [Z0][TrM][I]: cp: cannot stat ‘/var/lib/one/datastores/100/31852cad62b41dc04c7f6dcfa0f28e9b’: No such file or directory
Fri Apr 12 11:40:41 2024 [Z0][TrM][I]: Error copying SanketA-CD417:/var/lib/one//datastores/100/31852cad62b41dc04c7f6dcfa0f28e9b to 192.168.3.25:/var/lib/one//datastores/0/21/disk.0
Fri Apr 12 11:40:41 2024 [Z0][TrM][E]: Error executing image transfer script: INFO: ln.ssh: Copying /var/lib/one/datastores/100/31852cad62b41dc04c7f6dcfa0f28e9b in 192.168.3.25:/var/lib/one//datastores/0/21/disk.0 ERROR: ln.ssh: Command “set -ex -o pipefail rebase_backing_files () { local DST_FILE=$1; for SNAP_ID in $(find * -maxdepth 0 -type f -print); do INFO=$(qemu-img info --output=json $SNAP_ID); if [[ $INFO =~ “backing-filename” ]]; then BACKING_FILE=${INFO/backing-filename": "/}; BACKING_FILE=${BACKING_FILE/"/}; BACKING_FILE=$(basename ${BACKING_FILE}); qemu-img rebase -f qcow2 -F qcow2 -u -b “${DST_FILE}.snap/$BACKING_FILE” $SNAP_ID; fi; done } mkdir -p “/var/lib/one/datastores/0/21/disk.0.snap” cd /var/lib/one/datastores/0/21/disk.0.snap rm -f “disk.0.snap” ln -sf “.” “disk.0.snap” rebase_backing_files “disk.0” SNAP=”$(ls | grep ‘[3]$’ | sort -n | tail -n 1 || :)" if [ -z “${SNAP}” ]; then SNAP=0 cp “/var/lib/one/datastores/100/31852cad62b41dc04c7f6dcfa0f28e9b” “/var/lib/one/datastores/0/21/disk.0.snap/0” fi cd … rm -f “disk.0” ln -sf “disk.0.snap/$SNAP” “disk.0"” failed: + mkdir -p /var/lib/one/datastores/0/21/disk.0.snap + cd /var/lib/one/datastores/0/21/disk.0.snap + rm -f disk.0.snap + ln -sf . disk.0.snap + rebase_backing_files disk.0 + local DST_FILE=disk.0 ++ find disk.0.snap -maxdepth 0 -type f -print ++ ls ++ grep '[4]$’ ++ sort -n ++ tail -n 1 ++ : + SNAP= + ‘[’ -z ‘’ ‘]’ + SNAP=0 + cp /var/lib/one/datastores/100/31852cad62b41dc04c7f6dcfa0f28e9b /var/lib/one/datastores/0/21/disk.0.snap/0 cp: cannot stat ‘/var/lib/one/datastores/100/31852cad62b41dc04c7f6dcfa0f28e9b’: No such file or directory Error copying SanketA-CD417:/var/lib/one//datastores/100/31852cad62b41dc04c7f6dcfa0f28e9b to 192.168.3.25:/var/lib/one//datastores/0/21/disk.0
Fri Apr 12 11:40:41 2024 [Z0][VM][I]: New LCM state is PROLOG_FAILURE
I am new to opennebula , so thank you inadvance for the help and yes its much appreciated if you provide the whole process of how to use qcow2 image in opennebula to launch vm.
and I also wanted to integrate openldap aslo so needed help in that too.


  1. [:digit:] ↩︎

  2. [:digit:] ↩︎

  3. [:digit:] ↩︎

  4. [:digit:] ↩︎

It looks like you might have a configuration problem/image upload error

The frontend is not able to reach the path where the image was uploaded. Said path is is the PATH attribute in the image template you can see with oneimage show <image_id>.

Make sure your mount points are correct and read this section carefully.

I have checked the location /var/lib/one/datastores/100. the image is present there and will you please guide the full process of how to use qcow2 image with xml file as I didnt find any helpful resource regarding this in the documnet as I am able to use the iso image but not the qcow2 image. I used two way one with uploading image as os and virtio driver which gives mw this error and another with readonly cd with parallel which makes it running but sent the vm in dracut state.
thanks for the help in advance as I am new to it

You have to setup an NFS server and make sure its shares are mounted in the proper datastore paths as mentioned in the documentation linked previously.