Closed tasket closed 1 year ago
(This new issue template needs a section for general notes/description.)
(This new issue template needs a section for general notes/description.)
Thanks; I'll add one.
I noticed there is now a 'fedora-23-fstrim' entry in my KDE launcher menu. Hmmm!
I also ran into this when qubes couldn't start the trim vm because of low memory. I naively deleted the folder and tried again but now there seems to be a orphaned entry in libvirt's db. Is there a manual step to remove that, too?
Disk usage before:
3974352 /var/lib/qubes/vm-templates/whonix-ws/root.img
1596676 /var/lib/qubes/vm-templates/whonix-ws/root-cow.img.old
5571028 total
Creating temporary VM...
--> Creating volatile image: /var/lib/qubes/appvms/trim-whonix-ws/volat
--> Loading the VM (type = AppVM)...
Traceback (most recent call last):
File "/usr/bin/qvm-trim-template", line 171, in <module>
main()
File "/usr/bin/qvm-trim-template", line 116, in main
fstrim_vm.start(start_guid=False, verbose=True)
File "/usr/lib64/python2.7/site-packages/qubes/modules/000QubesVm.py"
qmemman_client = self.request_memory(mem_required)
File "/usr/lib64/python2.7/site-packages/qubes/modules/000QubesVm.py"
raise MemoryError ("ERROR: insufficient memory to start VM '%s'" %
MemoryError: ERROR: insufficient memory to start VM 'trim-whonix-ws'
[cryptix@dom0 ~]$ qvm-trim-template whonix-ws
Disk usage before:
3974352 /var/lib/qubes/vm-templates/whonix-ws/root.img
Creating temporary VM...
Traceback (most recent call last):
File "/usr/bin/qvm-trim-template", line 171, in <module>
main()
File "/usr/bin/qvm-trim-template", line 115, in main
fstrim_vm.create_on_disk()
File "/usr/lib64/python2.7/site-packages/qubes/modules/000QubesVm.py"
self.storage.create_on_disk(verbose, source_template)
File "/usr/lib64/python2.7/site-packages/qubes/storage/__init__.py",
os.mkdir (self.vmdir)
OSError: [Errno 17] File exists: '/var/lib/qubes/appvms/trim-whonix-ws'
[cryptix@dom0 ~]$ rm -rf /var/lib/qubes/appvms/trim-whonix-ws/
[cryptix@dom0 ~]$ qvm-trim-template whonix-ws
Disk usage before:
3974352 /var/lib/qubes/vm-templates/whonix-ws/root.img
Creating temporary VM...
Traceback (most recent call last):
File "/usr/bin/qvm-trim-template", line 171, in <module>
main()
File "/usr/bin/qvm-trim-template", line 115, in main
fstrim_vm.create_on_disk()
File "/usr/lib64/python2.7/site-packages/qubes/modules/000QubesVm.py", line 1308, in create_on_disk
self._update_libvirt_domain()
File "/usr/lib64/python2.7/site-packages/qubes/modules/000QubesVm.py", line 755, in _update_libvirt_domain
raise e
libvirt.libvirtError: operation failed: domain 'trim-whonix-ws' already exists with uuid 779fdd96-a4d9-4f25-bdd4-ca9d35c33ef9
[cryptix@dom0 ~]$ qvm-remove trim-whonix-ws
A VM with the name 'trim-whonix-ws' does not exist in the system.
[cryptix@dom0 ~]$ qvm-remove --just-db trim-whonix-ws
A VM with the name 'trim-whonix-ws' does not exist in the system.
Yes, you can remove it from libvirt by virsh -c xen:/// undefine trim-whonix-ws
.
I had this issue on R4.0 with a simple qvm-start the-vm
, it gives the error Domain the-vm has failed to start: operation failed: domain 'the-vm' already exists with uuid xxx…
The VM originally failed to start on startup after a few seconds. Thinking that the VM (which was restored from a backup) was in an inconsistent state (e.g. some startup service had a problem), I deleted the VM and re-created it (it's a throwaway service VM).
Now, the error above appears immediately and the VM doesn't start at all.
I tried rebooting Qubes, deleting the VM and re-creating it again: still the same error which appears instantly.
I re-created the VM with the same exact configuration (memory, vcpus etc. : it's created automatically by a script) but with a different name, and that one starts without any issues.
virsh -c xen:/// undefine the-vm
solved the issue.
I also experienced this trouble when executing multiple times Salt formulas for creating VM and then deleting them. I confirm that undefining the vm using virsh solved the problem as they some VMs were still existing under virsh database.
(Generalized issue title.)
virsh undefine
solved this problem when it happened for me.
Have anybody seen this issue recently? There were related changes since this issue was originally reported, so if there are no fresh confirmations it is still an issue, I'd close it as fixed.
This issue is being closed because:
If anyone believes that this issue should be reopened and reassigned to an active milestone, please leave a brief comment. (For example, if a bug still affects Qubes OS 4.1, then the comment "Affects 4.1" will suffice.)
Qubes OS version (e.g.,
R3.1
):R3.1
Affected TemplateVMs (e.g.,
fedora-23
, if applicable):fedora-23
Expected behavior:
Template is trimmed without error
Actual behavior:
When trying to use qvm-trim-template I get one of two errors:
or
Steps to reproduce the behavior:
General notes:
Rebooting Qubes has not helped.
Related issues:
Relevant labels: