Re: automatically reverting to a snapshot

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

 



Please configure your mail client to send plain-text version to mailing
lists ...

On Tue, Jul 25, 2017 at 16:08:58 +0100, Dirty Dan wrote:
> <div dir='auto'>How can I automatically revert to a snapshot after the guest is stopped?<div dir="auto"><br></div><div dir="auto">/etc/libvirt/hooks/qemu
</div><div dir="auto">#!/bin/sh
</div><div dir="auto">name="<span class="money">$1</span>"
</div><div dir="auto">action="<span class="money">$2</span>"
</div><div dir="auto">if [ "$name" = "name" ]; then
</div><div dir="auto">&nbsp;virsh snapshot-revert "$name" --snapshotname "snapshot1"
</div><div dir="auto">fi</div><div dir="auto"><br></div><div dir="auto">I tried this which resulted in a deadlock, then I saw the warning further down the page.</div></div>

The hook documentation explicitly states that no calls to libvirt shoudl
be executed from the hook.

You can start a process in background, which will terminate the hook and
that process should be able to do libvirt calls.

Attachment: signature.asc
Description: Digital signature

_______________________________________________
libvirt-users mailing list
libvirt-users@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvirt-users

[Index of Archives]     [Virt Tools]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux