Cloning from storage-backend qcow2

Hi,
Could you please explain why qcow2 image are copied instead of cloned (backing file), situation is as follows:

  1. Installed OpenNebula 5.12.0.3, front-end and node - same server.
  2. Created Datastore ID=100 with back-end qcow2 (TM_MAD=qcow2)
  3. System datastore ID=0, no changes (TM_MAD=ssh)
  4. Uploaded Windows qcow2 image to the datastore 100.
  5. Created template.
  6. When I instantiate template, qcow2 file is copied from datastore 100 to the System datastore. Copying take lot of time because image file is 50GB.

Datastore ID=100 contains following attributes:

ALLOW_ORPHANS NO
CLONE_TARGET SYSTEM
CLONE_TARGET_SSH SYSTEM
DISK_TYPE FILE
DISK_TYPE_SSH FILE
DRIVER qcow2
DS_MAD fs
LN_TARGET NONE
LN_TARGET_SSH SYSTEM
SAFE_DIRS /mnt
TM_MAD qcow2
TM_MAD_SYSTEM ssh
TYPE IMAGE_DS

Could you please explain why qcow2 image is copied to the system datastore?
I expect cloning - fast VM startup from backing qcow2 file. How to achieve cloning?

Hi @angriukas,

The issue has been detected and solved. OpenNebula 6.0 will include the fix.

Cheers.

Hello @angriukas , I think you can use “shared” type instead of “ssh” when you are using one machine. Your image is PERSISTENT=YES or NO? When NO, then running VM is pretty quick, because it just create new zero size image with pointing to base image as baking image. When you are using persistent YES, then image is just symlinked to the system DS. So in both situations it is quick. Only slow will be, if your image is PERSISTEN = NO and on instantiating image you check “instantiate as persistent” option.

I think main problem is in “ssh” tm mad.