Jon Schipp
2015-Jan-06 21:03 UTC
[libvirt-users] ubuntu virsh snapshot-create-as gives Error -22 while writing VM
Hello all, I'm trying to create an online internal snapshot to work with Cuckoo Sandbox. I keep receiving this -22 error below on my Ubuntu system and I'm out of ideas, been at it for a while so any help is appreciated. root@cuckoo-sec:~# virsh snapshot-create-as cuckoo cuckoo-snap1 "Cuckoo Snapshot" error: operation failed: Error -22 while writing VM $ uname -a Linux cuckoo-sec 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux $ cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=14.04 DISTRIB_CODENAME=trusty DISTRIB_DESCRIPTION="Ubuntu 14.04 LTS" $ kvm --version QEMU emulator version 2.0.0 (Debian 2.0.0+dfsg-2ubuntu1.9), Copyright (c) 2003-2008 Fabrice Bellard $ libvirtd --version libvirtd (libvirt) 1.2.2 $ qemu-img info /opt/kvm/Windows7-64.qcow2 image: /opt/kvm/Windows7-64.qcow2 file format: qcow2 virtual size: 25G (26843545600 bytes) disk size: 12G cluster_size: 65536 Format specific information: compat: 1.1 lazy refcounts: false $ virsh list Id Name State ---------------------------------------------------- 17 cuckoo running $ apt-get install apparmor-utils $ aa-status $ aa-complain /usr/sbin/libvirtd $ aa-complain /etc/apparmor.d/libvirt/libvirt-bdfcd0d8-b032-6870- 79bf-c77e0a3c8590 $ strace virsh snapshot-create-as cuckoo cuckoo-snap1 "Cuckoo Snapshot" ... gettid() = 10168 futex(0x7f4726ab8240, FUTEX_WAKE_PRIVATE, 1) = 0 futex(0x7f4726ab8240, FUTEX_WAIT_PRIVATE, 2, NULL) = -1 EAGAIN (Resource temporarily unavailable) futex(0x7f4726ab8240, FUTEX_WAKE_PRIVATE, 1) = 0 gettid() = 10168 Thanks -- Jon Schipp, jonschipp.com, sickbits.net, opennsm.ncsa.illinois.edu
Eric Blake
2015-Jan-06 21:27 UTC
Re: [libvirt-users] ubuntu virsh snapshot-create-as gives Error -22 while writing VM
On 01/06/2015 02:03 PM, Jon Schipp wrote:> Hello all, I'm trying to create an online internal snapshot to work with > Cuckoo Sandbox. > I keep receiving this -22 error below on my Ubuntu system and I'm out of > ideas, been at it for a while so any help is appreciated. > > root@cuckoo-sec:~# virsh snapshot-create-as cuckoo cuckoo-snap1 "Cuckoo > Snapshot" > error: operation failed: Error -22 while writing VMThat message comes from qemu (file a bug report with them for poor-quality error message; looks like someone forgot to convert a negative value back into a positive EINVAL errno value). As for why qemu is seeing an EINVAL, I have to wonder if it is a case of AppArmor blocking access to a file. But that's weird, as internal snapshots don't normally need to open any additional files. At any rate, it's more likely to be a qemu bug than a libvirt one. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Jon Schipp
2015-Jan-07 17:33 UTC
Re: [libvirt-users] ubuntu virsh snapshot-create-as gives Error -22 while writing VM
There was no entry in kern.log for AppArmor. Thanks I'll look at the qemu lists. On Tue, Jan 6, 2015 at 3:27 PM, Eric Blake <eblake@redhat.com> wrote:> On 01/06/2015 02:03 PM, Jon Schipp wrote: > > Hello all, I'm trying to create an online internal snapshot to work with > > Cuckoo Sandbox. > > I keep receiving this -22 error below on my Ubuntu system and I'm out of > > ideas, been at it for a while so any help is appreciated. > > > > root@cuckoo-sec:~# virsh snapshot-create-as cuckoo cuckoo-snap1 "Cuckoo > > Snapshot" > > error: operation failed: Error -22 while writing VM > > That message comes from qemu (file a bug report with them for > poor-quality error message; looks like someone forgot to convert a > negative value back into a positive EINVAL errno value). > > As for why qemu is seeing an EINVAL, I have to wonder if it is a case of > AppArmor blocking access to a file. But that's weird, as internal > snapshots don't normally need to open any additional files. At any > rate, it's more likely to be a qemu bug than a libvirt one. > > -- > Eric Blake eblake redhat com +1-919-301-3266 > Libvirt virtualization library http://libvirt.org > >-- Jon Schipp, jonschipp.com, sickbits.net, opennsm.ncsa.illinois.edu
Apparently Analagous Threads
- ubuntu virsh snapshot-create-as gives Error -22 while writing VM
- After a 'virsh blockpull', 'virsh snapshot-list --tree' o/p does not reflect reality
- Re: virsh blockcopy: doesn't seem to flatten the chain by default
- Re: Ubuntu Trusty: failed to create VM due to permission denied
- Re: Help with understanding and solving snapshot problem