makebuildserver: delete unused libvirt image after process is complete

This process creates three copies of the buildserver image, all of which
are large.  So deleting the unused one is quite helpful:

```
-rw-r--r-- 1 fdroid       fdroid       20G  8. Nov 15:22 /home/fdroid/.vagrant.d/boxes/buildserver/0/libvirt/box.img
-rw------- 1 root         root         19G  8. Nov 14:07 /var/lib/libvirt/images/buildserver_default.img
-rwxr--r-- 1 libvirt-qemu libvirt-qemu 20G  8. Nov 16:08 /var/lib/libvirt/images/buildserver_vagrant_box_image_0_box.img
```
This commit is contained in:
Hans-Christoph Steiner 2022-11-09 10:32:59 +01:00
parent 17e30a306c
commit e395cd4f79
No known key found for this signature in database
GPG Key ID: 3E177817BA1B9BFA
1 changed files with 3 additions and 0 deletions

View File

@ -409,6 +409,9 @@ def main():
boxfile)
os.remove(boxfile)
# This was needed just to create the box, after that, it is unused.
vm.destroy()
if __name__ == '__main__':