What to do after cloning (SD card -> dd -> SD card) / (VM disk copy)

Started by Lukas, December 08, 2017, 05:50:52 PM

Previous topic - Next topic
Hi all,

I'd like to simplify and speed up installation of several virtual and physical OPNsense boxes. I'd like to install OPNsense once and then copy VM disk or copy (dd) SD card into another SD card.

1. What should I do after cloning? From my Linux experience I know that I have to re-generate SSH host keys:
# rm /etc/ssh/ssh_host_*
Something else?

2. Is it possible to change XML on the clone before first boot?
I know I can boot it and import but it'd be easier to do it before (offline) by modifying filesystem.

Thank you for any tips.

You don't need to regenerate the host keys as long as you don't give the copy to someone else.

In such a case, you would have to delete all certificates as well and clear all the passwords from config.xml (for example RADIUS passwords). Also keep in mind that configuration files may contain passwords / X509 certificates and keys.