Suspend / Resume KVM & OpenVZ (10 months later)

emanuelebruno

Renowned Member
May 1, 2012
143
7
83
Catania
emanuelebruno.it
In my previous post (http://forum.proxmox.com/threads/17196-Suspend-Resume-KVM-amp-OpenVZ) I asked for the implementation of hibernation of the virtual machines *BEFORE* backup procedure; this feature is available in every virtualization software in the market but not in proxmox.
For this reason my web server needs to stay down for 3 hours until a complete backup is finished (I have scheduled to stop OPENVZ container of this machine before backup).

Is it so difficult to make available to proxmox of the *SUSPEND* feature in OPENVZ and in KVM?

thanks for your patience
best regards
E.Bruno
 
Hi Bruno,

just a short question as I don't really understand the problem:
you want to hibernate a kvm/openvz and resume it afterwards? Why is this required and what are the issues with the backup you mentioned?

Regards
 
the hibernation process and then freezing the state of the ram allow to restore a previous state of the virtual machine in a consistent manner. Otherwise, the database processes, the logs files, and any other pending processes could be compromised, and the problem can occur equally in both OpenVZ that in KVM (for this reason I shutdown the virtual machine before backup).

Already 10 months was possible to have this feature but Proxmox not supported due to lack of API.
 
seems you missed backup KVM in stop mode.?

you will have just a few seconds downtime. the downtime just depends on the time needed for a clean shutdown and clean start. in ANY case, its never 3 hours but you get a clean backup.

just to mention, not ANY of our competitors have such a cool feature - working with ANY storage, including distributed storage like Ceph.
 
Sorry, in which way this answer can help me?

I have 2 webserver (that include email and dns server), every week I need to backup them; the first one needs 1 hour for a complete backup and the second 3 hours... they are openvz container. I have scheduled the backup procedure and choosen the "stop" option (following the support that I received in this forum).
10 months ago I asked the reason for the lack of the "suspend feature with the hibernation of the state of ram that it is supported in kvm and in openvz" and the answer was the lack of API support...
it is growing the webserver occupied space and the time for backup is taking more and more... I hoped that in the mean time this problem would be resolved...
In vmware I can do a snapshot of a virtual machine and immediately after I can do a backup: in this way the server becomes unreacheable for not more than 10 seconds; more over it doesn't need to stop noone process of the server because there is not a shutdown and startup of the virtualmachine.

Downtime and backup are very important but in particular they are the base of a good infrastructure.
 
Sorry, in which way this answer can help me?...

you also mentioned KVM backup, so I thought you are interested in a way to backup KVM VM in a fully clean state with just few seconds downtime.
 
citing the wiki,
<<stop (KVM): Shutdown the VM to get a consistent state, Then start KVM live backup and restart the VM (short downtime).>>
but also
<<stop (OpenVZ): Stop the VM/CT during backup (very long downtime)>>

I guess the OP needs openvz fast stop-like backup, too. ?

I don't know if he could schedule (cron) a job to hybernate a vm from remote just berfore pve backup, and then wake up the vm ... ?

Marco
 
I understand you want a feature that does not exist, I can't really help you with that but I can describe how I deal with this same concern.

Within the VM I use the database native backup method to create "transaction logs"
Mysql has Binary logs, Postgresql has WAL files, MSSQL has Transaction Logs.

With proper backup methods you can restore the DB to any particular point in time using these backups.
This is much more useful than a daily VM backup.

The VM backup simply provides your DB server with all the proper software and configurations.
Rely on the native DB backup method to ensure your DB data remains safe.
Once you do this it does not matter if you have a "clean" backup because the DB is backed up and safe.
99.9% of the time the DB files in the VM will be just fine from an unclean shutdown anyway.

In addition to creating the transaction logs I also ship them to other server(s) the moment they are created.
On some servers I even auto-restore the logs on the remote server so I have a DB server ready to replace the master at all times, also very useful for read-only DB copies!

The most important thing with any backup is to test them!
Test the DB backups, test the VM backups, test all backups.
The worst time to discover that your backup method is broken/flawed is when you need to restore data.

For whatever its worth, I have around 150VMs, each backed up 3x a week using snapshot method.
We restore the latest backup of every VM every 3 months.
I had one restore that failed, years ago.
Not a single one had unrepairable file-system corruption or corrupted databases.
 
Sorry, but I still do not understand

if you take a look at this link https://openvz.org/Man/vzctl.8#Snapshotting , you will discover that snapshot feature supports the features that I'm asking for; I'm simply asking to próxmox staff, please, to implement the "saving the current container state, including its file system state, running processes state, and configuration file" ...

There is another interesting article that talks about snapshots and ploop http://openvz.livejournal.com/44508.html ... I understand that adding meat to the fire does not help at this time, but I'd like , even if this is just my impression, to see that the Proxmox staff would be mattered to OpenVZ as much as KVM.

Thank you for your attention
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!