Feature #3782

Ceph snapshots

Added by Karsten Nielsen about 4 years ago. Updated over 3 years ago.

Status:ClosedStart date:04/29/2015
Priority:SponsoredDue date:
Assignee:Ruben S. Montero% Done:

0%

Category:Core & System
Target version:Release 4.14
Resolution:fixed Pull request:

Description

We are using ceph as our storage platform for all that we do.

We would like to be able to snapshot ceph thourgh opennebula.
First usecase can be described as follows:
We use the opennebula api to deploy a VM. We define that the VM should have additional rbd's attached as storage devices for docker running inside the VM.
After a while we use salt-stack to upgrade the docker image running on the additional rbd storage devices. Before we upgrade the docker image we create a snapshot of the rbd device through the opennebula api. After the upgrade we find some problem with the upgraded docker image and run salt-stack to revert the rbd to the previous snapshot of the rbd through the opennebula api.
After some time of operation of the VM I login to the sunstone interface and browse to the VM and browse the storage attached to the where I can se the number of snapshots and the amount of space that it occupies.
Second usecase:
We operate a regular VM that we need to do some major upgrades to, we start by doing a snapshot of the VM's storage, eighter through sunstone or opennebula api. Do the upgrade and tries to verify that the upgrade went as expected.
The upgrade failed and we revert to the snapshot before the upgrade, eighter through sunstone or opennebula api.

Associated revisions

Revision 676bfcc1
Added by Ruben S. Montero about 4 years ago

feature #3782: Initial class for Snapshot list

Revision 98f76cf3
Added by Ruben S. Montero about 4 years ago

feature #3782: Create and Revert operations for Disk Snapshots. Core and
OCA levels

Revision e3066807
Added by Ruben S. Montero about 4 years ago

feature #3782: Add DISK_SNAPSHOT_POWEROFF state

Revision 986cf14c
Added by Javi Fontan about 4 years ago

feature #3782: add snapshots to onevm show

Revision 20fac744
Added by Ruben S. Montero about 4 years ago

feature #3782: Generate snapshot files for TransferManager

Revision 904b3248
Added by Ruben S. Montero about 4 years ago

feature #3782: Remove SOURCE and PARENT from snapshots. Drivers MUST
generate internal snapshot references from snapshot_id, parent_id

Revision 9bb5770f
Added by Ruben S. Montero about 4 years ago

feature #3782: Snapshot event triggers

Revision a5c04b47
Added by Ruben S. Montero almost 4 years ago

feature #3782: Re-design of revert operation. New action for drivers, and new state.

Revision 4f473093
Added by Ruben S. Montero almost 4 years ago

feature #3782: Deal with snapshot id=0

Revision 036862b1
Added by Ruben S. Montero almost 4 years ago

feature #3782: Add children list. Rename PARENT_ID to PARENT

Revision 83ac6188
Added by Ruben S. Montero almost 4 years ago

feature #3782: New state to delete snapshots. Delete action OCA (Ruby),
core and CLI

Revision b0f72d5a
Added by Jaime Melis almost 4 years ago

Feature #3782: Add ceph disk snapshot actions

Revision f3c70ff3
Added by Jaime Melis almost 4 years ago

Feature #3782: remove debug info

Revision 4929b50b
Added by Jaime Melis almost 4 years ago

Feature #3782: add support for snapshots of persistent images in ceph

Revision 3f54b6f6
Added by Ruben S. Montero almost 4 years ago

feature #3782: Update copy constructor for Template. It should purge
before copying. Adds a generic clear() method, and use it in class
implementation

Revision c2bf13fe
Added by Ruben S. Montero almost 4 years ago

feature #3782: Copy constructor for Snapshots. Used to transfer the
snapshot lisk from VM disk to Image objects

Revision 9e30da08
Added by Ruben S. Montero almost 4 years ago

feature #3782: Add snapshots to Image object. Transfer them back from VM
disk

Revision 82eac63f
Added by Ruben S. Montero almost 4 years ago

feature #3782: Assignment copy constructor for Snapshots. Clear disk_id

Revision a841b12e
Added by Ruben S. Montero almost 4 years ago

