Skip to content

Create a Windows VM image

jdeananderson edited this page Feb 7, 2025 · 1 revision

Creating a Windows VM is much easier through virt-manager on a desktop machine compared to using qemu-kvm on a cluster node. The Windows 11 installer is very picky about environment it will allow Windows to be installed on. It looks at the processors, secure boot, and a long list of other requirements that are difficult to satisfy on a Linux server host. It is very easy however, to create a Windows VM somewhere else and just copy the qcow2 file over and run it from there. Windows only checks for the picky environment upon install, not at boot.

You will need:

  • Windows 11 ISO
  • A desktop machine with virt-manager installed

Inside virt-manager, the following are adequate for a minimum install:

  • Memory: 8192
  • CPUs: 4
  • Disk Image: 64G
  • Virtual network 'default': NAT Boot the VM from the installation disk
  • Select languages, and install.

Select the version of Windows you want to run.

  • You will need Professional or Enterprise if you want more than 64 cores.
  • N versions do not have some of the media players and other media-related software.
  • Enterprise has options for active directory, group policy, and KMS Licensing.

Continue through the install process:

  • Custom Install Windows only
  • Select "allocated space" hard drive created earlier
  • Install
  • Select country or region
  • Select keyboard layout
  • Name your machine

Since we will be using randomly generated job-specific credentials, we do not want to set up Microsoft accounts. We want local accounts. Your VM most likely does not have internet access, it will now go to a screen that will finally say that it couldn't find internet access. Retry?

  • Do NOT press retry. There most likely is no network.

  • Press Shift+F10. This will bring up a command prompt.

  • In the command prompt type oobe\bypassnro. This will send you back to selecting your country of region. Go through those prompts again, except this time it will not require Internet.

  • Who is going to use this device? This is the username of the administrative account on the machine. Choose something appropriate.

  • Enter a password. This is the administrator password used to install software, etc on the image. You can change it later from inside the OS if needed.

  • Choose privacy settings

  • Updates will be applied. This may take a long time.

  • Machine will reboot and will finally come up with a login prompt.

  • Log in using username and password set earlier.

  • Create a standard user account. This will be the account that all of the standard users will use when they use the machine. Choose a username that is appropriate for all users to share. Something like user1, or perhaps something site specific. The password set for this account will be used any time the VM is booted without the SMBIOS flags used by the OnDemand job to tell the VM to change the password of this user at boot. Make sure to log in as this user and set sane settings and defaults for this account. These settings and defaults will be shared by everyone using this image.

Clone this wiki locally