VM (kvm) save state

sgargel

New Member
Nov 23, 2012
19
0
1
Italy
Hi all! I'm a new happy proxmox user :)

I'm planning to move my 2 VM host running VirtualBox to a proxmox cluster.

I've done some test with 2 host and kvm guest using qcow2 over nfs share and everything is going well. I enjoyed migration and snapshots.

What is missing to me is something like Virtualbox "save machine state".

Save the machine state: With this option, VirtualBox "freezes" the virtual machine by completely saving its state to your local disk.

When you start the VM again later, you will find that the VM continues exactly where it was left off. All your programs will still be open, and your computer resumes operation. Saving the state of a virtual machine is thus in some ways similar to suspending a laptop computer (e.g. by closing its lid).

I think is something like "take a snapshot -> stop the guest -> discard the 'NOW' state".

Could be implemented in the GUI? Can be done by command line?

I think it will be usefull also for saving running VM guests state before proxmox host shutdown.
 
I assume you are looking for KVM live snapshots? available since 2.2.
 
I assume you are looking for KVM live snapshots? available since 2.2.

More or less ... KVM live snapshot is the first part of what i was looking for. And my goal can be reached by doing all stuff by hand in the GUI.

1° take a live snapshot
2° stop the guest
3° remember to start the machine from the snapshot

This could be useful if implemented with a single-magic-button in the gui. I assume that for doing that is necessary to add a new machine state (like "saved") that means "i'm a vm, my status is off, i have a snapshot but not a "now" state, when i will be powered on i have to start from my last snapshot".

I hope I explained in an understandable way... I find it difficult to translate my thoughts into English.
 
...

I hope I explained in an understandable way... I find it difficult to translate my thoughts into English.

Not sure if I got your point. I do not see anything missing in our KVM live snapshots implementation. you can save the current state (running or not) and and you can restore to a running state.
 
Not sure if I got your point. I do not see anything missing in our KVM live snapshots implementation. you can save the current state (running or not) and and you can restore to a running state.

Ok.. sorry again for my late in reply. The point is to have something like virsh save. (even only by cmd-line and not in GUI)

Save a guest

Save the current state of a guest to a file using the virsh command:

# virsh save {domain-name, domain-id or domain-uuid} filename

This stops the guest you specify and saves the data to a file, which may take some time given the amount of memory in use by your guest. You can restore the state of the guest with the restore (Restore a guest) option. Save is similar to pause, instead of just pausing a guest the present state of the guest is saved.

This will be very helpful for managing VMs (regardless of the OS of the guest) while all nodes are being powered down or restarted togheter (like when UPS is going on low battery).
 
Hello,

I think it will be usefull also for saving running VM guests state before proxmox host shutdown.

I'm interest too on saving running VMs guests state before proxmox host shutdown.

Also I'll like to know if there is any saving running VM state or pause option available to apply to VMs to use anytime.

Kind regards.