[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-discuss] Qemu snapshot mode

From: Angus Gardner
Subject: Re: [Qemu-discuss] Qemu snapshot mode
Date: Mon, 10 Sep 2012 11:39:55 +1000

I have been looking into snapshot mode as part of another project.

When using snapshot mode Qemu creates a temporary file in /tmp/ which is
then opened, deleted but still used by qemu until you shut down your VM.

(Under Linux/Unix you can delete an open file, and the program which has the
file open can still use the file as normal.  The deletion will just remove
it from the file system, but not the disk.  When the program closes the file
it is then deleted from disk.)

While this sounds odd, it makes sense in that the temp file will not (can
not) be altered or removed while qemu is trying to use it, which would cause
mayhem to the VM.
This also means that if you write a lot of data to the disk during this time
it will be written to the deleted file in /tmp/ you see less free space on
the disk shrink but no increase in file sizes.

After reading several rants about this on the interwebs I am working on a
patch which will eventually allow a configurable file to be used  for the
snapshot storage and not deleted at the end of the instance.  But don't hold
your breath.


-----Original Message-----
From: address@hidden
[mailto:address@hidden On Behalf Of
Dunrong Huang
Sent: Thursday, September 06, 2012 8:01 PM
To: xuanmao_001
Cc: qemu-discuss
Subject: Re: [Qemu-discuss] Qemu snapshot mode

2012/9/6 xuanmao_001 <address@hidden>:
> Hi, all,
> When I start VM with snapshot mode(--snapshot). I do some 
> operations,like copy, delete files. I must shutdown VM, the disk state can
> so I want to know if the snapshot mode can revert when I reboot VM.
No, it cant.
Actually, when you start QEMU with -snapshot, a temporary snapshot file
which is not visible to the user will be created in /tmp, the file will
exist util QEMU exit.
So even if you reboot VM, QEMU is still running and the temporary snapshot
also exists.
This make you failed to convert VM after reboot.
> Thanks.
> ________________________________
> xuanmao_001

Best Regards,

Dunrong Huang

reply via email to

[Prev in Thread] Current Thread [Next in Thread]