Re: [libvirt] vbox save/restore

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

 



On Mon, Aug 10, 2009 at 10:04 AM, Pritesh
Kothari<Pritesh.Kothari@xxxxxxx> wrote:
> so until there is a fully developed API which can cleanly save the snapshot to
> a file at given location, i guess the above method is likely to be near to what
> is expected of virDomainSave().

I see that TakeSnapshot receives a name, not a path as virDomainSave desires.
As of now, the virDomainSave implementation in vbox does not follow to
heart it's description: it ignores the filename completely.

I was thinking of two implementations:

1. only allow simple names (e.g. no path separators) as a parameter
for vbox virDomainSave.
Pass that name to IConsole::takeSnapshot() and let vbox take care of
everything needed.
You can then use the name to enable virDomainRestore() -- which
currently is not implemented.

2. parse the filename given to virDomainSave and split it into dir+fname.
Change the snapshot folder of the vm
IMachine::COMSETTER(SnapshotFolder) to `dir' and take a snapshot with
the name=`fname'.
This means that for each snapshot we have to change the snapshot
folder. I'm not sure whether this works properly or not.
At restore time we do the same things: split the param to
virDomainRestore() into dir+fname, change the snapshot folder to `dir'
and restore the `fname' snapshot.


I'm not sure it the second is implementable: from what I tested, to
change the snapshot folder you need to modify the vm (vboxmanage
modifyvm $VMNAME --snapshotfolder $SNAPDIR) and that means that you
have to shut it down, which breaks the semantics of virDomainSave().


If 2. is not implementable, I think the first solution is better that
what we currently have, because it allows the user to use the vm and
restore it to a known previous state, which cannot currently be done.

-- 
 .
..: Lucian

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]