2. Preparing Windows Images¶
Before you can provide remote desktops, you may want to prepare an image to quickly deploy multiple identical remote desktops from it. In general, you can prepare Microsoft Windows cloudbase QCOW2 images (“templates” in Virtuozzo Hybrid Infrastructure terminology) as described in the Virtuozzo Hybrid Infrastructure Administrator’s Guide.
The next section describes in more detail how to prepare a Microsoft Windows 10 image.
2.1. Preparing Windows 10 Images¶
To prepare a Microsoft Windows 10 image, do the following:
Obtain a distribution image of Microsoft Windows 10 v1909 or newer and upload it to Virtuozzo Hybrid Infrastructure. For details, see the Virtuozzo Hybrid Infrastructure Administrator’s Guide.
Create a reference VM based on the uploaded image. For details, see the Virtuozzo Hybrid Infrastructure Administrator’s Guide.
Start the reference VM and open its console from the VM details pane or the context menu. Perform the next steps from inside the VM.
Complete Windows installation.
Install the updates.
Install Cloudbase-Init in the VM. Perform steps 1 to 5 from the Virtuozzo Hybrid Infrastructure Administrator’s Guide. Do not stop the VM at this point.
Optimize the system for better performance. For example, with this optimization tool.
Install Virtuozzo guest tools. See the Virtuozzo Hybrid Infrastructure Administrator’s Guide.
Optionally, if you need to use random desktops, install FSLogix Agent and configure Profile Container as described in the official documentation.
Install user applications: messengers, office programs, and such.
Create an answer file for the Sysprep tool. One of the ways to do it is provided further. Perform these steps on a machine with the same version of Windows as the reference VM. For example, if you are preparing a Windows 10 v1909 image, perform these steps on machine running Windows 10 v1909 as well.
Mount the distribution image of Microsoft Windows 10 and copy its contents to a writable folder, e.g., on disk C:.
Download the Windows Assessment and Deployment Kit. Install only the Deployment Tools from it.
Launch the Windows System Image Manager installed with the Deployment Tools.
Click File > New Answer File. You will be asked to provide a Windows image. Choose the
sources\install.wimfile from the folder with the distribution image contents.
If you do not have a catalog file, create one as offered.
Once a new answer file is loaded, configure its keys:
Create a new account in
And set a password for it:
Save the answer file. It may resemble this sample.
Copy the answer file to the reference VM.
Prepare Windows with Sysprep, using the answer file. For more details, see its documentation. Inside the reference VM, from the console, run:
> C:\Windows\System32\Sysprep\sysprep.exe /oobe /generalize /unattend:C:\answerfile.xml
C:\answerfile.xmlis the path to your answer file.
After the process completes, the reference VM will shut down.
Now you can create the image that you will deploy remote desktops from. Click the reference VM to open its details. Click the bootable volume to open its details. In the volume details, Click Create image. The volume will be converted to an image and show up in Virtual machines > Images.
You can now create VMs from the prepared image.