feature #3782: Copy assignment operator for Templates

Revision e599187a
Added by Ruben S. Montero almost 4 years ago

feature #3782: Copy snapshots from Image to VM disks, and back. Still
needs to do the same on attach dettach operations

Revision da794476
Added by Ruben S. Montero almost 4 years ago

feature #3782: Transfer snapshot list from/to attach disks

Revision 14da3131
Added by Ruben S. Montero almost 4 years ago

feature #3782: Image with snapshots cannot be made non-persistent

Revision 43be9c66
Added by Ruben S. Montero almost 4 years ago

feature #3782: Image with snapshots can be only of type OS or DATABLOCK

Revision 023c853b
Added by Ruben S. Montero almost 4 years ago

feature #3782: Cannot clone images with snapshots

Revision 8978f56c
Added by Jaime Melis almost 4 years ago

feature #3782: Display snapshots in oneimage show

Revision 5510b56b
Added by Ruben S. Montero almost 4 years ago

feature #3782: Delete operations are now two-phase. More checks on
disk-snapshots actions. Improve const-ness of Snapshot class

Revision 480ad917
Added by Ruben S. Montero almost 4 years ago

feature #3782: Add missing unlocks to failure exits

Revision 28d3dcb8
Added by Ruben S. Montero almost 4 years ago

feature #3782: Snapshot operations for Image class. Add target_snapshot to
Image class to identify operation on progress

Revision 1bd6ffe6
Added by Ruben S. Montero almost 4 years ago

feature #3782: Delete operations for image snapshots. Core image manager
and driver functions

Revision 62a98c55
Added by Ruben S. Montero almost 4 years ago

feature #3782: Image XML-RPC methods for snapshot delete

Revision 78c7bdbd
Added by Ruben S. Montero almost 4 years ago

feature #3782: Ruby OCA method for snapshot-delete, cli command.
Datastore driver action for snapshot delete

Revision 9348a0d4
Added by Ruben S. Montero almost 4 years ago

feature #3782: Revert action for images

Revision 0bbb99a2
Added by Ruben S. Montero almost 4 years ago

feature #3782: Image are in LOCKED state while performing snapshot
operations

Revision 08356ed8
Added by Ruben S. Montero almost 4 years ago

feature #3782: Flatten action for Images

Revision 211619d8
Added by Jaime Melis almost 4 years ago

Feature #3782: Action for Ceph snapshot flatten

Revision c3621e33
Added by Jaime Melis almost 4 years ago

Feature #3782: Update install.sh and remotes with ds snap actions

Revision 58a260f9
Added by Jaime Melis almost 4 years ago

Feature #3782: Add dummy snapshot_* placeholders for all the TM drivers but Ceph

Revision ee1fb2c6
Added by Ruben S. Montero almost 4 years ago

feature #3782: Do not snapshot volatile disks

Revision c3741e4f
Added by Ruben S. Montero almost 4 years ago

feature #3782: Remove snapshot list if empty

Revision 9d20167c
Added by Ruben S. Montero almost 4 years ago

feautre #3782: Remove SAVE_AS from core

Revision ce851880
Added by Ruben S. Montero almost 4 years ago

feature #3782: Changes in OCA (Ruby) and CLI. Updated direct references
to OCA methods

Revision 630e0360
Added by Ruben S. Montero almost 4 years ago

feature #3782: Removed _hot from saveas functions

Revision 80c06dca
Added by Ruben S. Montero almost 4 years ago

feature #3782: renamed method to disksaveas, cli and Ruby OCA. Added
snap id to save as disks

Revision 943e0e52
Added by Javi Fontan almost 4 years ago

feature #3782: add qcow2 tm/snap_{create,revert}

Revision e5bcaea1
Added by Javi Fontan almost 4 years ago

feature #3782: add qcow2 tm/snap_delete

Revision 996ee89d
Added by Jaime Melis almost 4 years ago

feature #3782: allow disk-saveas operations on the currently running disk

Revision ae33c915
Added by Jaime Melis almost 4 years ago

feature #3782: Add snapshot id to the onevm disk-saveas command

Revision d8c15a13
Added by Jaime Melis almost 4 years ago

