Windows VM Create Issue

Please, describe the problem here and provide additional information below (if applicable) …
When Create VM image in Windows it shows like:
DEPLOY: error: Failed to create domain from /var/lib/one//datastores/0/67/deployment.0 error: unsupported configuration: target must be 0 for sata controller Could not create domain from /var/lib/one//datastores/0/67/deployment.0 ExitCode: 255

Versions of the related components and OS (frontend, hypervisors, VMs):
OS: Ubuntu 22.04
Hypervisors: Opennebula 6.6.3
VM: Windows Server 2022

Steps to reproduce:
Everything done correctly as per documentation:
https://support.opennebula.pro/hc/en-us/articles/360042898271-How-to-Build-an-Image-for-Windows-Virtual-Machines
Template:
CONTEXT = [
NETWORK = “YES”,
SSH_PUBLIC_KEY = “$USER[SSH_PUBLIC_KEY]” ]
CPU = “4”
DISK = [
IMAGE = “Windows 2022 ISO”,
IMAGE_UNAME = “oneadmin” ]
DISK = [
IMAGE = “Virtio Windows Drivers ISO”,
IMAGE_UNAME = “oneadmin” ]
DISK = [
IMAGE = “ONE Windows Context ISO”,
IMAGE_UNAME = “oneadmin” ]
DISK = [
DEV_PREFIX = “vd”,
IMAGE = “Windows 2022”,
IMAGE_UNAME = “oneadmin”,
TARGET = “0” ]
GRAPHICS = [
LISTEN = “0.0.0.0”,
TYPE = “VNC” ]
HOT_RESIZE = [
CPU_HOT_ADD_ENABLED = “NO”,
MEMORY_HOT_ADD_ENABLED = “NO” ]
INPUT = [
BUS = “usb”,
TYPE = “tablet” ]
MEMORY = “16384”
MEMORY_RESIZE_MODE = “BALLOONING”
MEMORY_UNIT_COST = “MB”
NIC = [
NETWORK = “Ajax-ExternalNEW”,
NETWORK_UNAME = “oneadmin”,
SECURITY_GROUPS = “0” ]
NIC_DEFAULT = [
MODEL = “virtio” ]
OS = [
BOOT = “disk0”,
FIRMWARE = “”,
FIRMWARE_SECURE = “YES”,
SD_DISK_BUS = “sata” ]
VCPU = “4”
Current results:
Error Mentioned Below
Expected results:

Remove the TARGET parameter from this section

Remove the SD_DISK_BUS parameter from this section

Try again.

Note that this is the reference template mentioned in that Knowledge Base article

MEMORY = "16384"
MEMORY_UNIT_COST = "MB"
CPU = "4"
VCPU = "4"

DISK = [
  IMAGE = "Windows 10 ISO",
  IMAGE_UNAME = "oneadmin" ]
DISK = [
  IMAGE = "Virtio Windows Drivers ISO",
  IMAGE_UNAME = "oneadmin" ]
DISK = [
  IMAGE = "ONE Windows Context ISO",
  IMAGE_UNAME = "oneadmin" ]
DISK = [
  DEV_PREFIX = "vd",
  IMAGE = "Windows 10",
  IMAGE_UNAME = "oneadmin" ]

NIC = [
  NETWORK = "vnet",
  NETWORK_UNAME = "oneadmin",
  SECURITY_GROUPS = "0" ]
NIC_DEFAULT = [
  MODEL = "virtio" ]

GRAPHICS = [
  LISTEN = "0.0.0.0",
  TYPE = "VNC" ]

INPUT = [
  BUS = "usb",
  TYPE = "tablet" ]

OS = [
  BOOT = "disk0" ]

Hi,
With this template:
CONTEXT = [
NETWORK = “YES”,
SSH_PUBLIC_KEY = “$USER[SSH_PUBLIC_KEY]” ]
CPU = “4”
DISK = [
IMAGE = “Windows 2022 ISO”,
IMAGE_UNAME = “oneadmin” ]
DISK = [
IMAGE = “Virtio Windows Drivers ISO”,
IMAGE_UNAME = “oneadmin” ]
DISK = [
IMAGE = “ONE Windows Context ISO”,
IMAGE_UNAME = “oneadmin” ]
DISK = [
DEV_PREFIX = “vd”,
IMAGE = “Windows 2022”,
IMAGE_UNAME = “oneadmin” ]
GRAPHICS = [
LISTEN = “0.0.0.0”,
TYPE = “VNC” ]
HOT_RESIZE = [
CPU_HOT_ADD_ENABLED = “NO”,
MEMORY_HOT_ADD_ENABLED = “NO” ]
INPUT = [
BUS = “usb”,
TYPE = “tablet” ]
MEMORY = “8192”
MEMORY_RESIZE_MODE = “BALLOONING”
MEMORY_UNIT_COST = “MB”
NIC_DEFAULT = [
MODEL = “virtio” ]
OS = [
BOOT = “disk0” ]
VCPU = “4”

