OpenVZ allows you to suspend a running virtual machine or container on the physical server by saving its current state to a special file. Later on, you can resume the virtual machine or container and get it in the same state the virtual machine or container was at the time of its suspending. Suspending your virtual machines and containers may prove useful, for example, if you need to restart the physical server, but do not want to:
- quit the applications currently running in the virtual machine or container
- spend much time on shutting down the guest operating system and then starting it again
You can use the prlctl suspend
command to save the current state of a virtual machine or container . For example, you can issue the following command to suspend the container MyCT
:
# prlctl suspend MyCT
At any time, you can resume the container MyCT
by executing the following command:
# prlctl resume MyCT
Once the restoration process is complete, any applications that were running in the container MyCT
at the time of its suspending will be running again and the information content will be the same as it was when the container was suspended.