feature #3782: Update ceph cpds and mvds scripts to handle snaps

Revision 8ec736d5
Added by Jaime Melis almost 4 years ago

feature #3782: Update all cpds to include the SNAP_ID parameter

Revision b5136a15
Added by Jaime Melis almost 4 years ago

Feature #3782: Remove debugging data

Revision 1b531f82
Added by Jaime Melis almost 4 years ago

Feature #3782: Simplify all TM/mvds action as now they don't handle
deferred saveas

Revision 4a0438c1
Added by Ruben S. Montero almost 4 years ago

feature #3782: Fix comment

Revision 32832269
Added by Ruben S. Montero almost 4 years ago

feature #3782: Fix return codes

Revision dac9db95
Added by Ruben S. Montero almost 4 years ago

feature #3782: Size for snapshots (Virtual size). Renamed is* functions to is_* in VirtualMachine.

Revision 9542d396
Added by Ruben S. Montero almost 4 years ago

feature #3782: Update quotas on non-persistent snapshots

Revision b2101281
Added by Ruben S. Montero almost 4 years ago

feature #3782: Update quotas for snapshots on non-persistent disks on
disk detach and vm done

Revision 9964cb27
Added by Ruben S. Montero almost 4 years ago

feature #3782: Quotas for single snapshot deletion

Revision a2e49d42
Added by Ruben S. Montero almost 4 years ago

feature #3782: Snapshots do not increment IMAGE counter in datastore for
persistent images

Revision f9bec6a0
Added by Jaime Melis almost 4 years ago

feature #3782: Return disk and snapshot information for Ceph disks

Revision dfdbc516
Added by Ruben S. Montero almost 4 years ago

feature #3782: Quotas for one.image snapshots actions

Revision d310b310
Added by Javi Fontan almost 4 years ago

feature #3782: snap_create for persistent qcow2

Revision 96bea2e6
Added by Javi Fontan almost 4 years ago

feature #3782: cpds support for qcow2 snapshots

Revision c6d7c604
Added by Ruben S. Montero almost 4 years ago

feature #3782: Make IMAGE attribute mandatory

Revision 4df224e5
Added by Jaime Melis almost 4 years ago

feature #3782: Add prefix to attach disk CLI options

Revision ce791d1a
Added by Javi Fontan almost 4 years ago

feature #3782: tm/snap_revert for persistent qcow2

Revision 96e340de
Added by Javi Fontan almost 4 years ago

feature #3782: remove duplicate code in qcow2 snap_create

Revision 59f16fd4
Added by Javi Fontan almost 4 years ago

feature #3782: ds/snap_revert for qcow2

Revision a1f536dc
Added by Javi Fontan almost 4 years ago

feature #3782: ds/snap_delete for qcow2

Revision dad5461f
Added by Javi Fontan almost 4 years ago

feature #3782: ds/snap_flatten for qcow2

Revision 1fd7c533
Added by Javi Fontan almost 4 years ago

feature #3782: tm/snap_delete for presistent qcow2

Revision 803592d4
Added by Ruben S. Montero almost 4 years ago

feature #3782: Snapshots in SUSPENDED state + dummy changed to exit 0

Revision 87aec8c9
Added by Javi Fontan almost 4 years ago

feature #3782: make tm qcow2 snap commands use ssh

Revision 106e8055
Added by Javi Fontan almost 4 years ago

feature #3782: Add snap actions to tm/shared

Revision a5e64a37
Added by Carlos Martín almost 4 years ago

Feature #3782: Add disk snapshots to sunstone

Revision e00ef94e
Added by Carlos Martín almost 4 years ago

Feature #3782: Update Sunstone minimized files

Revision cc686d39
Added by Carlos Martín almost 4 years ago

Feature #3782: Implement disk-saveas in sunstone

Revision bf5273a4
Added by Carlos Martín almost 4 years ago

Feature #3782: Update Sunstone minimized files

Revision c9fc7a36
Added by Carlos Martín almost 4 years ago

Feature #3782: Add image snapshots to sunstone

Revision d728d0f9
Added by Carlos Martín almost 4 years ago

Feature #3782: Add image snapshots to java api

