8000 Unable to delete vm snapshot · Issue #806 · karmab/kcli · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Unable to delete vm snapshot #806

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service< 8000 /a> and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
vashirov opened this issue Apr 28, 2025 · 5 comments
Closed

Unable to delete vm snapshot #806

vashirov opened this issue Apr 28, 2025 · 5 comments

Comments

@vashirov
Copy link
Contributor
$ kcli create vm -i fedora42 fedora42
Deploying vm fedora42 from image fedora42...
Creating dns entry for fedora42 in network default
Waiting 5 seconds to grab ip...
Waiting 5 seconds to grab ip...
Waiting 5 seconds to grab ip...
fedora42 created on local

$ kcli create vm-snapshot -n fedora42 snapshot1
Creating snapshot of fedora42 named snapshot1...
fedora42 snapshotted

$ kcli delete vm-snapshot -n fedora42 snapshot1
Deleting snapshot snapshot1 of vm fedora42...
Traceback (most recent call last):
  File "/usr/bin/kcli", line 33, in <module>
    sys.exit(load_entry_point('kcli==99.0', 'console_scripts', 'kcli')())
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/lib/python3.13/site-packages/kvirt/cli.py", line 5271, in cli
    args.func(args)
    ~~~~~~~~~^^^^^^
  File "/usr/lib/python3.13/site-packages/kvirt/cli.py", line 3012, in snapshotdelete_vm
    result = k.delete_snapshot(snapshot, name)
  File "/usr/lib/python3.13/site-packages/kvirt/providers/kvm/__init__.py", line 1550, in delete_snapshot
    vm.blockCommit(disk_name, base_path, snapshot_path, 0, VIR_DOMAIN_BLOCK_COMMIT_ACTIVE)
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.13/site-packages/libvirt.py", line 928, in blockCommit
    raise libvirtError('virDomainBlockCommit() failed')
libvirt.libvirtError: invalid argument: could not find image '/var/lib/libvirt/images/fedora42_0.img' beneath '/var/lib/libvirt/images/fedora42_0.img' in chain for 'vda'

virsh doesn't have problems to delete it:

$ sudo virsh snapshot-delete fedora42 snapshot1
Domain snapshot snapshot1 deleted
@karmab
Copy link
Owner
karmab commented Apr 30, 2025

I m not able to reproduce this error, make sure you have latest

@vashirov
Copy link
Contributor Author

I have kcli-99.0.0.git.202504300602.07f1888-0.fc42.x86_64

I tracked down the issue to my config. I have 2 networks for all my VMs:

  nets:
  - default
  - external
# virsh net-list
 Name       State    Autostart   Persistent
---------------------------------------------
 default    active   yes         yes
 external   active   yes         yes

# virsh net-dumpxml external
<network connections='2'>
  <name>external</name>
  <uuid>773b4a67-5a2c-4ea4-806e-5cf58532e1e9</uuid>
  <forward dev='eno1' mode='bridge'>
    <interface dev='eno1' connections='2'/>
  </forward>
</network>

If I comment out external network in the config, I can delete snapshots.

@karmab
Copy link
Owner
karmab commented Apr 30, 2025

also tried with a 2 nic vm (plugged to both default and bridge network) and I still cant reproduce :(

@vashirov
Copy link
Contributor Author

Sorry, let me clarify. I had an external network created:

kcli create network -P macvtap=true -P nic=eno1 external

Then in the ~/.kcli/config.yml file I have:

default:
..
  nets:
  - default
  - external

@karmab
Copy link
Owner
karmab commented Apr 30, 2025

should be addressed by 05cd68d

@karmab karmab closed this as completed May 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0