Creating a Golden Image

Creating an XML answer file

Before creating a virtual machine image for deployment, you need to prepare an answer file that will help you skip the out-of-the-box experience (OOBE) when deploying Parallels Desktop with Windows virtual machines. To do that:

  1. Download the sample file linked above and open it in any text editor, ideally with syntax highlighting.

  2. For the purposes of Single Application Mode setup, keep the user account passwordless, so that the users don't have to log in and thus interact with Windows. Make sure to also enable Autologon under the respective section.

  3. Make sure to change the admin password.

  4. If your company does not run a KMS server for automatic Windows activation, change the SkipAutoActivation parameter to false, and remove or comment out the ProductKey section. If you do have a running KMS server, the generic volume license keys for various versions of Windows can be found here.

  5. Save the file.

Creating a Windows virtual machine image

Next, you need to prepare a virtual machine image for distribution, using a Mac with an installed copy of Parallels Desktop.

  1. In Parallels Desktop's Control Center, use the + button in the top-right corner to create a new virtual machine.

  2. Download an enterprise ISO file from your Microsoft Admin Center.

  3. Use the Install Windows [...] from an image file option to create a Windows machine from the downloaded enterprise ISO file. Make sure to check the Install operating system manually box as described here.

  4. It is recommended to use the Productivity profile for this installation.

  5. At the OOBE stage of Windows installation, use the keyboard shortcut Ctrl+Shift+F3 to enter Audit mode, which is designed to allow you to bypass creating a user account and log in as administrator in order to install the latest updates, drivers, or extra software and configure various preferences in advance.

  6. Once logged in in Audit mode, install Parallels Tools by clicking on Actions -> Install Parallels Tools in the Mac menu bar as directed here. Among other things, it'll enable you to copy and paste from the clipboard between your Mac and the Windows virtual machine.

  7. For Sysprep to work correctly, make sure BitLocker is disabled. First, check its status using the following command by opening the Windows command shell (Win + R) and executing the following command: manage-bde -status C:. If the status is Unlocked, leave it as is. Otherwise, use the following command: manage-bde -off C:.

  8. Install all the updates, drivers, and apps that your users may need, paying attention to the following:

    • Do not install apps from the Microsoft Store.

    • In this guide's principal scenario of Single Application Mode, deployment of additional applications via Intune is not supported.

    • Make sure that the required app is installed for all Windows users in C:\Program Files\ or C:\Program Files (x86)\, and not in any of the user-specific folders.

    • Keeping in mind the need to activate the app, find a way to automate the activation process.

  9. Find the Windows application's .exe file in C:\Program Files\ or C:\Program Files (x86)\, right-click on it, and use the Pin to Start menu option.

  10. One of the crucial steps for enabling the Single Application Mode experience is ensuring that the default browser for your Windows virtual machine is a Mac browser available on all the machines targeted for deployment, like Safari. In Windows 11, launch the Settings app and choose Apps -> Default apps. There, use the Search apps bar to locate the {browser_name} (Mac) app, click on it, and choose the Set default option.

  11. Remove as many unnecessary apps from Windows as possible, making sure to keep Parallels Tools for Windows and Notepad intact.

  12. Embed the provisioning package and the answer file by taking the following steps:

    1. Copy the answer.xml file to C:\Windows\Setup.

    2. [OPTIONAL] If you plan on enrolling the virtual machines into Intune, copy the provisioning package IntuneEnrollment.ppkg file to C:\Windows\Setup as well.

    3. In the same C:\Windows\Setup folder, create a subfolder C:\Windows\Setup\Scripts.

    4. [OPTIONAL] In a text editor (e.g., Notepad), paste the following contents, and save the file as SetupComplete.cmd in the C:\Windows\Setup\Scripts folder: @echo off start /wait %windir%\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive -ExecutionPolicy Bypass Install-ProvisioningPackage -PackagePath C:\Windows\Setup\Scripts\IntuneEnrollment.ppkg -QuietInstall Erase C:\Windows\Setup\Scripts\answer.xml This will trigger the execution of the provisioning package during the Windows installation process, as the machine will be deployed to end-users. The last line of the script deletes the answer file once the setup is complete.

    5. In a text editor (e.g., Notepad), paste the following contents, and save the file as ErrorHandled.cmd in the C:\Windows\Setup\Scripts folder: Erase C:\Windows\Setup\Scripts\answer.xml This will delete the answer file in case the setup process crashes with a critical error.

  13. Create a snapshot of this state of the Windows VM by choosing Actions -> + Take Snapshot from the Mac's menu bar.

  14. Perform the sysprep procedure by running the following command in the Windows command shell (Win + R): C:\Windows\System32\Sysprep\Sysprep.exe /unattend:C:\Windows\Setup\Scripts\answer.xml /oobe /generalize /shutdown Executing this command will generalize the image (i.e., strip it of specific IDs) and shut the virtual machine down. To learn more about the Sysprep procedure, refer to this section of our KB article.

  15. Create another snapshot of this state of the Windows VM by choosing Actions -> + Take Snapshot from the Mac's menu bar.

  16. Start the virtual machine and test for the following:

    1. The required app is installed successfully.

    2. Parallels Tools for Windows are installed.

    3. [OPTIONAL] Intune enrollment status by checking your corporate resources or whether the Windows instance reports itself to the management portal.

  17. Then:

    • If the test is successful:

      1. Revert the machine to the previous snapshot of the sysprepped state (see step 15. above).

      2. Shut it down.

      3. Rename it in the Name section of the General tab of its settings to something like Base_VM. Keep it around for potential further updates and modifications.

      4. Clone it by right-clicking on it in the Control Center and choosing Clone.

      5. Rename the cloned VM to something like Deployment_VM.

      6. Start the new cloned VM (Deployment_VM) and sysprep it.

      7. To reduce its size, remove the snapshots from the new cloned VM (Deployment_VM) by right-clicking on it in the Control Center and choosing Manage Snapshots.

    • If the test is unsuccessful:

      1. Revert the machine to the previous snapshot.

      2. Verify and, if necessary, update the settings.

      3. Repeat the test.

  18. Configure the settings of the deployment virtual machine (Deployment_VM). Right-click on it in the Parallels Desktop Control Center, click Configure, and make sure to make the following modifications:

    1. [OPTIONAL] If you would like to control the updates using MDM scripts, disable the automatic updates of Parallels Tools for Windows by going to Options -> More Options and unchecking the Update Parallels Tools automatically checkbox. Otherwise, keep the checkbox on.

    2. To enable the Single Application Mode experience, go to Options -> Startup and Shutdown and select the Always ready in background option.

    3. [RECOMMENDED] Unless necessary for your usage scenario, go to the Hardware tab and remove the Sound & Camera section by clicking on it and using the - button.

    4. [RECOMMENDED] Review the sharing settings in the Options -> Sharing and Options -> Applications panes and uncheck the ones your usage scenario does not require. For the Single Application Mode experience, remember to keep the Share Mac applications with Windows option active.

  19. Once all the settings have been introduced, right-click on the deployment virtual machine (Deployment_VM) and select the Prepare for Transfer option to convert it to a .pvmp file ready for inclusion in the deployment package.

Last updated