Bug 1888709 - Virt-Manager fails to show VM with snapshot
Summary: Virt-Manager fails to show VM with snapshot
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: libvirt
Version: rawhide
Hardware: Unspecified
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-10-15 14:25 UTC by Jacques YE
Modified: 2020-10-18 11:52 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-10-18 11:52:29 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Jacques YE 2020-10-15 14:25:56 UTC
Description of problem:
Virt-Manager fails to show any VM that has snapshot.

Version-Release number of selected component (if applicable):
virt-manager --version
3.1.0

How reproducible:
100%

Steps to Reproduce:
1. Create a VM 
2. Create a snapshot of this VM (notice how there's a warning) using virt-manager
3. re-execute virt-manager

Actual results:
The VM that has a snapshot will fail to show up in virt-manager, and will not show up unless snapshot is deleted using virsh.

Expected results:
VM will show up normally

Additional info:

Comment 1 Daniel Berrangé 2020-10-15 14:27:53 UTC
Please confirm if you have libvirt-python version 6.8.0 installed ?  This version has a regression related to handling snapshots which is the likely cause of your problem : https://gitlab.com/libvirt/libvirt-python/-/merge_requests/27

Comment 2 Jacques YE 2020-10-15 14:35:27 UTC
Output of libvirtd --version:
```
libvirtd (libvirt) 6.8.0
```

Version of python3-libvirtd  (output copied from yum list --installed)
```
python3-libvirt.x86_64                                            6.8.0-1.fc34                                @rawhide 
```

Comment 3 Daniel Berrangé 2020-10-15 16:00:01 UTC
I've built python3-libvirt-6.8.0-1.fc34  into rawhide. Let me know if that build fixes it for you when you get the update.

Comment 4 Jacques YE 2020-10-15 23:01:20 UTC
The build "python3-libvirt-6.8.0-1.fc34" does not work on my end, virt-manager pops an error saying "name 'dom' is not defined". I'm sorry, I should have wrote this error on my first comment.

Comment 5 Jacques YE 2020-10-16 15:52:05 UTC
This error also pops up when trying to create a snapshot in virt-manager.
Thought, the snapshot will be successful even with the error, it can be browsed using virsh

```
Error creating snapshot: name 'dom' is not defined

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/details/snapshots.py", line 237, in _do_create_snapshot
    self.vm.create_snapshot(xml)
  File "/usr/share/virt-manager/virtManager/object/domain.py", line 1125, in create_snapshot
    self._backend.snapshotCreateXML(xml, flags)
  File "/usr/lib64/python3.9/site-packages/libvirt.py", line 3031, in snapshotCreateXML
    __tmp = virDomainSnapshot(self, _obj=ret)
  File "/usr/lib64/python3.9/site-packages/libvirt.py", line 7023, in __init__
    self._dom = dom
NameError: name 'dom' is not defined

```

Comment 6 Cole Robinson 2020-10-17 21:41:22 UTC
I think you'll want to try libvirt-python-6.8.0-2.fc34

Comment 7 Jacques YE 2020-10-18 00:18:49 UTC
This bug seems to be fixed with `libvirt-python-6.8.0-2.fc34`.

Comment 8 Cole Robinson 2020-10-18 11:52:29 UTC
Thanks for confirming


Note You need to log in before you can comment on or make changes to this bug.