On Mon, Nov 12, 2018 at 08:47:43PM +0100, cubit wrote: > I was running qvm-trim-template on my 6 templates - Qubes 3.2 - but the > process looked to hang on 2 of them. After 30 minutes of waiting (usually > 2-3 minutes max) I ctrl+c them > This resulted in files being left behind blocking me from running > qvm-trim-template again on the problem ones. > If I do qvm-trim-template whonix-gw-14 I get the error > Disk usage before: > 2644484 /var/lib/qubes/vm-templates/whonix-gw-14/root.img > Creating temporary VM... > Traceback (most recent call last): > File "/usr/bin/qvm-trim-template", line 172, 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 > 1298, in create_on_disk > self.storage.create_on_disk(verbose, source_template) > File "/usr/lib64/python2.7/site-packages/qubes/storage/__init__.py", line > 175, in create_on_disk > os.mkdir (self.vmdir) > OSError: [Errno 17] File exists: '/var/lib/qubes/appvms/trim-whonix-gw-14' > I though maybe I could delete the trim-whonix-gw-14 app VM but get this error > then > > $ sudo rm -rf /var/lib/qubes/appvms/trim-whonix-gw-14 > $ qvm-trim-template whonix-gw-14 > Disk usage before: > 2644484 /var/lib/qubes/vm-templates/whonix-gw-14/root.img > Creating temporary VM... > Traceback (most recent call last): > File "/usr/bin/qvm-trim-template", line 172, 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 > 1320, in create_on_disk > self._update_libvirt_domain() > File "/usr/lib64/python2.7/site-packages/qubes/modules/000QubesVm.py", line > 767, in _update_libvirt_domain > raise e > libvirt.libvirtError: operation failed: domain 'trim-whonix-gw-14' already > exists with uuid 1dcd7cd5-aaa9-4b62-8254-73b8db63190b > > > Can anyone suggest how to rectify this so I can trim once again? > > CuBit > Read https://www.qubes-os.org/doc/remove-vm-manually/
The libvirt error shows you need to manually remove that qube. qvm-remove just-db trim-whonix-gw-14 unman -- You received this message because you are subscribed to the Google Groups "qubes-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to qubes-users+unsubscr...@googlegroups.com. To post to this group, send email to qubes-users@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/qubes-users/20181113004603.62ebyi73foobhvmb%40thirdeyesecurity.org. For more options, visit https://groups.google.com/d/optout.