Qcow2 disk-efficient spawning of many instances as delta-only copy-on-write disks on NFS Shared datastore


(kita) #1

I do not find a proper solution guide for this use case:

  1. Goal: spawn many instances of the same VM template for application scalability, but only copy the blocks different from the template image for each new instance, using the copy-on-write mode
  2. On my implementation with NFS Shared datastores, it seems all new instances duplicate the full template hard disk instead of only the differences with the template image. It is easy to see when you instantiate, you can see the size of the image that grows - say to 10GB - whereas differences should just be a few 10MB of logs or so.

Versions of the related components and OS (frontend, hypervisors, VMs):
OPennebula 5.2.1
Steps to reproduce:
a/ Create a NFS datastore of type Shared
b/ Create a VM template with non-persistent disk image of type qcow2 (example: Ubuntu 16.04 with 10GB HDD)
c/ instanciate a VM from this template
d/ watch VM in Sunstone storage tab the size of the image slowly growing to 10G after a long time

Current results:
Instance image file is same size as template : 10GB
Expected results:
Image file should be much smaller and contain only different blocks lie in qcow2 principle


(Sergio) #2

This is a great idea but something like this unfortunately is not supported on OpenNebula at the moment. This said, spinning VMs from differential backups might have important repercussions on some VM features like snapshots, disk save-as, disk snapshots that will have to be considered.