adding zero drive back

some hypervisors will need manual virt-sparsify or equivalent
This commit is contained in:
2022-07-05 15:34:06 +00:00
parent 99c397df7c
commit 829c112dd1

View File

@@ -98,6 +98,10 @@ sudo sed -ri '/\sswap\s/s/^#?/#/' /etc/fstab
# cleans out all of the cloud-init cache / logs - this is mainly cleaning out networking info
sudo cloud-init clean --logs
# zero out drive
dd if=/dev/zero of=EMPTY bs=1M status=progress
rm EMPTY
fstrim -av
#cleanup shell history
cat /dev/null > ~/.bash_history && history -c