Revision 6ca1ff4b
Added by Ruben S. Montero almost 4 years ago

feature #3782: Delete snapshots in RUNNING. Added new states for disk
snapshots in running

Revision 282a813d
Added by Ruben S. Montero almost 4 years ago

feature #3782: Removed unused method

Revision 26da6441
Added by Javi Fontan almost 4 years ago

feature #3782: add snapshot functionality to tm/ssh

Revision 10442f81
Added by Ruben S. Montero almost 4 years ago

feature #3782: Snapshots in RUNNING state

Revision 5a2d65c5
Added by Ruben S. Montero almost 4 years ago

feature #3782: Restore line removed accidentally

Revision e183a8c2
Added by Ruben S. Montero almost 4 years ago

feature #3782: Revert in RUNNING state

Revision 143017e3
Added by Carlos Martín almost 4 years ago

Feature #3782: Minor fixes to oned code

Revision 201fc040
Added by Ruben S. Montero almost 4 years ago

feature #3782: Updated not_supported action to make use of logging functions

Revision 1411e4ad
Added by Carlos Martín almost 4 years ago

Feature #3782: Use int instead of unsigned int for snapshot IDs

Revision d4c1170e
Added by Carlos Martín almost 4 years ago

Feature #3782: Remove unused param from ImageManager::set_image_snapshots

Revision fc831b7c
Added by Carlos Martín almost 4 years ago

Feature #3782: Add disk snapshot actions to java api

Revision 7972b866
Added by Carlos Martín almost 4 years ago

Feature #3782: Add confirmation dialogs to snapshot actions

Revision 9e24ff5a
Added by Carlos Martín almost 4 years ago

Feature #3782: Add image snapshot attributes in onedb upgrade

Revision da86175e
Added by Carlos Martín almost 4 years ago

Feature #3782: Allow to revert to active disk snapshot in sunstone

Revision 3c3050b1
Added by Carlos Martín almost 4 years ago

Feature #3782: Add disk-snapshot commands to states-complete.dot

Revision 8a00683f
Added by Carlos Martín almost 4 years ago

Feature #3782: Add disk-snapshot commands to sunstone state-actions.js

Revision ae86849b
Added by Ruben S. Montero almost 4 years ago

feature #3782: Snapshots (create & revert operations) in running can be
performed either in a suspend/snap/restore cycle or in a detach/snap/attach one.
Allow to revert to the current snapshot

Revision 27e3ac28
Added by Carlos Martín almost 4 years ago

Feature #3782: Rename disk snapshot tag to name

Revision 0ad70f21
Added by Ruben S. Montero almost 4 years ago

feature #3718: Fix errors in acct with new monitor. feature #3782: Fix
acct to account for new snapshots in running. feature #3718: Reset CPU and MEMORY counters

Revision 8a6bc86f
Added by Carlos Martín almost 4 years ago

Feature #3782: Add new history reasons to xsd and sunstone

Revision 5004376e
Added by Carlos Martín almost 4 years ago

Feature #3782: Update fsck for new DS and volatile quotas

Revision ecb8d5d5
Added by Carlos Martín almost 4 years ago

Feature #3782: Disk-snapshot actions operate on persistent images

For persisten images, quota usage is taken from the image owner.

The image snapshots are now in sync during the VM lifecycle, not
just when the VM is shutdown. This was needed because the quota
size is now the image size + image quotas, and it caused problems
if the owner was changed with snapshots pending to be saved back
to the image.

Revision 5213c5a7
Added by Carlos Martín almost 4 years ago

Feature #3782: Update deprecated alias for saveas

Revision c9192651
Added by Carlos Martín almost 4 years ago

Feature #3782: Update fsck. Image snapshots are in sync with their VM disks

Revision ca60bcb9
Added by Jaime Melis almost 4 years ago

Feature #3782: Add ATTACH=YES xml to DISK, not TARGET

Revision 35a5f247
Added by Ruben S. Montero almost 4 years ago

feature #3782: Lazy auth for Snapshots methods

Revision 586686f6
Added by Javi Fontan almost 4 years ago

feature #3782: Add --live_snapshots option to vmm

