qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] Re: [PATCH 3/3] savevm: prevent snapshot overwriting and ge


From: Luiz Capitulino
Subject: [Qemu-devel] Re: [PATCH 3/3] savevm: prevent snapshot overwriting and generate a default name
Date: Fri, 30 Jul 2010 10:39:06 -0300

On Wed, 28 Jul 2010 16:30:24 -0300
Miguel Di Ciurcio Filho <address@hidden> wrote:

> This patch address two issues.

Then it should be split in two.

> 
> 1) When savevm is run using an previously saved snapshot id or name, it will
> delete the original and create a new one, using the same id and name and not
> prompting the user of what just happened.
> 
> This behaviour is not good, IMHO.
> 
> We add a '-f' parameter to savevm, to really force that to happen, in case the
> user really wants to.
> 
> New behavior:
> (qemu) savevm snap1
> An snapshot named 'snap1' already exists
> 
> (qemu) savevm -f snap1
> 
> We do better error reporting in case '-f' is used too than before.
> 
> 2) When savevm is run without a name or id, the name stays blank.
> 
> This is a first step to hide the internal id, because I don't see a reason to
> expose this kind of internals to the user.
> 
> The new behavior is when savevm is run without parameters a name will be
> created automaticaly, so the snapshot is accessible to the user without 
> needing
> the id when loadvm is run.
> 
> (qemu) savevm
> (qemu) info snapshots
> ID        TAG                 VM SIZE                DATE       VM CLOCK
> 1         vm-20100728134640      978K 2010-07-28 13:46:40   00:00:08.603
> 
> We use a name with the format 'vm-YYYYMMDDHHMMSS'.
> 
> TODO: I have no clue on how to create a timestamp string when using Windows.

So, what happens on windows?

Also, please, avoid making changes which are unrelated to the patch, like:

>   the_end:
> -    if (saved_vm_running)
> +    if (saved_vm_running) {
>          vm_start();
> +    }
>  }
>  
>  int load_vmstate(const char *name)




reply via email to

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