Success and Fail of live migration, which parameters make the difference and why

There is an example of template, which can make migrate, but cant live migrate:

DISK = [
ALLOW_ORPHANS = “mixed”,
CEPH_HOST = “192.168.213.10:6789 192.168.213.11:6789 192.168.213.12:6789”,
CEPH_SECRET = “41894754-d47f-4bd6-968a-93c26cf7800e”,
CEPH_USER = “libvirt”,
CLONE = “YES”,
CLONE_TARGET = “SYSTEM”,
CLUSTER_ID = “0,100”,
DATASTORE = “cephds”,
DATASTORE_ID = “101”,
DEV_PREFIX = “vd”,
DISK_ID = “0”,
DISK_SNAPSHOT_TOTAL_SIZE = “0”,
DISK_TYPE = “FILE”,
DRIVER = “raw”,
IMAGE = “Ubuntu 18.04 - KVM”,
IMAGE_ID = “0”,
IMAGE_STATE = “2”,
IMAGE_UNAME = “oneadmin”,
LN_TARGET = “SYSTEM”,
ORIGINAL_SIZE = “2252”,
POOL_NAME = “one-images”,
READONLY = “NO”,
SAVE = “NO”,
SIZE = “2252”,
SOURCE = “one-images/one-0”,
TARGET = “vda”,
TM_MAD = “ceph”,
TM_MAD_SYSTEM = “ssh”,
TYPE = “RBD” ]

And there is another one , which can both live and migrate:

DISK = [
ALLOW_ORPHANS = “mixed”,
CEPH_HOST = “192.168.213.10:6789 192.168.213.11:6789 192.168.213.12:6789”,
CEPH_SECRET = “41894754-d47f-4bd6-968a-93c26cf7800e”,
CEPH_USER = “libvirt”,
CLONE = “YES”,
CLONE_TARGET = “SELF”,
CLUSTER_ID = “0,100”,
DATASTORE = “cephds”,
DATASTORE_ID = “101”,
DEV_PREFIX = “vd”,
DISK_ID = “0”,
DISK_SNAPSHOT_TOTAL_SIZE = “0”,
DISK_TYPE = “RBD”,
DRIVER = “raw”,
IMAGE = “Ubuntu 18.04 - KVM”,
IMAGE_ID = “0”,
IMAGE_STATE = “2”,
IMAGE_UNAME = “oneadmin”,
LN_TARGET = “NONE”,
ORIGINAL_SIZE = “2252”,
POOL_NAME = “one-images”,
READONLY = “NO”,
SAVE = “NO”,
SIZE = “102604”,
SOURCE = “one-images/one-0”,
TARGET = “vda”,
TM_MAD = “ceph”,
TYPE = “RBD” ]

What’s make a difference and why?
Thank you for attention

Hi,

A lot of context is missing, so here are my wild guesses from the provided bits of information.

CLONE = “YES” - Thit is a non-persistent image so for VM disk you will use a copy of the image.

I think you are using different SYSTEM datastores…

CLONE_TARGET = “SYSTEM” - the driver of this SYSTEM datastore will copy the image to a file in the system datastore. So having a file on the host you cannot do live migrate

In the second example you have CLONE_TARGET = “SELF”, which means that the image will be cloned in ceph , which is a shared datastore so the live migration should succeed…

Note that CLONE_TARGET parameters in oned.conf had only informative nature - they represent how the given datastore driver behave and how OpenNebula should do the accounting.

Best,
Anton Todorov

Hello, thanks for your feedback

Yes, because another context is the same for both vms.

Okey, i got it, but if i want use CLONE_TARGET = “SELF” for the first one, where i can set this behaviour?

You should check the available drivers - look for TM_MAD_CONF in /etc/one/oned.conf
If there is no suitable driver you could write one or issue a feature request in the OpenNebula’s github.

Best,
Anton Todorov

Thank you for your advice!