Skip to main content

Making Linked Clones


Linked Clones is a method of generating new VM's within Proxmox without the need to constantly keep installing the same OS over and over <linked clone guide to come>

Each time a linked clone is made from a template the following script should be run to ensure the clone is configured as a separate entity from the template, to give it its own machine-id, host name and SSH keys.

sudo bash -c "bash <(wget -qO- https://raw.githubusercontent.com/dlford/ubuntu-vm-boilerplate/master/run.sh)"

Any time a VM is spun up from a linked clone this script should be run, it will:

  • Remove the cloned machine-id from /etc/ and /var/lib/dbus, creating a new machine-id in /etc/ and symlinking it to /var/lib/dbus
  • Generate SSH keys
  • Change the host name of the new VM
  • Reboot the VM after all changes are made

This ensures that each VM made from a linked clone is unique in the stack after being made.

 

Sources

https://github.com/dlford/ubuntu-vm-boilerplate