Deploying Windows Server on InMotion Cloud
Introduction
Windows Server workloads can run on OpenStack, but the deployment process differs from Linux instances. Unlike Linux images that come pre-configured for cloud environments, Windows images require preparation with specific drivers and initialization tools before they work properly in OpenStack.
This guide walks through preparing a Windows Server image, uploading it to OpenStack, and launching Windows instances with proper driver and network configuration.
Prerequisites
Before deploying Windows on OpenStack, ensure you have:
- A valid Windows Server ISO (2022 or 2025)
- Access to your OpenStack environment (Horizon or CLI)
- A local virtualization environment (virt-manager, VirtualBox, or similar) for image preparation
- The VirtIO driver ISO for Windows
- Sufficient quota for compute resources (Windows requires more resources than typical Linux instances)
Download Required Files
Windows Server Evaluation ISO Download from Microsoft's Evaluation Center:
- Windows Server 2022: Microsoft Evaluation Center
- Windows Server 2025: Microsoft Evaluation Center
VirtIO Drivers ISO Download the stable VirtIO drivers for Windows from the Fedora Project:
Step 1: Build the Windows Image Locally
OpenStack does not support booting directly from an ISO like traditional hypervisors. You must create a pre-installed Windows image in QCOW2 format.
Create a Virtual Machine
Using virt-manager or a similar tool:
- Create a new virtual machine
- Attach both the Windows Server ISO and the VirtIO ISO
- Configure the virtual hardware:
- Disk bus: VirtIO (critical for performance)
- Network adapter: VirtIO
- Disk size: At least 40 GB
- RAM: At least 4 GB for installation
- Firmware: UEFI (recommended for Windows Server 2022/2025)
Install Windows Server
During the Windows installation:
- When prompted to select a disk, no drives will appear (VirtIO drivers are not included in Windows by default)
- Click Load driver
- Browse to the VirtIO ISO
- Navigate to
viostor\2k22\amd64(or the appropriate folder for your Windows version) - Select the VirtIO SCSI driver and click Next
- The disk now appears in the installer
- Complete the Windows installation normally
Install Additional VirtIO Drivers
After Windows boots:
- Open Device Manager
- Locate any devices with missing drivers (yellow warning icons)
- Right-click each device and select Update driver
- Browse to the VirtIO ISO and install:
- Network adapter (NetKVM):
NetKVM\2k22\amd64 - Balloon driver (memory optimization):
Balloon\2k22\amd64 - QEMU Guest Agent:
guest-agentfolder
Install CloudBase-Init
CloudBase-Init is the Windows equivalent of cloud-init. It handles:
- Administrator password configuration
- Network configuration via DHCP
- Hostname assignment
- SSH key injection (optional)
- Download CloudBase-Init from cloudbase.it
- Run the installer
- During setup, configure:
- Username: Administrator
- Serial port for logging: COM1
- Run Sysprep: Yes (select this option)
- Shutdown: Yes
When CloudBase-Init finishes, it runs Sysprep automatically and shuts down the VM, leaving you with a generalized image ready for OpenStack.
Verify the Image File
Locate the disk image file created by your virtualization tool. It may be in:
/var/lib/libvirt/images/(Linux with libvirt)~/VirtualBox VMs/(VirtualBox)
If the image is not in QCOW2 format, convert it:
1qemu-img convert -f raw -O qcow2 windows.raw windows.qcow2
Step 2: Upload the Image to OpenStack
Using OpenStack CLI
Upload the prepared Windows image with the required properties:
1openstack image create "Windows-Server-2025" \2 --file windows2025.qcow2 \3 --disk-format qcow2 \4 --container-format bare \5 --property os_type=windows \6 --property hw_disk_bus=virtio \7 --property hw_vif_model=virtio \8 --property hw_firmware_type=uefi \9 --min-disk 40 \10 --min-ram 4096
Property explanations:
| Property | Purpose |
|---|---|
| `os_type=windows` | Identifies the image as Windows for proper handling |
| `hw_disk_bus=virtio` | Uses VirtIO for disk I/O (required since drivers are installed) |
| `hw_vif_model=virtio` | Uses VirtIO for network interface |
| `hw_firmware_type=uefi` | Boots using UEFI firmware |
| `--min-disk 40` | Prevents launching on volumes smaller than 40 GB |
| `--min-ram 4096` | Prevents launching with less than 4 GB RAM |
Using Horizon
- Navigate to Project > Compute > Images
- Click Create Image
- Enter the image details:
- Name: Windows-Server-2025
- Image Source: File
- Image File: Select your QCOW2 file
- Format: QCOW2
- Minimum Disk: 40 GB
- Minimum RAM: 4096 MB
- Expand Custom Properties and add:
os_type=windowshw_disk_bus=virtiohw_vif_model=virtiohw_firmware_type=uefi
- Click Create Image
Image upload time depends on file size and network speed. A typical Windows image is 10 to 15 GB.
Step 3: Configure OpenStack Resources
Before launching a Windows instance, verify your environment is ready.
Network Requirements
Ensure your network has:
- DHCP enabled: CloudBase-Init relies on DHCP for initial network configuration
- DNS configured: Windows requires DNS for domain operations and updates
Security Group Rules
Create or update a security group to allow Remote Desktop Protocol (RDP) access:
1openstack security group create windows-rdp --description "RDP access for Windows"2openstack security group rule create --protocol tcp --dst-port 3389 --remote-ip 0.0.0.0/0 windows-rdp
For production environments, restrict the source IP range to your organization's network instead of 0.0.0.0/0.
Recommended Flavor
Windows Server requires more resources than most Linux distributions:
| Resource | Minimum | Recommended |
|---|---|---|
| vCPUs | 2 | 4 |
| RAM | 4 GB | 8 GB |
| Disk | 40 GB | 60 GB |
Select a flavor that meets at least the minimum requirements. Using undersized flavors results in poor performance or failed boots.
Step 4: Launch the Windows Instance
Using OpenStack CLI
1openstack server create \2 --image Windows-Server-2025 \3 --flavor m2.medium \4 --network private-net \5 --security-group default \6 --security-group windows-rdp \7 win2025-instance
Note: Windows instances do not use SSH key pairs. Authentication uses the Administrator password set during first boot.
Using Horizon
- Navigate to Project > Compute > Instances
- Click Launch Instance
- Configure the instance:
- Details: Enter a name (e.g.,
win2025-instance) - Source: Select your Windows image
- Flavor: Choose a flavor with at least 4 GB RAM and 2 vCPUs
- Networks: Select your network (must have DHCP)
- Security Groups: Add
defaultandwindows-rdp
- Skip the Key Pair tab (not used for Windows)
- Click Launch Instance
Step 5: First Boot Configuration
Windows instances take longer to boot than Linux instances, typically 3 to 5 minutes for first boot.
Access the Console
- Navigate to Project > Compute > Instances
- Click on your Windows instance name
- Select the Console tab
- Wait for Windows to complete initial setup
Set the Administrator Password
CloudBase-Init prompts for the Administrator password on first boot via the console. If you configured CloudBase-Init to generate a random password, retrieve it from the instance console log:
1openstack console log show win2025-instance | grep -i password
Connect via RDP
Once Windows is running:
- Note the instance IP address from the Instances list
- If external access is needed, associate a floating IP
- Connect using an RDP client:
- Windows: Remote Desktop Connection (
mstsc.exe) - Linux: Remmina, FreeRDP, or similar
- macOS: Microsoft Remote Desktop
1# Linux example using xfreerdp2xfreerdp /u:Administrator /v:INSTANCE_IP
Troubleshooting
No Network Connectivity
Symptoms: Instance boots but has no IP address or cannot reach the network.
Solutions:
- Verify VirtIO network drivers are installed in the image
- Confirm DHCP is enabled on the subnet
- Check security group rules allow necessary traffic
- View the console log for CloudBase-Init errors:
1 openstack console log show win2025-instance
Cannot Connect via RDP
Symptoms: Instance is running but RDP connection fails.
Solutions:
- Verify security group allows TCP port 3389 from your IP
- Confirm Remote Desktop is enabled in Windows (it is enabled by default with CloudBase-Init)
- Check Windows Firewall settings via the console
- If using a floating IP, verify it is properly associated
Instance Fails to Boot
Symptoms: Instance goes to ERROR state or stays in BUILD indefinitely.
Solutions:
- Verify the image has correct properties set (
hw_firmware_type=uefiif image was built with UEFI) - Check that VirtIO storage drivers are installed in the image
- Ensure the flavor provides at least 4 GB RAM
- Review the instance fault message:
1 openstack server show win2025-instance -f value -c fault
Blue Screen During Boot
Symptoms: Windows displays a blue screen error during boot.
Solutions:
- This typically indicates missing VirtIO drivers
- Rebuild the image ensuring VirtIO storage and network drivers are installed before Sysprep
- Verify the disk bus and NIC model image properties match what was used during image creation
Windows Licensing
Windows Server in OpenStack requires proper licensing. Options include:
- Evaluation licenses: Valid for 180 days, suitable for testing
- Retail or Volume licenses: Provide your own license keys
- BYOL (Bring Your Own License): Use existing Windows Server licenses with License Mobility through Software Assurance
Consult Microsoft licensing documentation or your Microsoft representative for licensing requirements in cloud environments.
Performance Optimization
For optimal Windows performance on OpenStack:
- Use VirtIO drivers: Always use VirtIO for disk and network (already configured in this guide)
- Disable unnecessary services: Turn off services not needed for your workload
- Configure power plan: Set to High Performance in Windows power options
- Regular updates: Keep Windows and VirtIO drivers updated
- Monitor resources: Use Windows Performance Monitor or OpenStack metrics to track utilization
Summary
Deploying Windows Server on OpenStack requires:
- Building a prepared image with VirtIO drivers and CloudBase-Init
- Uploading the image with correct properties
- Configuring security groups for RDP access
- Using appropriate flavor sizes (minimum 4 GB RAM, 2 vCPUs)
- Setting the Administrator password on first boot
Once the image is properly prepared, subsequent Windows deployments follow the same process as Linux instances, with the primary difference being RDP access instead of SSH.