Commit 13a2e80f04a24b5466ff22328f5374a461181c0a

Authored by bellard
1 parent c88676f8

info about VM snapshots


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2096 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 2 changed files with 70 additions and 5 deletions
Changelog
@@ -2,6 +2,8 @@ version 0.8.3: @@ -2,6 +2,8 @@ version 0.8.3:
2 2
3 - Support for relative paths in backing files for disk images 3 - Support for relative paths in backing files for disk images
4 - Async file I/O API 4 - Async file I/O API
  5 + - New qcow2 disk image format
  6 + - Support of multiple VM snapshots
5 7
6 version 0.8.2: 8 version 0.8.2:
7 9
qemu-doc.texi
@@ -743,6 +743,8 @@ show USB devices plugged on the virtual USB hub @@ -743,6 +743,8 @@ show USB devices plugged on the virtual USB hub
743 show all USB host devices 743 show all USB host devices
744 @item info capture 744 @item info capture
745 show information about active capturing 745 show information about active capturing
  746 +@item info snapshots
  747 +show list of VM snapshots
746 @end table 748 @end table
747 749
748 @item q or quit 750 @item q or quit
@@ -777,11 +779,18 @@ info capture @@ -777,11 +779,18 @@ info capture
777 @item log item1[,...] 779 @item log item1[,...]
778 Activate logging of the specified items to @file{/tmp/qemu.log}. 780 Activate logging of the specified items to @file{/tmp/qemu.log}.
779 781
780 -@item savevm filename  
781 -Save the whole virtual machine state to @var{filename}. 782 +@item savevm [tag|id]
  783 +Create a snapshot of the whole virtual machine. If @var{tag} is
  784 +provided, it is used as human readable identifier. If there is already
  785 +a snapshot with the same tag or ID, it is replaced. More info at
  786 +@ref{vm_snapshots}.
782 787
783 -@item loadvm filename  
784 -Restore the whole virtual machine state from @var{filename}. 788 +@item loadvm tag|id
  789 +Set the whole virtual machine to the snapshot identified by the tag
  790 +@var{tag} or the unique snapshot ID @var{id}.
  791 +
  792 +@item delvm tag|id
  793 +Delete the snapshot identified by @var{tag} or @var{id}.
785 794
786 @item stop 795 @item stop
787 Stop emulation. 796 Stop emulation.
@@ -895,11 +904,14 @@ CPU registers by prefixing them with @emph{$}. @@ -895,11 +904,14 @@ CPU registers by prefixing them with @emph{$}.
895 904
896 Since version 0.6.1, QEMU supports many disk image formats, including 905 Since version 0.6.1, QEMU supports many disk image formats, including
897 growable disk images (their size increase as non empty sectors are 906 growable disk images (their size increase as non empty sectors are
898 -written), compressed and encrypted disk images. 907 +written), compressed and encrypted disk images. Version 0.8.3 added
  908 +the new qcow2 disk image format which is essential to support VM
  909 +snapshots.
899 910
900 @menu 911 @menu
901 * disk_images_quickstart:: Quick start for disk image creation 912 * disk_images_quickstart:: Quick start for disk image creation
902 * disk_images_snapshot_mode:: Snapshot mode 913 * disk_images_snapshot_mode:: Snapshot mode
  914 +* vm_snapshots:: VM snapshots
903 * qemu_img_invocation:: qemu-img Invocation 915 * qemu_img_invocation:: qemu-img Invocation
904 * disk_images_fat_images:: Virtual FAT disk images 916 * disk_images_fat_images:: Virtual FAT disk images
905 @end menu 917 @end menu
@@ -926,6 +938,57 @@ a temporary file created in @file{/tmp}. You can however force the @@ -926,6 +938,57 @@ a temporary file created in @file{/tmp}. You can however force the
926 write back to the raw disk images by using the @code{commit} monitor 938 write back to the raw disk images by using the @code{commit} monitor
927 command (or @key{C-a s} in the serial console). 939 command (or @key{C-a s} in the serial console).
928 940
  941 +@node vm_snapshots
  942 +@subsection VM snapshots
  943 +
  944 +VM snapshots are snapshots of the complete virtual machine including
  945 +CPU state, RAM, device state and the content of all the writable
  946 +disks. In order to use VM snapshots, you must have at least one non
  947 +removable and writable block device using the @code{qcow2} disk image
  948 +format. Normally this device is the first virtual hard drive.
  949 +
  950 +Use the monitor command @code{savevm} to create a new VM snapshot or
  951 +replace an existing one. A human readable name can be assigned to each
  952 +snapshots in addition to its numerical ID.
  953 +
  954 +Use @code{loadvm} to restore a VM snapshot and @code{delvm} to remove
  955 +a VM snapshot. @code{info snapshots} lists the available snapshots
  956 +with their associated information:
  957 +
  958 +@example
  959 +(qemu) info snapshots
  960 +Snapshot devices: hda
  961 +Snapshot list (from hda):
  962 +ID TAG VM SIZE DATE VM CLOCK
  963 +1 start 41M 2006-08-06 12:38:02 00:00:14.954
  964 +2 40M 2006-08-06 12:43:29 00:00:18.633
  965 +3 msys 40M 2006-08-06 12:44:04 00:00:23.514
  966 +@end example
  967 +
  968 +A VM snapshot is made of a VM state info (its size is shown in
  969 +@code{info snapshots}) and a snapshot of every writable disk image.
  970 +The VM state info is stored in the first @code{qcow2} non removable
  971 +and writable block device. The disk image snapshots are stored in
  972 +every disk image. The size of a snapshot in a disk image is difficult
  973 +to evaluate and is not shown by @code{info snapshots} because the
  974 +associated disk sectors are shared among all the snapshots to save
  975 +disk space (otherwise each snapshot would have to copy the full disk
  976 +images).
  977 +
  978 +When using the (unrelated) @code{-snapshot} option
  979 +(@ref{disk_images_snapshot_mode}), you can always make VM snapshots,
  980 +but they are deleted as soon as you exit QEMU.
  981 +
  982 +VM snapshots currently have the following known limitations:
  983 +@itemize
  984 +@item
  985 +They cannot cope with removable devices if they are removed or
  986 +inserted after a snapshot is done.
  987 +@item
  988 +A few device drivers still have incomplete snapshot support so their
  989 +state is not saved or restored properly (in particular USB).
  990 +@end itemize
  991 +
929 @node qemu_img_invocation 992 @node qemu_img_invocation
930 @subsection @code{qemu-img} Invocation 993 @subsection @code{qemu-img} Invocation
931 994