Hello,

I have the following error when I try to trim my debian-8 template VM

  qvm-trim-template debian-8
    Disk usage before:
    6212224     /var/lib/qubes/vm-templates/debian-8/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 1292, 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-debian-8'


I tried the following naive solution but it didn't work

  mv /var/lib/qubes/appvms/trim-debian-8  
/var/lib/qubes/appvms/trim-debian-8.old

  qvm-trim-template debian-8
    Disk usage before:
    6212224     /var/lib/qubes/vm-templates/debian-8/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 1314, in create_on_disk
        self._update_libvirt_domain()
      File "/usr/lib64/python2.7/site-packages/qubes/modules/000QubesVm.py", 
line 761, in _update_libvirt_domain
        raise e
    libvirt.libvirtError: operation failed: domain 'trim-debian-8' already 
exists with uuid 7f653418-846b-4ddd-b42f-52d800fc478c


I thought about trying to recover a backup qubes.xml from
/var/lib/qubes/backup, but the UUID 7f653418-846b-4ddd-b42f-52d800fc478c
does not appear in any them and I'm not sure which one to use because
I've run updates since.


If I then do 

  rm -rf /var/lib/qubes/appvms/trim-debian-8
  mv /var/lib/qubes/appvms/trim-debian-8.old /var/lib/qubes/appvms/trim-debian-8

I'm back to where I started.


Can anyone please tell me how to fix this problem.

Thanks,

Paul

-- 
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-users/e077f192-651f-456e-a537-d42558214975%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to