Skip to content

win_installation

Pedro Ielpi edited this page Jan 20, 2025 · 5 revisions

Installing the Windows Context Packages

Download the MSI package into C:\:

https://github.com/OpenNebula/one-apps/releases/download/v6.8.1/one-context-6.8.1.msi

Or execute this command in PowerShell:

(New-Object Net.WebClient).DownloadFile("https://github.com/OpenNebula/one-apps/releases/download/v6.8.1/one-context-6.8.1.msi", "C:\one-context-6.8.1.msi")

The Windows Guest VMs require the OpenSSH server to run. To install the server:

Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0

Building Windows Images with Packer

Creating Windows images using Packer enables consistent and automated image creation. This guide outlines the steps to prepare the environment and build the images locally.

Environment Setup

1. Download the Windows ISO

Acquire the installation ISO for the desired Windows version:

Save the ISO file in the iso directory.


2. Update the Variables File

After downloading the ISO:

  1. Open the variables.auto.pkrvars.hcl file.
  2. Update the following fields with the ISO details:
    • iso_url: Path to the downloaded ISO file.
    • iso_checksum: SHA256 checksum of the ISO.

3. Download VirtIO Drivers

Next, obtain the VirtIO drivers for creating Windows images:

  • Download the stable virtio-win ISO from the VirtIO GitHub repository.
  • Place the drivers in the iso directory (ensure that the file is renamed to virtio-win.iso, as the Packer script expects this specific filename).

4. Generate Windows Context Packages

Prepare necessary context files for Windows images:

make context-windows

Image Creation Process

Windows images can be created using the make command. For example, to create a Windows 10 Home image, run the following command:

sudo make windows10Home

By default, the administrator account used throughout the build process remains active after the setup is complete. If you wish to disable the administrator account, you can use the disable_administrator variable, which is defined in the variables.pkr.hcl file.

You can monitor the entire build process in real time by connecting to a VNC session. During the build, Packer will provide an IP:PORT address in the logs. Use this address to connect to the VNC server and observe the Windows installation progress as it happens.

Once the build completes, the resulting Windows image will be saved in the export directory.

Clone this wiki locally