Can ECL be used from any disk and not just USB since Hyper-V doesn't support USB Passthru for Flash
-
Configuration recovery under Hyper-V.
Since USB devices can't be used to auto recover at boot, will pfSense use a regular disk (a virtual disk with only the configuration on it in \config\config.xml? or must it be USB?
If this isn't possible, assume I need to re-install pfSense. Without doing the manual config to get access to the LAN so that I can restore via the GUI, is there any way similar to ECL. ECL works great on a real machine but I've now got pfSense running under Hyper-V.
Hyper-V does not support USB devices unless I use Server Side passthru and in order to do that, I have to trick the host into thinking that (diskmod) the device is fixed (actually diskmod is needed because the device incorrectly reports it is a Removeable Media). And I can't use Client Side passthru as that is only for Windows OS's.
Thanks if someone has an idea. If not, could this be considered for future. ECL but from any disk and not just USB?
-
@garryggreen When I was on Hyper-V I would just build the base from ISO, then after configuring enough networking to SSH to it, I'd use WinSCP to attach to the new machine, then copy over the config.xml and reboot, or just use the web GuI to restore/reboot.
-
The ECL doesn't specifically limit itself to USB drives. It will attempt to mount any disk (not already mounted) that is either DOS (FAT16/FAT32) or UFS format:
https://github.com/pfsense/pfsense/blob/master/src/etc/rc.ecl#L49
-
@jimp I will try that right now. I'll create a virtual disk, partition it then format the one and only partition as FAT32 with a /config/config.xml file and add it to the pfSense's VM config and boot.
I'll let everyone know how it went.
-
@jimp Just tried it - took a backup of my config using the GUI, created a VHDX of 20 MB. Init as MBR. Created one partition. Formatted it as FAT (20 MB is too small for FAT32). Created a folder "config" and put the backed up configuration file into it and renamed it "config.xml".
I copied my regular VM definitions, just changed the name. So it uses the same virtual HDD as the 1st VM. Only difference is that I add the above VHDX file as a 2nd HDD in its definition.
If I really screw things up, I shutdown VM1, boot VM2 - this restores the config w/o having to set up LAN etc. Shut VM2 down once it is up and boot VM1.
So confirmed (and a big thanks) - any attached disk which is partitioned and has a partition formatted FAT/FAT32 with a folder "config" in it with a file "config.xml" will be used during all boot if present and copied, replacing your config file. After booting, it must be removed otherwise on each boot, the config.xml file on it will replace your updated.