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

Re: [libvirt] Using Restore in another host.



On Sun, Apr 03, 2011 at 10:43:45AM +0200, Marcela Castro León wrote:
> Hello:
> I need to know if I can use the restore operation (virsh o the equivalent in
> libvirt) to recover a previous state of a guest, but recovered previously in
> another host.
> I did a test, but I got an error:
> 
> The exactly sequence using virsh I testes is:
> On [HOST SOURCE]: Using virsh
> 1) save [domain] [file]
> 2) restore file
> 3) destroy [domain]
> 
> On [HOST SOURCE] using ubuntu sh
> 4) cp [guest.img] [guest.xml] [file] to HOST2
> 
> On [HOST TARGET] using virsh
> 5) define [guest.xml] (using image on destination in HOST2)
> 6) restore [file]

As a general rule you should only ever 'restore' from a
file *once*. This is because after the first restore
operation, the guest may have made writes to its disk.
Restoring a second time the guest OS will likely have
an inconsistent view of the disk & will cause filesystem
corruption.

If you want to be able to restore from a saved image
multiple times, you need to also take a snapshot of
the disk image at the same time, and restore that
snapshot when restoring the memory image.


That aside, saving on one host & restoring on a
different host is fine. So if you leave out steps
2+3 in your example above, then your data would
still be safe.

> The restore troughs the following message:
> *virsh # restore sv-chubut-2011-04-01-09:58
> error: Failed to restore domain from sv-chubut-2011-04-01-09:58
> error: monitor socket did not show up.: Connection refused*

There is probably some configuration difference on your 2nd host
that prevented the VM from starting up. If you're lucky the file
/var/log/libvirt/qemu/$NAME.log will tell you more

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|


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