This option make vmm skip detach/suspend phase for live
snapshots. By default it does live snapshots when vmm
is "kvm" and tm is "qcow2"

Revision 77a72e9d
Added by Javi Fontan almost 4 years ago

feature #3782: support multiple xpath values

xpath.rb will return multiple values if the xpath
starts with "%m%"

Revision 5af94991
Added by Javi Fontan almost 4 years ago

feature #3782: live snapshots for qcow2

Revision c387ea23
Added by Javi Fontan almost 4 years ago

feature #3782: Fix merge with resize clone

Revision 95de9ad5
Added by Carlos Martín almost 4 years ago

Feature #3782: Remove disk-snapshot action for volatile disks

Revision 4b4dc90e
Added by Jaime Melis almost 4 years ago

Feature #3782: Alternate strategy for qcow2/snap_create

Revision a9367b01
Added by Jaime Melis almost 4 years ago

Revert "Feature #3782: Alternate strategy for qcow2/snap_create"

This reverts commit 4b4dc90eb62b2cfff15a98576cb7c40cffaa9c90.

Revision b200e9f9
Added by Jaime Melis almost 4 years ago

Feature #3782: Clean code, refactor and fix concept errors

Revision 7e7e30cb
Added by Jaime Melis almost 4 years ago

Feature #3782: qcow2/ln is no longer a symlink to shared/ln

Revision 5fc420b5
Added by Jaime Melis almost 4 years ago

Feature #3782: fs ds drivers now handle qcow2 and
raw in the snap_* actions

Revision 40086e5c
Added by Jaime Melis almost 4 years ago

Feature #3782: Refactor and separate snap_create into two:
snap_create and snap_create_live

Revision 3ba03db8
Added by Jaime Melis almost 4 years ago

Feature #3782: make 'suspend' the default disk snapshot technique

Revision a4b60a16
Added by Jaime Melis almost 4 years ago

Feature #3782: disable default live disk snapshot

Revision 838b68c6
Added by Javi Fontan almost 4 years ago

feature #3782: bug in qcow2 cpds

Revision ed0cfeb6
Added by Javi Fontan almost 4 years ago

feature #3782: bugs in qcow2 snap_create_live

Revision d800652d
Added by Javi Fontan almost 4 years ago

feature #3782: create snap dir link for persistent images

Revision d840ce3e
Added by Javi Fontan over 3 years ago

feature #3782: fix monitoring of persistent images

Revision 0a715ca0
Added by Jaime Melis over 3 years ago

Feature #3782: Display correct states for disk-snapshot-* operations

History

#1 Updated by Ruben S. Montero about 4 years ago

  • Tracker changed from Request to Feature
  • Category set to Core & System
  • Priority changed from Normal to Sponsored
  • Target version set to Release 4.14

#2 Updated by Ruben S. Montero about 4 years ago

  • Assignee set to Ruben S. Montero

#3 Updated by Gerben Meijer almost 4 years ago

I've reviewed the commits and as far as I can see, the current iteration of this only allows snapshots to be made with the VM powered off?

I think it would be beneficial to include the ability to snapshot without powering off the VM. I am well aware of the implications of snapshotting a disk live outside the OS when there is no way to know if the data is flushed to disk, however there are a few good reasons why this is still something that is good to have:

  • A live disk snapshot in an unknown state is better than no snapshot at all, specifically for cases where a VM cannot be powered off due to customer requirements
  • In most cases a live snapshot of a disk for a VM using a journalled filesystem without a guest agent running is recoverable without issues (provided that there is no write back caching going on in qemu, which may not apply to CEPH but does apply to other potential storage systems that support snapshots)
  • The fsfreeze feature in the guest agent can be leveraged to trigger a freeze in the guest to ensure sync status, then take a snapshot outside of the VM, and finally thaw it after the snapshot action has been taken (see http://wiki.qemu.org/Features/QAPI/GuestAgent for details)

I'm not aware of guest agent support, but that can be implemented as a new feature at a later date - live snapshotting does not explicitly require it and documentation can reflect the risks, with a safe default of not allowing it if so desired.

#4 Updated by Ruben S. Montero almost 4 years ago

Gerben Meijer wrote:

I've reviewed the commits and as far as I can see, the current iteration of this only allows snapshots to be made with the VM powered off?

I think it would be beneficial to include the ability to snapshot without powering off the VM. I am well aware of the implications of snapshotting a disk live outside the OS when there is no way to know if the data is flushed to disk, however there are a few good reasons why this is still something that is good to have:

  • A live disk snapshot in an unknown state is better than no snapshot at all, specifically for cases where a VM cannot be powered off due to customer requirements
  • In most cases a live snapshot of a disk for a VM using a journalled filesystem without a guest agent running is recoverable without issues (provided that there is no write back caching going on in qemu, which may not apply to CEPH but does apply to other potential storage systems that support snapshots)
  • The fsfreeze feature in the guest agent can be leveraged to trigger a freeze in the guest to ensure sync status, then take a snapshot outside of the VM, and finally thaw it after the snapshot action has been taken (see http://wiki.qemu.org/Features/QAPI/GuestAgent for details)

I'm not aware of guest agent support, but that can be implemented as a new feature at a later date - live snapshotting does not explicitly require it and documentation can reflect the risks, with a safe default of not allowing it if so desired.

Hi Gerben Meijer

Yes you are right, this is the initial code to test things, you know ;). Once most of the machinery is in place, we'll add the RUNNING state as possible and test things. For example, we want to stress libvirt when reverting to a snaphost (the original block or file will be replaced by another one and that may not play nicely with qemu/libvirt)...

THANKS FOR YOUR FEEDBACK :)

#5 Updated by Ruben S. Montero almost 4 years ago

Needed modificactions:

Compatibility
- Clone cannot be perform on images with snapshots
- Image with snapshots can be only of OS and DATA type (chtype enforce that)
- Image with snapshots can be only persistent (persistent api enforce that)

Upgrade
- 3 new states for disk-snapshot operations
- New field <TARGET_SNAPSHOT> that marks active snapshot operation (smilar to CLONING_ID)
- New driver operations

- TM: snap_create, snap_delete, snap_revert + update of mvds and rm
- DS: snap_delete, snap_revert, snap_flatten + update of delete

- Migrator to add IMAGE element

API
- disk and image operations. OCA JAVA missing

Sunstone
- Refactor of VM disk tab
- Add snapshot tab for Images

#6 Updated by Ruben S. Montero almost 4 years ago

Updates:

  • level JAVA API with the new one.vm.disksaveas, this replaces the old disk_snapshot api call, and onevm.saveas method
  • Check that JSON classes used by Sunstone are properly updated
  • Sunstone needs to re-work the snapshot/saveas interface
  • Datamodel, removed DISK fields SAVE_AS_SOURCE, SAVE_AS and SAVE_AS_ACTIVE are not in use anymore, code should not check against those.
  • Check EC2 API's
Compatibility
  • Applications using disk_snapshot API call needs to upgrade to the new functionality
  • New API call, with optional snap_id parameter
  • Deferred snapshots are superseded by the new snapshoting functionality
  • CPDS has a new argument, positional parsing of arguments by custom scripts needs to be updated
  • Removed cancelsaveas, not needed anymore
Upgrade guide
  • VMs with snapshot deferred will not perform the saveas operation, needs to be manually triggered, and placeholder images maybe left in locked state (need to remove them) *

#7 Updated by Ruben S. Montero almost 4 years ago

Evaluate migrators for VMs with SAVE_AS=YES (deferred)

#8 Updated by Jaime Melis almost 4 years ago

libvirt/qemu currently does not allow reopening the disk to account for a disk change, which is what's happening in the snapshot-create operation. For the moment we will allow snapshot-create to be triggered in POWEROFF and SUSPENDED states. This will change once libvirt exposes an interface to make this change.

#9 Updated by Stefan Kooman almost 4 years ago

@Jaime Meles libvirt/qemu currently does not allow reopening the disk to account for a disk change, which is what's happening in the snapshot-create operation. For the moment we will allow snapshot-create to be triggered in POWEROFF and SUSPENDED states. This will change once libvirt exposes an interface to make this change.

