Skip to content

Conversation

@bobsira
Copy link
Contributor

@bobsira bobsira commented Jan 25, 2024

This pull request introduces automation scripts for setting up a virtual machine (VM) with Windows Server 2022 and configuring it for Minikube. The changes include a PowerShell script for VM creation and an unattended XML file for automated OS installation and configuration.

VM Setup Automation:

  • Added SetUp.ps1 script to automate the creation of a Hyper-V VM with predefined settings, including memory allocation, virtual hard disk (VHD) configuration, and boot device setup. The script also configures the VM to use virtualization extensions and mounts necessary ISO files.

Unattended OS Installation and Configuration:

  • Added autounattend.xml file to automate Windows Server 2022 installation. It includes configurations for disk partitioning, locale settings, and OS image installation.
  • Configured the system to enable WinRM over HTTPS with a self-signed certificate, add firewall rules, and enable Basic authentication for remote management.
  • Set up first logon commands to install the Containers feature, disable the Server Configuration tool (SConfig), and restart the system to apply changes.
  • Configured user accounts with an administrator password and enabled auto-login for the Administrator account.To test the PR:

Edit your Windows Server 2022 ISO: You can use free software like AnyBurn or ImgBurn

Add the autounattend.xml file: Copy your autounattend.xml file to the root folder path of your Windows Server 2022 ISO file.

Create a new ISO: Create a new ISO with the autounattend.xml file bundled together.

Run SetUp.ps1 file: Remember to replace the $SwitchName and $ISOFile with the appropriate values

@mloskot
Copy link

mloskot commented Jan 31, 2024

Is there any way to avoid re-burning the ISO?

By the way, I've been experimenting with official Windows Server VHD instead of ISO. It still does not offer full automation, but needs less interactive steps (password, language, eula).

/cc @knabben This is interesting. If there was portable CLI ISO burner that could be scripted :)

@vrapolinario
Copy link
Owner

I'd also recommend moving away from burning an ISO. The goal here is to make the process easier for the user, and this adds more complexity.

@bobsira
Copy link
Contributor Author

bobsira commented Feb 12, 2024

The changes in this PR has been merged in the remoting PR found here: #4

@bobsira
Copy link
Contributor Author

bobsira commented Feb 21, 2024

We are closing this PR in favor of this #4

@bobsira bobsira closed this Feb 21, 2024
@bobsira
Copy link
Contributor Author

bobsira commented Feb 21, 2024

I'd also recommend moving away from burning an ISO. The goal here is to make the process easier for the user, and this adds more complexity.

This has been addressed with help from @iankingori

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants