# Create a snapshot **What are snapshots?** Snapshots are *images that refer to an original image using Redirect-on-Write to avoid changing the original image.* **How do you create a snapshot?** To create a snapshot, *run:* ```bash $ qemu-img create -f qcow2 -b <base image> -F qcow2 <snapshot image> ``` **What happens if any changes are made to the backing image of a snapshot image?** If any changes are made to the backing image of a snapshot image, *the snapshot image will be corrupted.* # Returning to a previous version **Can a snapshot image be returned to its original state once modified?** *No*, a snapshot image can't be returned to its original state once modified. # Modifying the backing file **How do you find what the backing image is of a snapshot image?** To find the backing image of a snapshot image, *run:* ```bash $ qemu-img info <snapshot image> ``` # Temporary snapshots **What flag can you add when running a QEMU virtual machine to stop changes from being made to the disk image?** To stop changes from being made to a disk image when running a QEMU virtual machine, you can add *the `-snapshot` flag.* > [!example] Example of running a QEMU virtual machine as a temporary snapshot > ```bash > $ qemu -hda centos-cleaninstall.img -snapshot > ```