Capture Customized Windows Image by WDS

Step 1: Prepare the Reference Computer
Install Windows on a reference computer.
Customize the Windows installation as needed (install applications, configure settings, etc.).
Step 2: Sysprep the Reference Computer
Open a command prompt with administrative privileges.
Navigate to the Sysprep folder (usually located at C:\Windows\System32\Sysprep).
Run the Sysprep tool with the following options:
bash
sysprep.exe /generalize /oobe /shutdown /unattend:unattend.xml
  • /generalize: Prepares the Windows installation to be imaged.
  • /oobe: Configures the computer to boot to Windows Welcome upon the next restart.
  • /shutdown: Shuts down the computer after Sysprep completes.
  • /unattend:unattend.xml: Specifies an unattend.xml file to automate the Sysprep process. This file is optional but recommended for consistency.

Step 3: Boot the Reference Computer into Windows PE

  • Insert a bootable media (USB drive or DVD) containing Windows PE.
  • Boot the reference computer from the bootable media.

Step 4: Capture the Image

  • In Windows PE, open a command prompt.
  • Use the WDSUTIL command to capture the image. For example:

mathematica
WDSUTIL /Verbose /Progress /Capture-Image /Image:”CustomImage” /Name:”Custom Image” /Description:”Customized Windows Image” /CaptureDir:”D:\Captures”

  • /Image:"CustomImage": Specifies the name for the captured image.
  • /Name:"Custom Image": Specifies a friendly name for the captured image.
  • /Description:"Customized Windows Image": Provides a description for the captured image.
  • /CaptureDir:"D:\Captures": Specifies the directory to store the captured image.

Step 5: Upload the Captured Image to WDS Server

  • After capturing the image, navigate to the WDS server.
  • Use the WDS MMC snap-in or the WDSUTIL command to upload the captured image to the server.

Step 6: Create an Install Image

  • In the WDS MMC snap-in, right-click on “Install Images” and select “Add Install Image.”
  • Specify the location of the captured image file and follow the wizard to create the install image.

Step 7: Deploy the Image

  • Boot a client computer from the network using PXE boot.
  • Select the customized image from the WDS server for deployment.
  • Follow the on-screen instructions to deploy the image to the client computer.

Make sure to test the deployment thoroughly before deploying to production environments.

Install Windows On EVE-NG

  1. Prepare the Windows ISO: Obtain a Windows installation ISO file. You can download these from the Microsoft website or use an existing ISO file you have.
  2. Upload the ISO to EVE-NG: Log in to the EVE-NG web interface. In the top menu, go to “Images” and then click on “Browse” to select the Windows ISO file from your local machine. Click on “Upload” to upload the ISO file to EVE-NG.
  3. Create a QEMU VM: In the EVE-NG web interface, go to the “Node” section and click on “Add Node.” Select the type as “QEMU” and configure the settings for the VM. You can specify the number of CPUs, amount of RAM, and the size of the hard disk.
  4. Map the Windows ISO: In the QEMU VM settings, go to the “Console” tab. Under the “CD/DVD” section, select the Windows ISO file you uploaded earlier as the CD/DVD image.
  5. Start the VM: After configuring the VM settings, click on “Add Node” to create the QEMU VM. Start the VM by clicking on the play button in the EVE-NG interface.
  6. Install Windows: Access the VM console by right-clicking on the VM in the EVE-NG interface and selecting “Console.” The VM will boot from the Windows ISO. Follow the on-screen instructions to install Windows. You may need to format the virtual hard disk and select the installation partition during the process.
  7. Complete the Installation: After Windows is installed, the VM will restart. You can then log in to Windows and configure it as needed.
  8. Optional: Install VirtIO Drivers: For better performance, you can install VirtIO drivers in Windows. These drivers are included in the EVE-NG installation and can be found in the /opt/unetlab/addons/qemu/virtio-win directory. To install the drivers, mount the VirtIO ISO in Windows and run the installer.
  9. Access Windows from EVE-NG: Once Windows is installed and running, you can access it from EVE-NG by right-clicking on the VM in the EVE-NG interface and selecting “Console.”
  10. Activate Windows: After installation, you’ll need to activate Windows using a valid product key. You can do this by going to “Settings” > “Update & Security” > “Activation” in Windows.

Remember to comply with Microsoft’s licensing terms and ensure that you have a valid license for Windows when using it on EVE-NG or any other virtualization platform.