This article shows how to create a Hyper-V Windows Desktop OS image on your local Windows device and then convert it to a VHD image, which can then be uploaded to Amazon Workspaces Core, Azure, GCP, or used in a Hyper-V network.
Install Hyper-V
Follow the steps in the following Microsoft article to install Hyper-V on your local machine: Install Hyper-V.
Creating a VM on Hyper-V
Launch the Hyper-V manager.
Right Click on your local Windows device’s name and select “New.”

Follow the on-screen instructions.
Specify a name for your VM.


Choose “Generation 2”:

Assign a startup memory of 4 GB of RAM or more.

Specify “Default Switch” for internet access on VM.

Select “Attach a virtual hard disk later” and click on next

Confirm the summary and click “Finish.”

Click on the Settings tab on the right window of the VM you newly created.
Go to the Security tab.
Check on “Enable Secure Boot” and “Enable Trusted Platform Module”.
Leave the template settings to default which is “Microsoft Windows”.
Make sure you have done all the right settings and click on OK.

As an optional step you can reduce the number of virtual processors to two:

Select “SCSI Controller.”
Select “Hard Drive” and click “Add.”

Select “Hard Drive” and click “New.”

Under “Choose Disk Type,” Select “Fixed Size.”

Specify a name for your disk.

Provide 20GB hard disk or more.

Confirm the details in the summary and click “Finish.”

On the main window you will see the disk and its path.
Copy the path for future use.

Now we select a virtual DVD drive under “SCSI controller” and click “Add.” We will use it to boot the OS installation image.

Click on the “Image File” radio button, then click “Browse” and select the ISO image you want to install.
Click on “OK.”

Note the boot order under “Firmware.”
Put the DVD drive at the top of the boot order list by selecting DVD drive and clicking “Move Up.”
Click “OK.”

On the Actions window, click “Start” to boot the machine, then click “Connect” once it is up and running.
Follow the on-screen instructions from here and click on the screen to boot from DVD.

Choose the appropriate OS option and click “Next.”

Accept the license agreements and click “Next.”

Select “Custom: Install Windows only.”

Make sure there are no partitions allocated, then click “Next.”

The installation will take a few minutes.
Please monitor the installation procedure, as it might ask you for a few inputs like admin username, password, and so on.

Follow the next series of onscreen instructions and finish the installation.
Enabling Remote Connection
When the VM is running, connect to it and go to “Windows > Run > Remote Desktop Settings.”
Enable “Remote Desktop” by turning on the toggle as shown below.
Optional: Go to “Advanced Settings” and disable “Allow connections only from computers running Remote Desktop with Network Level Authentication (recommended).” This makes it easier to sign into your template during development. NLA is recommended in production.

Convert the disk into a VHD
Follow the instructions in the Microsoft’s Use Hyper-V Manager to convert the disk to convert the VHDX image to VHD format.
You now have a VHD-format template.
To import it to GCP, see
Related Documents
Microsoft article: Install Hyper-V.
Microsoft article Use Hyper-V Manager to convert the disk.