I got this error when installing OS:

Did you install the VirtIO drivers from the ISO prior to installing Windows on the Virtio BUS disk ?

Hi,
For that thing only i attach SATA for SDA bus driver and install also VirtIO.


But after that only i mentioned above error.

The problem is that your Operating System is not able to handle the virtual hardware that is being presented to it. You need to make sure the proper drivers are installed or use an emulated device which the OS can handle by default.

This is not an OS issue

it in this situation (SATA only setup, more than one SATA disk, Q35 model) we get this:

            <emulator><![CDATA[/opt/components/qemu/bin/qemu-system]]></emulator>
            <disk type='file' device='disk'>
                    <source file='/var/lib/one//datastores/0/139/disk.0'/>
                    <target dev='sda' bus='sata'/>
                    <boot order='1'/>
                    <driver name='qemu' type='raw' cache='writeback' discard='unmap'/>
                    <address type='drive' controller='0' bus='0' target='0' unit='0'/>
            </disk>
            <disk type='file' device='disk'>
                    <source file='/var/lib/one//datastores/0/139/disk.1'/>
                    <target dev='sdb' bus='sata'/>
                    <driver name='qemu' type='raw' cache='unsafe' discard='unmap'/>
                    <address type='drive' controller='0' bus='0' target='1' unit='0'/>
            </disk>

QEMU would like OpenNebula to instead create this:

            <emulator><![CDATA[/opt/components/qemu/bin/qemu-system]]></emulator>
            <disk type='file' device='disk'>
                    <source file='/var/lib/one//datastores/0/139/disk.0'/>
                    <target dev='sda' bus='sata'/>
                    <boot order='1'/>
                    <driver name='qemu' type='raw' cache='writeback' discard='unmap'/>
                    <address type='drive' controller='0' bus='0' target='0' unit='0'/>
            </disk>
            <disk type='file' device='disk'>
                    <source file='/var/lib/one//datastores/0/139/disk.1'/>
                    <target dev='sdb' bus='sata'/>
                    <driver name='qemu' type='raw' cache='unsafe' discard='unmap'/>
                    <address type='drive' controller='1' bus='0' target='0' unit='0'/>
            </disk>

You can reproduce this by making a VM with one SATA disk (will work), then adding poweroff and adding another. It’ll expose the error like this:

Wed Nov 5 05:01:51 2025: DEPLOY: No nodes found in /var/log/one/one-139.xml error: Failed to create domain from /var/lib/one//datastores/0/139/deployment.3 error: unsupported configuration: target must be 0 for sata controller Could not create domain from /var/lib/one//datastores/0/139/deployment.3 ExitCode: 1

cannot be fixed or circumvented once you need two SATA devices. If you manually edit the deployment file, start the VM using virsh create deployment.x it’ll work, then you still need to kick it a bit with recover → failure, in such a way that the VM it’ll be in RUNNING state instead.

(note this is of course non-persistent and just for debugging, as it’ll be overwritten)

note: technically, this is still wrong. It’s an issue with Sunstone offering a configuration which is then later generated but invalid. Once someone selects the “SATA” bus type, sda/sdb/sdc need to be translated to virtual controller 0,1,2 or whatever makes KVM happy. (increment controller ID instead of incrementing target). Can’t be helped and needs to work, esp. since there’s no emulated SAS/SATA HBA or NVMe.

It needs to be possible to create a clean Q35 VM without context ISO, but SATA disks (multiple) plus SATA ISO file, and/or one with SATA context ISO. If it works by now, fine.

It’s a recurring issue when you want to avoid running with emulated IDE disks (and you should). Matters especially for nested ESXi, IDE perf overhead being ca. 2000%.

The second issue with the incompatible disk IIRC is from not booting into UEFI Firmware for KVM and something related to that. That’s why it says incompatible disk. it doesn’t say “I can’t see the disk, it just says “I don’t like what I see”, much of that of course Windows being stupid.

It also sucks to debug this, takes hours of headbanging, and most people wouldn’t be able to find it, meaning it’ll force certain design choices on them that have other implications. (i.e. restoring a large disk with data instead of a small disk with just the OS), or needing to learn everything about viostor/vioscsi and windows slipstreaming / recovery mode during emergencies when they could save their bottoms much better by flipping over to sata for a moment.

Hi @darkfader,

Thanks for taking the time to share your experience and feedback, we are fully aware that handling Windows images is a bit painful, and we appreciate also that you had shared your workaround, which I think it will help users with a similar problem.

In any case, I wanted to mention that to address these issues (or because of this), now in OpenNebula we have:

These approaches remove most of the guesswork around disk buses, sysprep, drivers, and contextualization, making Windows deployments much more predictable and reliable.

Also worth noting: the original question is from 2023… since then, quite a few things have evolved around Windows support, so the documentation and guides above reflect the newer recommended approach.

Feel free to have a look and let us know if this fits your setup.

Best regards,

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.