I have no experience with snapins and was wondering how can I use them to run a powershell script before rebooting to capture. I have a script that clears the Windows logs and in that script (right now) at the very end shuts the computer down, preparing it for manual capture. I have the FOG client installed on my test system.
:EDIT: Sorry I think I figured it out.
Might as well think out loud in case anyone else can use this info. I got the snapin to run my clearalllogs.ps1 script, now the next challenge is to have the script run then immediately after it reboots, start the capture.
Run a PowerShell script prior to capture is a handy feature that allows you to automate tasks and streamline your workflow. Great addition to the toolset
@tadziuuu Are you referring to booting bios based computers? If yes then use memdisk to load the cd iso image into memory. The one caveat here is that the iso disk must be less than 2GB in size since memdisk is a 32 bit application and there needs to be room in ram for the OS to boot from the iso image. In the same tutorial you found the parameters in your first post, search for memdisk to see what parameters you need.
@joseheitor I can think of 2 possible conditions to cause this.
The reboot process leaves the hardware in a strange state where iPXE can’t get an IP address on a warm start.
Your network switch and spanning tree (if standard spanning tree) is enabled would cause this. Explanation Default Spanning tree takes 27 seconds to start forwarding network data after a network wink (as if the computer is rebooting). A warm start boots faster than a cold start so by the time iPXE gives up STP has not started forwarding data yet. Where at cold start the computer tests memory and checks hardware that isn’t needed on a warm start. But again this is only a guess as to the reason.
One quick check for spanning tree is to put a dumb (cheap) un managed network switch between the building switch and pxe booting computer, see if that resolves the post imaging reboot. If it does then look into your network switch settings to enable fast-stp, port-fast, or RSTP (whatever your switch vendor calls it).
@george1421 I see the set fog-ip variable and set storage-ip variable. Could I set those two variables with IPs of different interfaces? So for example, the interface IP server ipxe will be the “set fog-ip” and the interface IP serving NFS will be the “set storage-ip” var. Would that work?
Thanks for sharing such great information, I highly appreciate your hard-working skills as the post you published have some great information which is quite beneficial for me, I hope you will post more like that in the future.
since you mentioned that you do not want to partition the volume, an alternative approach could involve creating a disk quota at the operating system level. Disk quotas are a feature provided by the operating system (in this case, the Hyper-V host) that allows you to set limits on the amount of disk space a specific user or group can consume.
Set up the network share on the Hyper-V host where you will store the FOG images. Ensure the share is accessible from the FOG VM. Inside the FOG VM, mount the network share to the /images directory, which is where FOG stores the images. You can do this using the mount command or by adding an entry in /etc/fstab for persistent mounting. Configure disk quotas on the Hyper-V host for the user or group associated with the FOG VM. Set the quota limit to the desired amount of disk space you want FOG to use for images.
Keep in mind that disk quotas are managed at the operating system level and are not specific to FOG. Therefore, this method will not provide real-time monitoring of disk usage within the FOG web interface. You will need to monitor the disk space usage separately on the Hyper-V host.
Make sure your Proxmox server is set up with a static IP address on the physical network interface. For the virtual network, ensure that it is set up correctly, and all VMs and LXC containers are attached to this network. Assign static IP addresses to all your servers and clients to avoid conflicts with DHCP. Reserve these IP addresses in your DHCP server configuration (pfSense) to prevent accidental IP allocation conflicts. Ensure that your LXC container (running Ubuntu Server) has the correct network configuration. Use a bridged network interface so that the container can get its IP address directly from the physical network. Double-check that the LXC container’s network settings are consistent with your Proxmox virtual network setup.
Yes, you are correct. On Linux, the ‘mv’ command is commonly used to rename files and directories. In the scenario you mentioned, ‘fogsettings-firstInstall’ is the new name given to the file ‘.fogsettings’ using the ‘mv’ command. By renaming the file in this way, you can effectively create a backup copy of the original file while also giving it a new name.
mv .fogsettings fogsettings-firstInstall
In the above command, the file ‘.fogsettings’ is renamed to ‘fogsettings-firstInstall’. The original file is now backed up with a new name, allowing you to keep a copy of the previous settings.
@zaboxmaster The history of the report should still show the fact that it was imaged, though the links to the “host” element are done based on the existing of the physical host in the database.
I believe this is known and could be relatively easily fixed by just planting the current device name along with the hostID.
The reason that this isn’t done, however, is that it’d still be relying on a database entry, and there are cases where people deploy an image to a device that isn’t registered. What name do you use for that particular case?
@Sebastian-Roth yeah i have FOG server and now work with it, capture and deploy my favorite OS and images, actually that i say we need boot sergei strelec over FOG in network boot with live type, in fact we used Hiren PE but we need use Sergei, these products are different, Hiren have just 1 wim file but sergei have 4 wim file!
if i use 1 of 4 or combine or merge together it will work and sergei will boot up but the programs not working, it look like the apps wont load, in result do you have any idea?