[virt-tools-list] Virt-Manager: error creating snapshot

Netcrave Communications paigeadele at gmail.com
Sat Sep 15 09:15:55 UTC 2018


I am plagued with this problem as well however I recalled that qcow2 itself
supports snapshots independently of libvirt. Also I decided to check in
virsh to see if maybe there was an option that would allow me to exlcude
the pflash from the snapshot. I didn't find an exclusion option but I did
find this which works with my EFI Win2k16 DC VM:

snapshot-create-as --domain Win2k16Edge --name EdgeServerBackup --disk-only

The description of the option doesn't seem to imply that it isn't creating
a snapshot of the VM:
    --disk-only      capture disk state but not vm state

Just that it's not dumping the memory; so I'm not really sure why this
works, but it does:

virsh # snapshot-list Win2k16DomainController
 Name                 Creation Time             State
 DomainControllerBackup 2018-09-15 01:33:56 -0700 disk-snapshot

virsh #

And I can see that it has indeed created a snapshot
➜  RAID5_BACKED_DISKS_001 ls -lah Win2k16DomainController.*
-rw------- 1 qemu qemu 20M Sep 15 02:01
-rw------- 1 qemu qemu 34G Sep 15 01:33 Win2k16DomainController.qcow2

However when I try to list snapshots linked to the image it doesn't show
up. But the snapshot file it created is growing in size as new data is
written to the disk. So I'll have to investigate this a little more and
figure out why they're not linked:
➜  RAID5_BACKED_DISKS_001 qemu-img snapshot -l Win2k16DomainController.qcow2

Some thoughts on how to improve snapshots to support this:

The pflash nvram would be nice to have a snapshot of though since it has
bios specific settings (none of which are currently customized but it's
still a nice-to-have.)  I think it would be nice in any case to have an
attribute to for disks (in qemu/libvirt) to exclude disks from snapshots,
including the pflash since the disk image type is not currently
snapshot-able. The only problems I can think of with this is

1. Convincing somebody to accept a patch
2. Disks and pflash based firmware are different XML node types, so it's
likely the exclusion option would have to be implemented in whatever loader
 <loader readonly='yes'
 <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='unsafe' iothread='1'/>
      <source file='/home/RAID5_BACKED_DISKS_001/Win2k16Workstation.qcow2'/>
      <target dev='vda' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x0b'

Also something else that I'm thinking about now is that the readonly='yes'
flag was set by default for these. That seems to imply it would never
change anyway, so if it could be excluded from the snapshot it would make
sense for it to anyway in this case.

Also IIRC, somebody somewhere mentioned using qcow2 as the image format for
pflash, which would make disk snapshots for this possible, or making
<loader type="qcow2" work. Actually that may already work, but I'll have to

Here's a copy of the domxml for the VM for reference:

Hope that helps somebody,


On Tue, Sep 5, 2017 at 1:35 AM Pavel Hrdina <phrdina at redhat.com> wrote:

> On Mon, Sep 04, 2017 at 08:30:23AM -0700, ovirt at fateknollogee.com wrote:
> > o/s: Fedora 26 + Virt-Manager v1.42
> > vm: Win 10 UEFI + Q35
> >
> > Error creating snapshot: Operation not supported:
> > Internal snapshots of a VM with pflash based firmware are not supported.
> >
> > Is there a fix?
> Hi, unfortunately no, and it will probably take some time to support
> snapshots for guests with UEFI.
> The issue is that internal snapshots are obsolete and misses a lot of
> features that external snapshots have.  They are basically usable only
> for guests with only one disk, where everything including the guest
> state is stored in one file.
> In order to get this fixed and to get snapshots for guests with UEFI
> virt-manager will have to switch to use external snapshots, there is
> already a BUG for it [1].  However, it cannot be currently done because
> libvirt still lacks some mandatory features for external snapshots, for
> example you cannot revert to external snapshot which makes them
> unusable.  There is also a BUG for libvirt to implement this [2].
> Pavel
> [1] <https://bugzilla.redhat.com/show_bug.cgi?id=1403951>
> [2] <https://bugzilla.redhat.com/show_bug.cgi?id=1402581>
> _______________________________________________
> virt-tools-list mailing list
> virt-tools-list at redhat.com
> https://www.redhat.com/mailman/listinfo/virt-tools-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/virt-tools-list/attachments/20180915/9c9f0ee6/attachment.htm>

More information about the virt-tools-list mailing list