Hello,
Some days ago, I attended to the “Introduction to the OpenNebula operations” webinar. Although I’m managing an OpenNebula environment since 2018, I think all information I can gather from webinars, forums and so on is always important and necessary.
In that webinar it was explained “VM Live migration” between nodes. However, in my environment, when I try to run a “migrate”, OpenNebula returns me an error.
This is my configuration:
- One server that acts as controller (scheduler, Sunstone, etc) and, also, as KVM hypervisor.
- One node thats acts as KVM hypervisor.
KVM node mounts using NFS datastores 1 (images, default) and 2 (files) and runs locally datastore 0 (VMs, system). Also, datastores 0 and 1 have TM_MAD as “qcow2”. I configured in this way because I read that qcow2 allows some features/capabilities for running/deploying faster that “ssh”…
When I instantiate one VM in each KVM node and, then, I try to run a “migrate” to swap node, I get this error in “oned.log”:
Mon Feb 24 08:37:56 2025 [Z0][VMM][D]: Message received: SAVE SUCCESS 56 -
Mon Feb 24 08:37:56 2025 [Z0][TrM][D]: Message received: TRANSFER SUCCESS 56 -
Mon Feb 24 08:37:58 2025 [Z0][VMM][D]: Message received: RESTORE FAILURE 56 error: failed to get domain 'one-56' ERROR: restore: Command "set -e -o pipefail # extract the xml from the checkpoint virsh --connect qemu:///system save-image-dumpxml /var/lib/one//datastores/0/56/checkpoint > /var/lib/one//datastores/0/56/checkpoint.xml # Eeplace all occurrences of the DS_LOCATION/<DS_ID>/<VM_ID> with the specific # DS_ID where the checkpoint is placed. This is done in case there was a # system DS migration sed -i "s%/var/lib/one//datastores/[0-9]\+/56/%/var/lib/one//datastores/0/56/%g" /var/lib/one//datastores/0/56/checkpoint.xml sed -i "s%/var/lib/one/datastores/[0-9]\+/56/%/var/lib/one//datastores/0/56/%g" /var/lib/one//datastores/0/56/checkpoint.xml" failed: error: Failed to open file '/var/lib/one/datastores/0/56/checkpoint': No such file or directory Could not recalculate paths in /var/lib/one//datastores/0/56/checkpoint.xml ExitCode: 1
and this other error in “$vm_id.log”:
Mon Feb 24 08:37:57 2025 [Z0][VMM][I]: Successfully execute network driver operation: pre.
Mon Feb 24 08:37:58 2025 [Z0][VMM][I]: Command execution fail (exit code: 1): cat << 'EOT' | /var/tmp/one/vmm/kvm/restore '/var/lib/one//datastores/0/56/checkpoint' 'nebulacaos-1-test' '708e6bc1-0bef-4dd6-9de1-64cb47cc284f' 56 nebulacaos-1-test
Mon Feb 24 08:37:58 2025 [Z0][VMM][I]: error: failed to get domain 'one-56'
Mon Feb 24 08:37:58 2025 [Z0][VMM][E]: restore: Command "set -e -o pipefail
Mon Feb 24 08:37:58 2025 [Z0][VMM][I]:
Mon Feb 24 08:37:58 2025 [Z0][VMM][I]: # extract the xml from the checkpoint
Mon Feb 24 08:37:58 2025 [Z0][VMM][I]:
Mon Feb 24 08:37:58 2025 [Z0][VMM][I]: virsh --connect qemu:///system save-image-dumpxml /var/lib/one//datastores/0/56/checkpoint > /var/lib/one//datastores/0/56/checkpoint.xml
Mon Feb 24 08:37:58 2025 [Z0][VMM][I]:
Mon Feb 24 08:37:58 2025 [Z0][VMM][I]: # Eeplace all occurrences of the DS_LOCATION/<DS_ID>/<VM_ID> with the specific
Mon Feb 24 08:37:58 2025 [Z0][VMM][I]: # DS_ID where the checkpoint is placed. This is done in case there was a
Mon Feb 24 08:37:58 2025 [Z0][VMM][I]: # system DS migration
Mon Feb 24 08:37:58 2025 [Z0][VMM][I]:
Mon Feb 24 08:37:58 2025 [Z0][VMM][I]: sed -i "s%/var/lib/one//datastores/[0-9]\+/56/%/var/lib/one//datastores/0/56/%g" /var/lib/one//datastores/0/56/checkpoint.xml
Mon Feb 24 08:37:58 2025 [Z0][VMM][I]: sed -i "s%/var/lib/one/datastores/[0-9]\+/56/%/var/lib/one//datastores/0/56/%g" /var/lib/one//datastores/0/56/checkpoint.xml" failed: error: Failed to open file '/var/lib/one/datastores/0/56/checkpoint': No such file or directory
Mon Feb 24 08:37:58 2025 [Z0][VMM][I]: Could not recalculate paths in /var/lib/one//datastores/0/56/checkpoint.xml
Mon Feb 24 08:37:58 2025 [Z0][VMM][I]: ExitCode: 1
Mon Feb 24 08:37:58 2025 [Z0][VMM][I]: Failed to execute virtualization driver operation: restore.
Mon Feb 24 08:37:58 2025 [Z0][VMM][E]: RESTORE: error: failed to get domain 'one-56' ERROR: restore: Command "set -e -o pipefail # extract the xml from the checkpoint virsh --connect qemu:///system save-image-dumpxml /var/lib/one//datastores/0/56/checkpoint > /var/lib/one//datastores/0/56/checkpoint.xml # Eeplace all occurrences of the DS_LOCATION/<DS_ID>/<VM_ID> with the specific # DS_ID where the checkpoint is placed. This is done in case there was a # system DS migration sed -i "s%/var/lib/one//datastores/[0-9]\+/56/%/var/lib/one//datastores/0/56/%g" /var/lib/one//datastores/0/56/checkpoint.xml sed -i "s%/var/lib/one/datastores/[0-9]\+/56/%/var/lib/one//datastores/0/56/%g" /var/lib/one//datastores/0/56/checkpoint.xml" failed: error: Failed to open file '/var/lib/one/datastores/0/56/checkpoint': No such file or directory Could not recalculate paths in /var/lib/one//datastores/0/56/checkpoint.xml ExitCode: 1
Mon Feb 24 08:37:58 2025 [Z0][VM][I]: New LCM state is BOOT_MIGRATE_FAILURE
Why? Where is the configuration problem and how could I solve and allow “migrate” with my configuration?
Thanks.