---
title: "Configure Your Windows Server for the BYOI API in QCOW2"
description: "Learn how to set up your Windows virtual machine for compatibility with the BYOI API in QCOW2."
url: https://docs.us.ovhcloud.com/en/bare-metal-cloud/dedicated-servers/configure-windows-server-byoi-api-qcow2
lang: en
---
> For AI agents: the complete documentation index is available at https://docs.us.ovhcloud.com/en/llms.txt, the full documentation bundle is available at https://docs.us.ovhcloud.com/en/llms-full.txt.

# Configure Your Windows Server for the BYOI API in QCOW2

**Learn how to set up your Windows virtual machine for compatibility with the BYOI API in QCOW2.**

BYOI stands for Bring Your Own Image this is a common method for customers to bring their own pre-configured cloud-init capable ISO provided in QCOW2 or raw format to the OVHcloud environment.

 

## Requirements

- virtual software capable of running a Windows server ([Virtual Box](https://www.virtualbox.org/wiki/Downloads), [VMware Workstation](https://www.vmware.com/content/vmware/vmware-published-sites/us/products/desktop-hypervisor.html.html.html), etc.)
- [qemu-img](https://www.qemu.org/download/) for Windows or Linux
- a [Bare Metal Server](https://us.ovhcloud.com/bare-metal/)
- [Cloudbase-Init Installer](https://cloudbase.it/cloudbase-init/)

 

## Instructions

### Set up your virtual environment

Mount your Windows Server installation via your virtualization software and configure the virtual hardware to fit your needs.

Once configured and booted, you can install Windows updates, configure SSH, etc.

 

### Create your image

Download [Cloudbase-Init](https://cloudbase.it/cloudbase-init/), open the setup wizard, and click `Next`.

Accept `☑` the License Agreement and click `Next`.

Select your installation preferences and click `Next`.

Choose a username, check the box `☑` to enable the Cloudbase-Init service to run as LocalSystem, and click `Next`.

Select `Install` on the next screen.

Check the boxes `☑` to _Run Sysprep to create a generalized image_ and to _Shutdown when Sysprep terminates_, then click `Finish`.

 

### Convert your image

Once your VM has shut down, you can use qemu-img - a powerful and simple tool - to convert your image to QCOW2 format.

**Tip:**

Click each tab for your operating system.

#### Windows

1. Download qemu-img using [this link](https://cloudbase.it/qemu-img-windows/).
2. Open PowerShell and navigate to the qemu-img.exe.
3. We recommend copying an extract of the qemu-img download contents to the directory of the source image.
   ```
   qemu-img -h
   ```
4. Convert your source image to dest.qcow2 using the command below, where `-O` is the output format.
   ```
   qemu-img.exe convert source.vmdk -O qcow2 dest.qcow2
   ```

#### Linux

1. Download qemu-img using the following command:
   ```
   apt install qemu
   ```
2. We recommend copying an extract of the qemu-img download contents to the directory of the source image.
   ```
   qemu-img --help
   ```
3. Convert your source image to dest.qcow2 using the command below, where `-O` is the output format.
   ```
   qemu-img.exe convert source.vmdk -O qcow2 dest.qcow2
   ```

After converting your image, you are now ready to self-host and use BYOI to install via the link. More information can be found in [this guide](https://docs.us.ovhcloud.com/en/bare-metal-cloud/dedicated-servers/bring-your-own-image.md).

 

## Go further

Browse all the [Dedicated Servers guides](https://docs.us.ovhcloud.com/en/bare-metal-cloud/dedicated-servers/landing-page-dedicated-servers.md).

Browse the rest of the [OVHcloud US documentation](https://docs.us.ovhcloud.com/en/index.md) for guides on our other products and services.

Learn more about [Dedicated Servers](https://us.ovhcloud.com/bare-metal/) on the OVHcloud US website.

### Other resources:

- [Vinchin - Convert vmdk to qcow2](https://www.vinchin.com/vm-migration/convert-vmdk-to-qcow2.html)
- [Microsoft Windows activation keys](https://learn.microsoft.com/en-us/windows-server/get-started/kms-client-activation-keys?tabs=server2022%2Cwindows10ltsc%2Cversion1803%2Cwindows81)
- [https://www.phillipsj.net/posts/building-a-windows-server-qcow2-image/](https://www.phillipsj.net/posts/building-a-windows-server-qcow2-image/)
