Created
May 30, 2025 16:12
-
-
Save jxsl13/5e16269233c9fa52a3a8f90830592d55 to your computer and use it in GitHub Desktop.
Proxmox - Reset Linux VM for Templating
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash -ex | |
| sudo apt update -y | |
| sudo apt upgrade -y | |
| sudo apt install cloud-init qemu-guest-agent -y | |
| sudo apt clean | |
| sudo apt autoremove | |
| sudo rm /etc/ssh/ssh_host_* | |
| sudo truncate -s 0 /etc/machine-id | |
| sudo rm -f /var/lib/dbus/machine-id | |
| sudo ln -s /etc/machine-id /var/lib/dbus/machine-id |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment