i run several vms on KVM/ubuntu, which all get starteted wirth the -snapshot parameter (the vms only compute several stuff which can be destroyed after reboot).

out of the docs i read, the changes are not written back to the image, but stored in temp-files and these are deleted after shutdown.

now, i wonder where on the filesystem these "temp-files" are stored?

thx

berni

link|improve this question

feedback

3 Answers

up vote 2 down vote accepted

Try use lsof to find snapshot storage:

# ps aux | grep kvm
$PID ?        Sl   5289:40 /usr/bin/kvm ...
# lsof -n -p $PID
COMMAND   PID USER   FD   TYPE   DEVICE        SIZE     NODE NAME

or one command:

# lsof -n -p $(ps ax | grep [k]vm | awk '{print $1}' | head -1)
link|improve this answer
feedback

The snapshots are stored wherever you configure them to be. on my F14 it's in /var/lib/libvirt/images, but you can play with storage domains in virt-manager or virsh, however you like

link|improve this answer
it is not about snapshots taken by hand, to store the actual state of the vm, its about where the temp-files are stored by kvm when starting with the -snapshot parameter – bmaeser Feb 23 '11 at 16:25
and that is what my answer refers to exactly – dyasny Feb 23 '11 at 17:25
feedback

Since I was examing the same and couldn't find them anywhere on the harddrive I would assume they stay in memory? That would also explain, why they aren't persistent.

If you want to write them to disk, use the save/restore commands. Here you can provide a path.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.