VMmanager Knowledge Base

Possible issues with Windows OS images

The article contains a description of possible problems when using a Windows VM image.

VM disk is corrupted

If the VM disk is corrupted, the platform will not be able to copy the files needed to create the image to it.

To solve the problem:

  1. Start the VM.
  2. Connect to the VM via VNC or SPICE.
  3. Run the command in the administrator console:

    chkdsk /f
  4. Reboot the VM using the OS tools. After rebooting, the disk check will start. Wait for the check to finish.
  5. Shut down the VM using the OS tools.

VM disk is corrupted and a partitioning error occurs

Image creation may fail with an error containing the text "invalid backup GPT header". The problem occurs when MBR disk partitioning is used and a backup copy of GPT partitioning was created earlier.

To solve the problem:

  1. Shut down the VM using the OS tools.
  2. Create a backup copy of the VM disk.
  3. On a cluster node with a VM:

    1. Run commands:

      virt-rescue -a /path/to/disk
      Comments to the command
      gdisk /dev/sda
    2. In the interactive environment of the gdisk utility, perform the following steps:

      Command (? for help): x
      
      Expert command (? for help): z
      About to wipe out GPT on /dev/sda. Proceed? (Y/N): y
      GPT data structures destroyed! You may now partition the disk using fdisk or
      other utilities.
      Blank out MBR? (Y/N): n
      MBR is unchanged. You may need to delete an EFI GPT (0xEE) partition
      with fdisk or another tool.
      <rescue> exit
  4. Start the VM and check its operation. If there are any problems, restore the VM disk from backup and contact technical support.

The VM was rebooted while the sysprep utility was running

When creating a VM from an image, the sysprep utility is launched on it. If you reboot or shut down the VM before the utility finishes, the OS will display the message "Computer restarted unexpectedly or an unexpected error occurred. Unable to continue installing Windows".

To solve the problem, recreate the VM and wait for the initialization system to complete.

sysprep utility does not start

The problem may occur on Windows 10 and Windows 11 due to applications blocking the utility from running. See Microsoft documentation for more information.

To solve the problem:

  1. Find the application that is blocking the launch in the %WINDIR%\System32\Sysprep\Panther\setupact.log.
  2. Remove the application. Examples of commands:

    get-appxpackage -allusers -name "microsoft.Onedrivesync" | Remove-appxpackage
    get-appxpackage -allusers -name "microsoft.languageexperiencepacken-us" | Remove-appxpackage

Password does not meet Windows requirements

If the OS password does not meet the security requirements, the VM will be created with an error: 

"common.remote.CalledProcessError: Command exited with message ошибка: внутренняя ошибка: не удалось выполнить команду агента QEMU «guest-set-user-password»: failed to set password: The password does not meet the password policy requirements. Check the minimum password length, password complexity and password history requirements."

To solve the problem, increase the length and complexity of the password.