Create a Windows Virtual Machine from an ISO
Overview
This guide outlines the process of deploying a Windows virtual machine (VM) directly from an ISO using Private Cloud Director. Traditionally, Windows VMs required manual installation outside the cloud environment, followed by conversion and uploading of the disk image. This streamlined approach eliminates those steps by allowing users to install Windows directly from an ISO, configure necessary drivers, and create a reusable "golden image" for future deployments. By following this guide, you can simplify Windows VM provisioning within PCD while ensuring consistency and efficiency across deployments.
Prerequisites
Private Cloud Director Environment:
- Access to PCD environment with Block Storage configured.
- Appropriate permissions to create images, volumes, and virtual machines.
Command Line Tools:
- PCD CLI - pcdctl or OpenStack CLI version 6.3.0 or greater
Required Files:
Windows Installation ISO:
- A valid Windows ISO (e.g., Windows Server 2012, 2016, 2019, 2022, Windows 10, etc.)
VirtIO Driver ISO:
- Windows requires VirtIO drivers for better performance on a Linux (QEMU-KVM) hypervisor.
- Download the latest stable VirtIO driver ISO from the Fedora VirtIO repository.
- This ISO contains drivers for storage, networking, and other virtual devices required during Windows installation.
Step 1: Upload Images
1.1 Upload Windows Installation ISO
Use the following command to upload the Windows ISO (e.g., Windows Server 2012, 2016, 2019, 2022, Windows 10, etc.) to the PCD Image service:
openstack image create "windows-installation-iso" --os-interface admin --insecure \
--disk-format iso \
--container-format bare \
--file /path/to/windows-installation.iso \
--property hw_boot_menu=True \
--property hw_cdrom_bus=sata \
--property hw_disk_bus=scsi \
--property hw_firmware_type=uefi \
--property hw_machine_type=q35 \
--property hw_scsi_model=virtio-scsi \
--property os_secure_boot=required \
--property os_type=windows
1.2 Upload VirtIO Driver ISO
Use the following command to upload the VirtIO driver ISO file to the PCD Image service:
openstack image create "virtio-driver-iso" --os-interface admin --insecure \
--disk-format iso \
--container-format bare \
--file /path/to/virtio-win.iso
Step 2: Create Volumes
Create the following volumes to proceed:
If a volume type is not specified, Private Cloud Director will use the __DEFAULT__
type. Should you want to store these volumes on block storage, add --type <volume-type>
to the end of the volume create
commands.
2.1 Create Installation Media Volume
Acts as the bootable volume containing the Windows installation media.
openstack volume create --image windows-installation-iso --size 10 --bootable windows-installation-volume --insecure
2.2 Create VirtIO Driver Media Volume
Provides VirtIO drivers during Windows installation.
openstack volume create --image virtio-driver-iso --size 2 virtio-driver-volume --insecure
2.3 Create Windows OS Target Volume
Target disk where Windows will be installed.
openstack volume create --size 30 --bootable windows-os-target-volume --insecure
Step 3: Create the VM
This step creates a virtual machine using the previously created volumes. The VM will:
- Boot from the Windows installation ISO (device_type=cdrom): Allows the VM to load the Windows installer.
- Attach the VirtIO driver ISO (device_type=cdrom): Provides essential drivers during the installation process.
- Use the target volume as the Windows installation disk (device_type=disk): Serves as the destination for the Windows OS installation.
The properties specified in the command ensure the VM boots correctly and remains compatible with the Windows installation requirements.
3.1 Launch the VM Using Created Volumes
openstack server create --insecure --flavor m1.xlarge --network <NETWORK_NAME_OR_UUID> \
--block-device source_type=volume,uuid=$(openstack volume show windows-installation-volume -f value -c id --insecure),destination_type=volume,device_type=cdrom,boot_index=0 \
--block-device source_type=volume,uuid=$(openstack volume show virtio-driver-volume -f value -c id --insecure),destination_type=volume,device_type=cdrom,boot_index=-1 \
--block-device source_type=volume,uuid=$(openstack volume show windows-os-target-volume -f value -c id --insecure),destination_type=volume,device_type=disk,boot_index=1 \
--property hw_firmware_type=uefi --property hw_machine_type=q35 --property os_secure_boot=disabled \
--property hw_boot_menu=True --property hw_video_model=qxl <vm-name>
- Replace
<NETWORK_NAME_OR_UUID>
with the appropriate network name or UUID in your environment.- Replace
<vm-name>
with the desired name for your VM.- The
openstack volume show
commands reference the previously created volumes to ensure correct attachment.
Step 4: Configure the VM
4.1 Initial Boot Process
- Access the VM console from the PCD UI.
- Press Enter
- Select "Boot Manager" and press Enter.

