External Snapshots

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

 



I'm still trying to improve my snapshot behavior.  I was reading through the RedHat documentation and found this, "Important Red Hat recommends the use of external snapshots”  Actually external snapshots sound great.  Then on a later page I found this: “However, external snapshots are currently not fully implemented on Red Hat Enterprise Linux 7, and are not available when using virt-manager.”  Hrm.  Well, that’s for RHEL 7 and I’m using RHEL 8.  Maybe it has been fixed?  Apparently no.  When I tried to take the external snapshot it crashed with “libvirt.libvirtError: internal error: unable to execute QEMU command 'cont': Failed to get shared "write" lock.”  It created a new disk.qcow2, but the memory was not saved.  Worse, when I tried to reboot my VM it was locked to the new disk.  I changed it back to my original disk, but it says it can’t get the lock.  Even if it doesn’t work, I didn’t expect taking a snapshot to be destructive!  So, a couple of questions:

 

  1. Is there any way to get external snapshots to work? 
  2. How do I clear the lock on my disk?  There aren’t any VMs alive to be using it, so I just need to clear the lock.

 

Below is what I was trying to do:

 

$ virsh snapshot-create-as centos8_1 externsnap --atomic --diskspec vda,file=$PWD/disk.qcow2,snapshot=external --memspec file=$PWD/mem.qcow2,snapshot=external

error: internal error: unable to execute QEMU command 'cont': Failed to get shared "write" lock

 

$ ls *.qcow2

disk.qcow2

$  #Noite there is no mem.qcow2

 

Then when trying to restart I first had to point virt-manager back to my original VM disk, I got this error about the disk lock:


 Error starting domain: internal error: qemu unexpectedly closed the monitor: 2021-09-13T14:12:42.409301Z qemu-kvm: -blockdev {"node-name":"libvirt-2-format","read-only":false,"driver":"qcow2","file":"libvirt-2-storage","backing":"libvirt-3-format"}: Failed to get "write" lock

Is another process using the image [/home/leek2/qemu/rhel8_1.qcow2]?

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 75, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 111, in tmpcb
    callback(*args, **kwargs)
  File "/usr/share/virt-manager/virtManager/object/libvirtobject.py", line 66, in newfn
    ret = fn(self, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/object/domain.py", line 1280, in startup
    self._backend.create()
  File "/usr/lib64/python3.6/site-packages/libvirt.py", line 1234, in create
    if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self)
libvirt.libvirtError: internal error: qemu unexpectedly closed the monitor: 2021-09-13T14:12:42.409301Z qemu-kvm: -blockdev {"node-name":"libvirt-2-format","read-only":false,"driver":"qcow2","file":"libvirt-2-storage","backing":"libvirt-3-format"}: Failed to get "write" lock
Is another process using the image [/home/leek2/qemu/rhel8_1.qcow2]?


Thanks,

Jim


[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux