Internal disk-only snapshots in qemu domain

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

 

We are considering the following use-case of libvirt’s domain snapshot (and revert) feature:

  1. Domain is qemu
  2. Snapshot type is disk-only (VIR_DOMAIN_SNAPSHOT_CREATE_DISK_ONLY)
  3. Snapshot location is internal (VIR_DOMAIN_SNAPSHOT_LOCATION_INTERNAL)
  4. All of the VM disks are:
    1. Network type (VIR_STORAGE_TYPE_NETWORK)
    2. RBD protocol (VIR_STORAGE_NET_PROTOCOL_RBD)
    3. Raw format (VIR_STORAGE_FILE_RAW)
  5. VM can be either active or inactive

 

We want to extend libvirt to support this use-case.

 

Consider the following changes:

  1. For the inactive VM case, libvirt currently calls “qemu-img snapshot” for taking a snapshot, as well as reverting (adding “-a” to qemu-img).
    The same would also work for our-use case, as basically the same qemu-img command would work for RBD disks as well (using rbd:poolname/imagename as the filename).
    So basically we need to reuse code from qemuDomainSnapshotForEachQcow2Raw.
  2. For the active VM case, we can re-use code from qemuDomainSnapshotCreateActiveExternal, but call qemu’s  “snapshot_blkdev_internal” instead of the current “snapshot_blkdev”.
    This would work for RBD disks, but more generally for any qemu block driver which implements “bdrv_snapshot_create”.

 

BTW it seems to me that if you try to take an internal snapshot of just the disks, you will actually get an external snapshot? Or is there some place in the code which validates and fails this case?

 

Anyhow, I would really appreciate any feedback or thoughts.

 

Thanks,

Or


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux