Re: Restoring a QEMU snapshot

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

 





On Tue, Mar 28, 2017 at 8:13 AM, Robert Nichols <rnicholsNOSPAM@xxxxxxxxxxx> wrote:
On 03/27/2017 12:31 PM, Patrick O'Callaghan wrote:
I have a QEMU image snapshot:

$ sudo qemu-img info /var/lib/libvirt/images/Windows10.qcow2
image: /var/lib/libvirt/images/Windows10.qcow2
file format: qcow2
virtual size: 20G (21474836480 bytes)
disk size: 196K
cluster_size: 65536
backing file: /home/poc/Win10/win10.qcow2
backing file format: qcow2
Format specific information:
    compat: 1.1
    lazy refcounts: true
    refcount bits: 16
    corrupt: false

However when I try to restore the virtual disk I get:

$ sudo qemu-img snapshot -a /var/lib/libvirt/images/Windows10.qcow2 /home/poc/Win10/win10.qcow2
qemu-img: Could not apply snapshot '/var/lib/libvirt/images/Windows10.qcow2': -2 (No such file or directory)

I must be doing something obviously wrong, but can't see what it is.
Hints would be appreciated.

What you have is not a snapshot.  A snapshot is created with "qemu-img snapshot -c <snapshot-name> <imagename>", and that is _not_ a separate file.  That "<snapshot-name>" is not a file name but just a tag to identify one of possibly several snapshots within that "<imagename>" file.

What you made was a copy-on-write image using /home/poc/Win10/win10.qcow2 as a backing file.  You can make changes in /var/lib/libvirt/images/Windows10.qcow2 and not affect the backing file, but the backing file _must_not_be_changed_ during the lifetime of that dependent image.  That c-o-w image cannot be restored to its original state.  The way you do that is to throw it away and create a new one with the same backing file.

--
Bob Nichols     "NOSPAM" is really part of my email address.
                Do NOT delete it.

_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@lists.fedoraproject.org


Ahh interesting. Thanks for this info Patrick.
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux