managedsave
Saves the system image of a running or a paused virtual server and terminates it thereafter. When the virtual server is started again, the saved system image is resumed.
Per default, the virtual server is in the same state as it was when it was terminated.
Use the dominfo command to see whether the system image of a shut off virtual server was saved.
Syntax
- <VS>
- Is the name, ID, or UUID of the virtual server.
Selected options
- --bypass-cache
- Writes virtual server data directly to the disk bypassing the file system cache. This sacrifices write speed for data integrity by getting the data written to the disk faster.
- --running
- When you restart the virtual server, it will be running.
- --paused
- When you restart the virtual server, it will be paused.
- --verbose
- Displays the progress of the save operation.
Virtual server state transitions
| Command option | From state | To state (reason) |
|---|---|---|
| managedsave | running | shut off (saved from running) |
| managedsave | paused | shut off (saved from paused) |
| managedsave --running | running | shut off (saved from running) |
| managedsave --running | paused | shut off (saved from running) |
| managedsave --paused | running | shut off (saved from paused) |
| managedsave --paused | paused | shut off (saved from paused) |
Usage
Example
# virsh managedsave vserv1 --running Domain vserv1 state saved by libvirt # virsh dominfo vserv1 Id: - Name: vserv1331 UUID: d30a4c80-2670-543e-e73f-30c1fa7c9c20 OS Type: hvm State: shut off CPU(s): 2 Max memory: 1048576 KiB Used memory: 1048576 KiB Persistent: yes Autostart: disable Managed save: yes Security model: none Security DOI: 0 # virsh start vserv1 Domain vserv1 started # virsh list Id Name State ---------------------------------------------------- 13 vserv1 running
# virsh managedsave vserv1 --paused --verbose Managedsave: [100 %] Domain vserv1 state saved by libvirt # virsh domstate vserv1 shut off # virsh start vserv1 Domain vserv1 started # virsh list Id Name State ---------------------------------------------------- 13 vserv1 paused