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

Re: [libvirt] managed save and autoboot



On Tue, May 18, 2010 at 03:15:48PM +0200, Daniel Berteaud wrote:
> Hi everyone.
> 
> I'm trying to auto-suspend my guests when the host shutdown using the
> managedsave function introduced in libvirt 0.8.0.
> 
> If I manually managedsave all my guest, then manually start all of the
> guest with virsh start <guest>, everything works as expected, the saved
> state is restored.
> 
> But there's a problem with the autoboot option:
> 
> - I configure a guest to automatically start on host boot (virsh
> autostart guest)
> 
> - I save this guest (virsh managedsave guest)
> 
> - I restart libvirt to simulate a host reboot
> 
> The guest is started normally, instead of loading the saved state (and
> the saved state is still present
> in /var/lib/libvirt/qemu/save/guest.save, which means next manual boot
> will probably fails)
> 
> So, it looks like there's a difference in the way libvirt starts guests
> between autoboot and a manual virsh start.

Yep, there's a design bug in the way this is implemented in the QEMU driver.
The code that restores the snapshot is in the qemudDomainStart() method,
rather than qemudStartVMDaemon(). This means that when the guest is 
autostarted, the snapshot restore is missed. 


Daniel
-- 
|: Red Hat, Engineering, London    -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.org :|
|: http://autobuild.org        -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|


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