Skip to content

Instantly share code, notes, and snippets.

@anddam
Created August 31, 2021 22:45
Show Gist options
  • Save anddam/2ccf9f227e0ae817919c15c66c98c10b to your computer and use it in GitHub Desktop.
Save anddam/2ccf9f227e0ae817919c15c66c98c10b to your computer and use it in GitHub Desktop.
virt-manager error saving
Error saving domain: operation failed: domain save job: unexpectedly failed
Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/asyncjob.py", line 65, in cb_wrapper
callback(asyncjob, *args, **kwargs)
File "/usr/share/virt-manager/virtManager/vmmenu.py", line 182, in cb
vm.save(meter=asyncjob.get_meter())
File "/usr/share/virt-manager/virtManager/object/libvirtobject.py", line 57, in newfn
ret = fn(self, *args, **kwargs)
File "/usr/share/virt-manager/virtManager/object/domain.py", line 1377, in save
self._backend.managedSave(0)
File "/usr/lib/python3.9/site-packages/libvirt.py", line 1780, in managedSave
raise libvirtError('virDomainManagedSave() failed')
libvirt.libvirtError: operation failed: domain save job: unexpectedly failed
@anddam
Copy link
Author

anddam commented Oct 22, 2021

did you find the cause for this yet? i'm running into the same error

Sadly I don't. Eventually I went through this and I cannot recall exactly how off the top of my head.

IIRC I had a mismatch in versions, i.e. I had updated the packages but I had the running processes linking older libs. Try restarting the qemu session before saving a domain again.

@Jiivee1
Copy link

Jiivee1 commented Oct 28, 2021

I see this error, too, when saving virtual machine (OpenSUSE Tumbleweed: qemu 6.1.0-33.1, libvirt 7.8.0-2.1).
I found out that save file is being written to /var/lib/libvirt/qemu/save, but it is removed before throwing exception. There is enough space for that file in filesystem.

@trmckay
Copy link

trmckay commented Nov 23, 2021

I am having this same issue on QEMU emulator version 6.1.0 (openSUSE Tumbleweed). Same stacktrace I think, too.

Error saving domain: operation failed: domain save job: unexpectedly failed

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 65, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/vmmenu.py", line 187, in cb
    vm.save(meter=asyncjob.get_meter())
  File "/usr/share/virt-manager/virtManager/object/libvirtobject.py", line 57, in newfn
    ret = fn(self, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/object/domain.py", line 1379, in save
    self._backend.managedSave(0)
  File "/usr/lib64/python3.8/site-packages/libvirt.py", line 1780, in managedSave
    raise libvirtError('virDomainManagedSave() failed')
libvirt.libvirtError: operation failed: domain save job: unexpectedly failed

@X41
Copy link

X41 commented Nov 24, 2021

i didn't manage fixing it yet, but apparently this is caused by a migration blocker when using QXL graphics.
This was reverted in this commit
the next qemu release should fix this, in theory compiling it yourself should too but i don't feel like bothering with that for now so i'll let one of you guys find out :^)

@Jiivee1
Copy link

Jiivee1 commented Nov 24, 2021

This gist and Qemu bug https://gitlab.com/libvirt/libvirt/-/issues/236 are of the same bug. @X41 could you pick that up as Qemu developer?

@X41
Copy link

X41 commented Nov 25, 2021

sorry about the confusion @Jiivee1 but i'm not a qemu dev 😅
and like i've said, this should be fixed already and rolled out in the next release (which should be mid december at the latest according to this)

EDIT: also i finally made myself compile things myself from git and saving with qxl works again!

@anddam
Copy link
Author

anddam commented Nov 25, 2021

Very nice to have found the actual issue, I did not think of looking in libvirt issue.

So what happened in my case was just that Void upgraded libvirt package underneat and I got the fix.

@Jiivee1
Copy link

Jiivee1 commented Nov 25, 2021

@X41 Thanks for clarification.

I can live by not using qxl for now and I can wait qemu 6.2.0 coming down to my distro. As being an ordinary user it is sometimes hard to figure out where the true bug is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment