Discussion:
Best practicies to create full snapshots (block devices + RAM) with cloudstack
Vladislav Nazarenko
2015-04-13 16:34:42 UTC
Permalink
Hi Folks,

I'm searching for a solution to create full VM snapshots with
cloudstack. We are going to run cloustack with KVM, libvitrt supports
such snapshots (external snapshot).

But I'm not sure if cloudstack supports it also ...

So, what's the best aproach to create snapshots?

Thanx in advance
Vlad
Jeff Moody
2015-04-13 17:32:38 UTC
Permalink
At the moment (to my knowledge - someone better informed can correct
me if this is no longer the case) ACS doesn't support live snapshots
of running KVM instances.
This is due to some incompatibilites introduced to libvirtd to limit
some functionality to be available only to Red Hat Enterprise
Virtualization, from my recollection. Either that or it was an issue
where the mechanism libvirtd was using to copy the QCOW2 file was
introducing corruption in the copy.
That being said, there is a Global Setting (kvm.snapshot.enabled which
defaults to false) that you can flip to try running live snapshots of
KVM volumes.
In order to take a snapshot of a KVM instance, the recommended method
(last I heard) was to stop the instance and then snapshot volumes.

Sub-optimal, sure, but it guarantees that the QCOW2 copy is good.

If you're looking for live snapshots, XenServer has the best support
in ACS for these (VMware works well, but last testing I did of VMware
on the 4.2 branch had snapshots as full OVA exports of the VM/volume
where XenServer will do differential snapshots) and I don't believe
that full VM snapshots are supported at the moment, but I have seen
mails floating around on the dev- list regarding getting at least
XenServer support for full VM snapshots in soon. I also believe that
full-VM snapshots on VMware are in the works, but no support for this
functionality on KVM right now.
Post by Vladislav Nazarenko
Hi Folks,
I'm searching for a solution to create full VM snapshots with
cloudstack. We are going to run cloustack with KVM, libvitrt
supports
such snapshots (external snapshot).
But I'm not sure if cloudstack supports it also ...
So, what's the best aproach to create snapshots?
Thanx in advance
Vlad
Nux!
2015-04-13 18:00:36 UTC
Permalink
Hello Vlad,

Cloudstack does not support KVM's live snapshot feature due to some historic as well as current problems.
However, if you enable kvm.snapshot.enabled flag in Global Settings, you should be able to snapshot ROOT and DATA volumes; this will enable you to take "crash consistent backups" of them and keep them in the Secondary Storage.

HTH
Lucian

--
Sent from the Delta quadrant using Borg technology!

Nux!
www.nux.ro

----- Original Message -----
Sent: Monday, 13 April, 2015 17:34:42
Subject: Best practicies to create full snapshots (block devices + RAM) with cloudstack
Hi Folks,
I'm searching for a solution to create full VM snapshots with
cloudstack. We are going to run cloustack with KVM, libvitrt supports
such snapshots (external snapshot).
But I'm not sure if cloudstack supports it also ...
So, what's the best aproach to create snapshots?
Thanx in advance
Vlad
Vladislav Nazarenko
2015-04-14 17:24:33 UTC
Permalink
Guys, Jeff, Lucian,

thanx a lot ... really appreciate your help!


kvm.snapshot.enabled -> true does not help. Gettting the following error

VM snapshot is not enabled for hypervisor type: KVM



One more question...

I tried to create a live snapshot with virsh command, but I did not
manage it


My attempts:

virsh snapshot-create-as i-2-18-VM i-2-18-VM-snap05 --diskspec
vda,file=/mnt/1b961429-c27f-3aa1-81be-cbdcca4e191a/snap05
error: unsupported configuration: disk 'vda' must use snapshot mode
'internal'

virsh snapshot-create-as i-2-18-VM i-2-18-VM-snap05 --diskspec
vda,file=/mnt/1b961429-c27f-3aa1-81be-cbdcca4e191a/snap05 --live
error: Operation not supported: live snapshot creation is supported only
with external checkpoints

Looks like I'm not able to create a live snapshot on this system?


virsh --version
0.10.2

yum info cloudstack-common
Name : cloudstack-common
Arch : x86_64
Version : 4.4.1
Release : NONOSS_3.el6
Size : 97 M
Repo : installed
From repo : cloudstack
Summary : Apache CloudStack common files and scripts
License : ASL 2.0
Description : The Apache CloudStack files shared between agent and
management server


Kind regards
Vlad
Post by Nux!
Hello Vlad,
Cloudstack does not support KVM's live snapshot feature due to some historic as well as current problems.
However, if you enable kvm.snapshot.enabled flag in Global Settings, you should be able to snapshot ROOT and DATA volumes; this will enable you to take "crash consistent backups" of them and keep them in the Secondary Storage.
HTH
Lucian
--
Sent from the Delta quadrant using Borg technology!
Nux!
www.nux.ro
----- Original Message -----
Sent: Monday, 13 April, 2015 17:34:42
Subject: Best practicies to create full snapshots (block devices + RAM) with cloudstack
Hi Folks,
I'm searching for a solution to create full VM snapshots with
cloudstack. We are going to run cloustack with KVM, libvitrt supports
such snapshots (external snapshot).
But I'm not sure if cloudstack supports it also ...
So, what's the best aproach to create snapshots?
Thanx in advance
Vlad
Jeff Moody
2015-04-14 17:34:39 UTC
Permalink
After enabling the option, did you restart your cloudstack-management daemon?

I'm not familiar with the exact semantics of the virsh command, but I
would try restarting the ACS management server process first (or even
the whole management server if you felt so inclined) and see if you
can create snapshots through ACS.

If you still get the message of the VM snapshot not being enabled
after restarting the management server, then that's a bug and you
should probably post some specific details on versions of things (ACS,
KVM server OS, libvirtd) and possibly your logfiles for further
analysis as to why the setting isn't being respected.
Post by Vladislav Nazarenko
Guys, Jeff, Lucian,
thanx a lot ... really appreciate your help!
kvm.snapshot.enabled -> true does not help. Gettting the following error
VM snapshot is not enabled for hypervisor type: KVM
One more question...
I tried to create a live snapshot with virsh command, but I did not
manage it
virsh snapshot-create-as i-2-18-VM i-2-18-VM-snap05 --diskspec
vda,file=/mnt/1b961429-c27f-3aa1-81be-cbdcca4e191a/snap05
error: unsupported configuration: disk 'vda' must use snapshot mode
'internal'
virsh snapshot-create-as i-2-18-VM i-2-18-VM-snap05 --diskspec
vda,file=/mnt/1b961429-c27f-3aa1-81be-cbdcca4e191a/snap05 --live
error: Operation not supported: live snapshot creation is supported only
with external checkpoints
Looks like I'm not able to create a live snapshot on this system?
virsh --version
0.10.2
yum info cloudstack-common
Name : cloudstack-common
Arch : x86_64
Version : 4.4.1
Release : NONOSS_3.el6
Size : 97 M
Repo : installed
From repo : cloudstack
Summary : Apache CloudStack common files and scripts
License : ASL 2.0
Description : The Apache CloudStack files shared between agent and
management server
Kind regards
Vlad
Post by Nux!
Hello Vlad,
Cloudstack does not support KVM's live snapshot feature due to
some historic as well as current problems.
However, if you enable kvm.snapshot.enabled flag in Global
Settings, you should be able to snapshot ROOT and DATA volumes;
this will enable you to take "crash consistent backups" of them
and keep them in the Secondary Storage.
HTH
Lucian
--
Sent from the Delta quadrant using Borg technology!
Nux!
www.nux.ro
----- Original Message -----
Sent: Monday, 13 April, 2015 17:34:42
Subject: Best practicies to create full snapshots (block devices
+ RAM) with cloudstack
Hi Folks,
I'm searching for a solution to create full VM snapshots with
cloudstack. We are going to run cloustack with KVM, libvitrt supports
such snapshots (external snapshot).
But I'm not sure if cloudstack supports it also ...
So, what's the best aproach to create snapshots?
Thanx in advance
Vlad
Loading...