^^ when snapshots are created using "virsh snapshot-create-as" there is no need to notify libvirt/qemu of a disk change, as this is done automatically (intrinsic action of snapshot-create-as operation").

virsh help snapshot-create-as
NAME
snapshot-create-as - Create a snapshot from a set of args

SYNOPSIS
snapshot-create-as &lt;domain&gt; [--name &lt;string&gt;] [--description &lt;string&gt;] [--print-xml] [--no-metadata] [--halt] [--disk-only] [--reuse-external] [--quiesce] [--atomic] [--live] [--memspec &lt;string&gt;] [[--diskspec] &lt;string&gt;]..

According to this mail thread: https://www.redhat.com/archives/libvirt-users/2013-September/msg00146.html, this feature request: http://tracker.ceph.com/issues/2773 and the above output it should be possible to create a "--disk-only" snapshot on a live running VM. I have tested this on a qcow2 backed VM and this works. Unfortunately I do not (yet) have a CEPH cluster to test against but it's worth a try.

[--diskspec] <string> disk attributes: disk[,snapshot=type][,driver=type][,file=name].

^^ CEPH specific parameters shoud be filled in.

#10 Updated by Ruben S. Montero almost 4 years ago

  • Status changed from Pending to Closed
  • Resolution set to fixed

#11 Updated by Guillaume Michaud over 3 years ago

Hi,

Disk snapshot on a live running VM with Ceph backend does not seems to trigger the guest-fsfreeze-freeze/thaw commands on the guest. Is it supported in one-4.14.2?

Followed this procedure : http://www.sebastien-han.fr/blog/2015/02/09/openstack-perform-consistent-snapshots-with-qemu-guest-agent/

Works well if I trigger the command manually from the host (/tmp/freeze is filled with I'm frozen/I'm thaw). But nothing happen if I snapshot the disk manually from Sunstone.

#12 Updated by Ruben S. Montero over 3 years ago

Hi,

It's been called here

https://github.com/OpenNebula/one/blob/release-4.14.2/src/tm_mad/ceph/snap_create_live#L95

Could it be some problems with libvirtd/qemu version?

Guillaume Michaud wrote:

Hi,

Disk snapshot on a live running VM with Ceph backend does not seems to trigger the guest-fsfreeze-freeze/thaw commands on the guest. Is it supported in one-4.14.2?

Followed this procedure : http://www.sebastien-han.fr/blog/2015/02/09/openstack-perform-consistent-snapshots-with-qemu-guest-agent/

Works well if I trigger the command manually from the host (/tmp/freeze is filled with I'm frozen/I'm thaw). But nothing happen if I snapshot the disk manually from Sunstone.

#13 Updated by Guillaume Michaud over 3 years ago

Hi Ruben,

As I understand, the virsh command is called from the frontend but it is not installed my CentOS 7 frontend. I have to install the libvirt package to get it.
I installed my frontend using the official ONE repo and "yum install opennebula-server opennebula-sunstone" command.

Thanks.

Ruben S. Montero wrote:

Hi,

It's been called here

https://github.com/OpenNebula/one/blob/release-4.14.2/src/tm_mad/ceph/snap_create_live#L95

Could it be some problems with libvirtd/qemu version?

Guillaume Michaud wrote:

Hi,

Disk snapshot on a live running VM with Ceph backend does not seems to trigger the guest-fsfreeze-freeze/thaw commands on the guest. Is it supported in one-4.14.2?

Followed this procedure : http://www.sebastien-han.fr/blog/2015/02/09/openstack-perform-consistent-snapshots-with-qemu-guest-agent/

Works well if I trigger the command manually from the host (/tmp/freeze is filled with I'm frozen/I'm thaw). But nothing happen if I snapshot the disk manually from Sunstone.

#14 Updated by Guillaume Michaud over 3 years ago

Installing libvirt-client on the frontend does not make a difference. So I understand that the virsh command is called directly on the host.

Executing "virsh -c qemu:///system domfsfreeze one-546" on the host trigger the fshook correctly in the guest.

Just want to be sure, I'm talking about disk-snapshoting and not VM-snapshoting. On the Storage tab, I'm using the snapshot option for the vda disk (ID-0).

Thanks.

Also available in: Atom PDF