[libvirt] [PATCH] allow snapshots of network sheepdog disks

Sometimes ago in f7c1410b0ee5b878e81f2eddf86c609947a9b27c ability to snapshot sheepdog disk removed. But sheepdog have ability to store vm state inside special object type. Vasiliy Tolstov (1): sheepdog: allow snapshot src/qemu/qemu_driver.c | 6 ++++++ 1 file changed, 6 insertions(+) -- 2.7.4

partially revert f7c1410b0ee5b878e81f2eddf86c609947a9b27c because sheepdog allow to store vm state inside vdi Signed-off-by: Vasiliy Tolstov <v.tolstov@selfip.ru> --- src/qemu/qemu_driver.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index db99c414d458..816514d2d909 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -13887,6 +13887,12 @@ qemuDomainSnapshotPrepare(virConnectPtr conn, active) < 0) goto cleanup; + /* sheepdog allow to store memory inside the vdi */ + if (vm->def->disks[i]->src->type == VIR_STORAGE_TYPE_NETWORK && + (vm->def->disks[i]->src->protocol == VIR_STORAGE_NET_PROTOCOL_SHEEPDOG)) { + break; + } + if (vm->def->disks[i]->src->format > 0 && vm->def->disks[i]->src->format != VIR_STORAGE_FILE_QCOW2) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, -- 2.7.4

2016-09-29 16:00 GMT+03:00 Vasiliy Tolstov <v.tolstov@selfip.ru>:
partially revert f7c1410b0ee5b878e81f2eddf86c609947a9b27c because sheepdog allow to store vm state inside vdi
Sorry, can somebody check this?
Signed-off-by: Vasiliy Tolstov <v.tolstov@selfip.ru> --- src/qemu/qemu_driver.c | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index db99c414d458..816514d2d909 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -13887,6 +13887,12 @@ qemuDomainSnapshotPrepare(virConnectPtr conn, active) < 0) goto cleanup;
+ /* sheepdog allow to store memory inside the vdi */ + if (vm->def->disks[i]->src->type == VIR_STORAGE_TYPE_NETWORK && + (vm->def->disks[i]->src->protocol == VIR_STORAGE_NET_PROTOCOL_SHEEPDOG)) { + break; + } + if (vm->def->disks[i]->src->format > 0 && vm->def->disks[i]->src->format != VIR_STORAGE_FILE_QCOW2) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, -- 2.7.4
-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
-- Vasiliy Tolstov, e-mail: v.tolstov@selfip.ru

On 11.10.2016 19:30, Vasiliy Tolstov wrote:
2016-09-29 16:00 GMT+03:00 Vasiliy Tolstov <v.tolstov@selfip.ru>:
partially revert f7c1410b0ee5b878e81f2eddf86c609947a9b27c because sheepdog allow to store vm state inside vdi
Sorry, can somebody check this?
Signed-off-by: Vasiliy Tolstov <v.tolstov@selfip.ru> --- src/qemu/qemu_driver.c | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index db99c414d458..816514d2d909 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -13887,6 +13887,12 @@ qemuDomainSnapshotPrepare(virConnectPtr conn, active) < 0) goto cleanup;
+ /* sheepdog allow to store memory inside the vdi */ + if (vm->def->disks[i]->src->type == VIR_STORAGE_TYPE_NETWORK && + (vm->def->disks[i]->src->protocol == VIR_STORAGE_NET_PROTOCOL_SHEEPDOG)) { + break; + } +
Unfortunately, I don't have a setup to try this out. The code looks okay, however the commit you are referring to says that there might be some problems with storing memory into RBD image. So is that the case? Because if it is, we might not want to allow this for full snapshots with guest memory. Michal

2016-10-12 5:19 GMT+03:00 Michal Privoznik <mprivozn@redhat.com>:
Unfortunately, I don't have a setup to try this out. The code looks okay, however the commit you are referring to says that there might be some problems with storing memory into RBD image. So is that the case? Because if it is, we might not want to allow this for full snapshots with guest memory.
RBD does not support storing memory snapshot, but sheepdog have this ability from the begining (internally it stores memory like other objects but with specific flag). So i add check for sheepdog network protocol. -- Vasiliy Tolstov, e-mail: v.tolstov@selfip.ru
participants (2)
-
Michal Privoznik
-
Vasiliy Tolstov