How to restore OPT1 interface ?
Hi everyone !
I've been trying to replicate my pfSense VM to a fresh install with no success.
My main VM has 3 interfaces, WAN, LAN and a management interface (OPT1). OPT1 is configured as a dhcp-client. I backup the configuration to my backup server and create a fresh pfSense VM. Then I try to restore the backup configuration onto the new VM.
Unfortunately, the new VM doesn't get the OPT1 interface. If I assign the em2 interface to the OPT1 interface, it doesn't get an IP address from the DHCP.
Is this a bug/limitation ? Is VM replication allowed by pfSense ?
Thanks for your help !
Ensure that your new VM has assigned exactly the same type of virtual interfaces as the machine the backup was taken from.
Otherwise, if the backup file is not encrypted, you may open it in a text editor and update the interfaces to the new types.
The two VMs have the same interfaces. As the interfaces are the same, the config file should be working, which fields do I need to update ?
If all the virtual interfaces are identical the backup should restore the machine as it was running at the time of the backup. There should be no need to assign interfaces.
If I assign the em2 interface to the OPT1 interface, it doesn't get an IP address from the DHCP.
Have you also enable it and configured as DHCP client?
I thought that after restoring the configuration, OPT1 would be enabled and would ask the DHCP server for an IP. As it wasn't working, I assigned the em2 interface to OPT1 hoping that the system would read the xml config file and enable the dchp-client mode.
In my use case, the whole point of restoring a backup on a fresh VM is the attribution/configuration of these interfaces. Ideally I would not make any configuration before restoring.