- Select UEFI QEMU QEMU CD-ROM from the Boot Manager and press Enter.

- Press any key to boot from CD. The Windows installer should load. (This is only necessary during the first boot.)


__
4.2 Installing VirtIO drivers
- Follow the Windows installation wizard.
- Load VirtIO Drivers:
- Click Browse when prompted for storage drivers.
- Navigate to the VirtIO driver ISO identified by the Windows version you are installing (e.g.,
D:\amd64\2k19
). - Select and install the appropriate driver.


4.3 Disable Secure Boot and VTPM (Mandatory step for Windows 11 onwards)
Windows 11 installer mandates the use of VirtualTPM during install. The following steps help disable these checks so that Windows 11 can be installed.
While on the OS selection page press Shift+F10
The command prompt should open. Type
regedit
and hit enter to start the registry editor.In registry editor, navigate to
HKEY_LOCAL_MACHINE > SYSTEM > Setup
folderCreate a new key under it called
Labconfig
Under the
Labconfig
key, create the following 2 entries of type REG_DWORD with values set to 1BypassTPMCheck
BypassSecureBootCheck
Close the regedit and command line tools and proceed with windows install.


4.4 Install Network & Other Required Drivers
After the windows installation has completed, install necessary drivers.
- Open Device Manager.
- Right-click Ethernet Controller → Update Driver Software.
- Select the VirtIO path (e.g.,
E:\NetKVM\2k16\
). - Complete the driver installation.
- Repeat as needed for remaining devices in Device Manager.
4.5 Install Cloudbase-Init
- Download and Run Cloudbase-Init to enable automated configurations for future VMs, as Private Cloud Director uses this to set the initial Administrator password during VM deployment.
- Select the option to run Sysprep for creating a generalized golden image.
- Allow the VM to power off automatically upon completion.

Step 5: Convert the VM into a Golden Image
5.1 Detach the Installation Volume
Detach the windows-os-target-volume
, which contains the installed OS, to prepare it for upload as a Glance image.
openstack server remove volume <vm-name> windows-os-target-volume
Note: The VM can be deleted after detaching the volume, as its primary purpose was to prepare the Windows image.
5.2 Create a Glance image from the installation volume
openstack --os-interface admin --insecure image create "<windows-image-name>" --disk-format raw --volume windows-os-target-volume
5.3 Set Image properties
The following properties are required in order for the VM to boot properly.
openstack --os-interface admin --insecure image set <windows-image-name> \
--property hw_boot_menu=True \
--property hw_cdrom_bus=sata \
--property hw_disk_bus=scsi \
--property hw_firmware_type=uefi \
--property hw_machine_type=q35 \
--property hw_scsi_model=virtio-scsi \
--property os_secure_boot=required \
--property os_type=windows
A reusable golden image is created for future Windows VM deployments.
With the golden image created, new VMs can be deployed quickly without repeating the installation process.
Step 6: Deploy a VM from the golden image
Please refer to the Deploy VMs on your Virtualized Cluster guide to deploy a VM with the new golden image.