When I try to perform qvm-trim-template on any template, the error
'libvirterror operation failed: domain 'fedora-23-fstrim' already exists with uuid ....'
pops up. As in the linked thread, rebooting doesn't help. I don't understand the proposed solution. I tried to remove the temporary vm (that in my case it has name trim-template-name) giving
'qvm-remove trim-template-name'
but I get the error
'A VM with the name 'trim-template-name' does not exist in the system.'
Can you help me? My Template VM are becoming a bit too big now...
The problem started when I decided to make a little script to automatize the trim process for all my templates at once, but it is evident that I must have made some mistake while doing it :D
Anyway, a "global trim function", as well as a "global update function" would be very helpful, updating/trimming of templates can be quite time consuming!
Cheers,
Fab.
I've tried the solution you proposed in that post. I've managed to make that little script to work (strangely enough, it looks like salt minds about indenting in the code. I'm mainly used to latex that doesn't care and this left me a bit surprised.
I created a file /srv/salt/update-templates.sls and wrote
uptodate:
pkg.uptodate: []
into it. Then I created /srv/salt/update-templates.top and wrote
base:
qubes:type:template:
- match: pillar
- update-templates
into it. Then I gave ' sudo qubesctl top.enalbe update-templates ' and tested it with ' sudo qubesctl --all state.highstate ' (these commands don't work for me if I'm not superuser). unfortunately, this doesn't work for me. There is some green stuff going on (like qvm.exists and other things that I don't really understand). Then, it runs through the templates returning errors (it basically says, as an instance, 'fedora-23: ERROR'). On the app vm it just skips saying that there is nothing to do (and this is what it is supposed to do, so at least it recognizes that it has to run only on templates).
My feeling (that may be wrong, obviously) is that the command pkg.uptodate: [] does not work for god only knows what reason. Any idea?
Cheers,
Fab.
pkg.uptodate: []
? This looks right in the salt documentation, but there is nothing else I can think about...