You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by "harikrishna-patnala (via GitHub)" <gi...@apache.org> on 2026/01/28 05:57:48 UTC

[I] Option of "kvm.guest.os.machine.type" on VM/template not working in this case [cloudstack]

harikrishna-patnala opened a new issue, #12535:
URL: https://github.com/apache/cloudstack/issues/12535

   ### problem
   
   Adding this issue based on @rajujith 's comment here https://github.com/apache/cloudstack/pull/12414#issuecomment-3776410665
   
   When setting machine type q35 in "kvm.guest.os.machine.type", the option added is passed to KVM but its not useful in the use case yet due to incorrect controller type set for q35 machine type:
   
   ` [resource.wrapper.LibvirtStartCommandWrapper] (AgentRequest-Handler-2:[]) (logid:feb005a8) LibvirtException org.libvirt.LibvirtException: unsupported configuration: IDE controllers are unsupported for this QEMU binary or machine type at org.libvirt.ErrorHandler.processError(Unknown Source) at org.libvirt.ErrorHandler.processError(Unknown Source) at org.libvirt.Connect.domainCreateXML(Unknown Source) at com.cloud.hypervisor.kvm.resource.LibvirtComputingResource.startVM(LibvirtComputingResource.java:2241)`
   
   ```
   <type arch='x86_64' machine='pc-q35-rhel9.6.0'>hvm</type>
   
   --
   --
   <disk device='cdrom' type='file'>
     <driver name='qemu' type='raw' />
     <source file=''/>
     <target dev='hdc' bus='ide'/>
   </disk>
   ```
   
   The rootDiskController is set to "scsi".
   
   
   
   
   ### versions
   
   The versions of ACS, hypervisors, storage, network etc..
   
   ### The steps to reproduce the bug
   
   _No response_
   
   ### What to do about it?
   
   @rajujith please add your comment, if you think there is a way to address issue.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Option of "kvm.guest.os.machine.type" on VM/template not working in this case [cloudstack]

Posted by "rajujith (via GitHub)" <gi...@apache.org>.
rajujith commented on issue #12535:
URL: https://github.com/apache/cloudstack/issues/12535#issuecomment-3809353544

   @harikrishna-patnala I believe CloudStack needs to configure the domain XML according to the machine type. cc @nvazquez 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Option of "kvm.guest.os.machine.type" on VM/template not working in this case [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on issue #12535:
URL: https://github.com/apache/cloudstack/issues/12535#issuecomment-5934179845

   good catch @mchiavac 
   
   it looks like a valid issue. we should somehow provide users the option to specify the controller of other devices, except root disk and data disk.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Option of "kvm.guest.os.machine.type" on VM/template not working in this case [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on issue #12535:
URL: https://github.com/apache/cloudstack/issues/12535#issuecomment-5928173413

   > > > for the sake of completeness, problem is not solved when vm is in bios mode. For my needs, i create an hook in transformation stage that replace xml part of ide cdrom and controller in sata syntax, but is not so clean.
   > > 
   > > 
   > > [@mchiavac](https://github.com/mchiavac) have you tested with the vm settings ?
   > 
   > yes with kvm.guest.os.machine.type=q35
   
   can you add UEFI=SECURE ? vm needs to be stopped


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Option of "kvm.guest.os.machine.type" on VM/template not working in this case [cloudstack]

Posted by "nvazquez (via GitHub)" <gi...@apache.org>.
nvazquez commented on issue #12535:
URL: https://github.com/apache/cloudstack/issues/12535#issuecomment-3810791208

   @harikrishna-patnala @rajujith I think configuring the XML domain based on the selected domain type can be hard to achieve, I would suggest we give flexibility to select other settings related to the machine type (in this case it seems the IDE controller has been hardcoded, it would be helpful if it can be configurable as well)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Option of "kvm.guest.os.machine.type" on VM/template not working in this case [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on issue #12535:
URL: https://github.com/apache/cloudstack/issues/12535#issuecomment-5931590197

   > SATA is not an option in the rootDiskController settings, and forcing this value produces the same result. I can only choose from osdefault, ide, scsi, virtio, virtio-blk.
   
   sata should be a valid option.
   when you set root disk controller to sata, can the vm be started?
   could you share some agent.log around the vm start ?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Option of "kvm.guest.os.machine.type" on VM/template not working in this case [cloudstack]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #12535:
URL: https://github.com/apache/cloudstack/issues/12535#issuecomment-4012049961

   ### 🏷️ Issue Triaged
   
   Hi `@harikrishna-patnala`! I've categorized this issue as **bug** based on the following analysis:
   
   **Reasoning**: This is a configuration bug where the KVM machine type q35 is incompatible with the IDE controller type currently set, causing LibvirtException when starting VMs.
   
   <details>
   <summary><b>View Triage Details</b></summary>
   
   #### Analysis
   - **Keywords detected**: LibvirtException, unsupported configuration, IDE controllers, machine type q35
   - **Issue type indicators**: Runtime exception, configuration incompatibility, hypervisor error
   - **Confidence**: High
   
   #### Recommended Next Steps
   - Investigate controller type mapping for q35 machine type
   - Update rootDiskController configuration logic to use compatible controller types (SATA/VirtIO instead of IDE for q35)
   - Add validation to prevent incompatible machine type/controller combinations
   
   </details>
   
   **References**: [Triage run §22767317661](https://github.com/apache/cloudstack/actions/runs/22767317661)
   
   > Generated by [Issue Triage Agent](https://github.com/apache/cloudstack/actions/runs/22767317661)
   >
   > To install this workflow, run `gh aw add github/gh-aw/.github/workflows/issue-triage-agent.md@94662b1dee8ce96c876ba9f33b3ab8be32de82a4`. View source at [https://github.com/github/gh-aw/tree/94662b1dee8ce96c876ba9f33b3ab8be32de82a4/.github/workflows/issue-triage-agent.md](https://github.com/github/gh-aw/tree/94662b1dee8ce96c876ba9f33b3ab8be32de82a4/.github/workflows/issue-triage-agent.md).
   
   <!-- gh-aw-agentic-workflow: Issue Triage Agent, run: https://github.com/apache/cloudstack/actions/runs/22767317661 -->


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Option of "kvm.guest.os.machine.type" on VM/template not working in this case [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache closed issue #12535: Option of "kvm.guest.os.machine.type" on VM/template not working in this case
URL: https://github.com/apache/cloudstack/issues/12535


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Option of "kvm.guest.os.machine.type" on VM/template not working in this case [cloudstack]

Posted by "mchiavac (via GitHub)" <gi...@apache.org>.
mchiavac commented on issue #12535:
URL: https://github.com/apache/cloudstack/issues/12535#issuecomment-5930463409

   SATA is not an option in the rootDiskController settings, and forcing this value produces the same result.
   I can only choose from osdefault, ide, scsi, virtio, virtio-blk.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Option of "kvm.guest.os.machine.type" on VM/template not working in this case [cloudstack]

Posted by "mchiavac (via GitHub)" <gi...@apache.org>.
mchiavac commented on issue #12535:
URL: https://github.com/apache/cloudstack/issues/12535#issuecomment-5927371423

   > > for the sake of completeness, problem is not solved when vm is in bios mode. For my needs, i create an hook in transformation stage that replace xml part of ide cdrom and controller in sata syntax, but is not so clean.
   > 
   > [@mchiavac](https://github.com/mchiavac) have you tested with the vm settings ?
   
   yes with kvm.guest.os.machine.type=q35


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Option of "kvm.guest.os.machine.type" on VM/template not working in this case [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on issue #12535:
URL: https://github.com/apache/cloudstack/issues/12535#issuecomment-5929009506

   > yes adding uefi=secure solves booting vm, but not all vms can be uefi in my environment... so if i want a bios vm with q35 virtual hw, it doesn't start.
   
   can you test with vm settings for root/data disk controller ?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Option of "kvm.guest.os.machine.type" on VM/template not working in this case [cloudstack]

Posted by "mchiavac (via GitHub)" <gi...@apache.org>.
mchiavac commented on issue #12535:
URL: https://github.com/apache/cloudstack/issues/12535#issuecomment-5926475001

   for the sake of completeness, problem is not solved when vm is in bios mode. For my needs, i create an hook in transformation stage that replace xml part of ide cdrom and controller in sata syntax, but is not so clean.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Option of "kvm.guest.os.machine.type" on VM/template not working in this case [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on issue #12535:
URL: https://github.com/apache/cloudstack/issues/12535#issuecomment-5929837774

   > tested with rootdiskcontroller=virtio or scsi with or without datadiskcontroller setting, but ide controller is still created if vm is in bios mode so:
   > 
   > ```
   > <disk type='file' device='cdrom'>
   >   <driver name='qemu'/>
   >   <target dev='hdc' bus='ide'/>
   >   <readonly/>
   >   <alias name='ide0-1-0'/>
   >   <address type='drive' controller='0' bus='1' target='0' unit='0'/>
   > </disk>
   > <disk type='file' device='cdrom'>
   >   <driver name='qemu'/>
   >   <target dev='hdd' bus='ide'/>
   >   <readonly/>
   >   <alias name='ide0-1-1'/>
   >   <address type='drive' controller='0' bus='1' target='0' unit='1'/>
   > </disk>
   > <controller type='ide' index='0'>
   >   <alias name='ide'/>
   >   <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
   > </controller>
   > ```
   > 
   > is not supported by qemu with q35 type, but:
   > 
   > ```
   > <disk type='file' device='cdrom'>
   >   <driver name='qemu'/>
   >   <target dev='sdd' bus='sata'/>
   >   <readonly/>
   >   <alias name='sata0-0-3'/>
   >   <address type='drive' controller='0' bus='0' target='0' unit='3'/>
   > </disk>
   > <disk type='file' device='cdrom'>
   >   <driver name='qemu'/>
   >   <target dev='sde' bus='sata'/>
   >   <readonly/>
   >   <alias name='sata0-0-4'/>
   >   <address type='drive' controller='0' bus='0' target='0' unit='4'/>
   > </disk>
   > </controller>
   > <controller type='sata' index='0'>
   >   <alias name='ide'/>
   >   <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
   > </controller>
   > ```
   > 
   > works with q35 and bios mode.
   
   can you try root disk controller = sata ?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Option of "kvm.guest.os.machine.type" on VM/template not working in this case [cloudstack]

Posted by "mchiavac (via GitHub)" <gi...@apache.org>.
mchiavac commented on issue #12535:
URL: https://github.com/apache/cloudstack/issues/12535#issuecomment-5933539363

   
   sata is not available in dropdown menu for rootdiskcontroller setting.
   If i force sata string during boot agent,log report:
   
   `2026-10-01 13:28:11,806 WARN  [kvm.resource.LibvirtKvmAgentHook] (AgentRequest-Handler-4:[]) (logid:3ba615e1) Shell script '/etc/cloudstack/agent/hooks/libvirt-vm-xml-transformer.sh' is not available. Transformations will not be applied.
   2026-10-01 13:28:11,806 WARN  [kvm.resource.LibvirtKvmAgentHook] (AgentRequest-Handler-4:[]) (logid:3ba615e1) Groovy scripting engine is not initialized. Data transformation skipped.
   2026-10-01 13:28:11,809 WARN  [resource.wrapper.LibvirtStartCommandWrapper] (AgentRequest-Handler-4:[]) (logid:3ba615e1) LibvirtException org.libvirt.LibvirtException: unsupported configuration: IDE controllers are unsupported for this QEMU binary or machine type
           at org.libvirt.ErrorHandler.processError(Unknown Source)
           at org.libvirt.ErrorHandler.processError(Unknown Source)
           at org.libvirt.Connect.domainCreateXML(Unknown Source)
           at com.cloud.hypervisor.kvm.resource.LibvirtComputingResource.startVM(LibvirtComputingResource.java:2368)
           at com.cloud.hypervisor.kvm.resource.LibvirtComputingResource.startVM(LibvirtComputingResource.java:2337)
           at com.cloud.hypervisor.kvm.resource.wrapper.LibvirtStartCommandWrapper.execute(LibvirtStartCommandWrapper.java:97)
           at com.cloud.hypervisor.kvm.resource.wrapper.LibvirtStartCommandWrapper.execute(LibvirtStartCommandWrapper.java:55)
           at com.cloud.hypervisor.kvm.resource.wrapper.LibvirtRequestWrapper.execute(LibvirtRequestWrapper.java:78)
           at com.cloud.hypervisor.kvm.resource.LibvirtComputingResource.executeRequest(LibvirtComputingResource.java:2407)
           at com.cloud.agent.Agent.processRequest(Agent.java:813)
           at com.cloud.agent.Agent$AgentRequestHandler.doTask(Agent.java:1295)
           at com.cloud.utils.nio.Task.call(Task.java:83)
           at com.cloud.utils.nio.Task.call(Task.java:29)
           at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
           at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
           at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
           at java.base/java.lang.Thread.run(Thread.java:840)`
   
   maybe the problem is an hardcoded select in uefi or bios mode like this?
   
   https://github.com/apache/cloudstack/blob/main/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java#L1107
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Option of "kvm.guest.os.machine.type" on VM/template not working in this case [cloudstack]

Posted by "mchiavac (via GitHub)" <gi...@apache.org>.
mchiavac commented on issue #12535:
URL: https://github.com/apache/cloudstack/issues/12535#issuecomment-5928315345

   yes adding uefi=secure solves booting vm, but not all vms can be uefi in my environment... so if i want a bios vm with q35 virtual hw, it doesn't start.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Option of "kvm.guest.os.machine.type" on VM/template not working in this case [cloudstack]

Posted by "harikrishna-patnala (via GitHub)" <gi...@apache.org>.
harikrishna-patnala commented on issue #12535:
URL: https://github.com/apache/cloudstack/issues/12535#issuecomment-3809161493

   @rajujith please add your comment, if you think there is a way to address issue.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Option of "kvm.guest.os.machine.type" on VM/template not working in this case [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on issue #12535:
URL: https://github.com/apache/cloudstack/issues/12535#issuecomment-5571121216

   I can reproduce the issue when machine type is set to q35
   It is fixed by adding vm setting UEFI=SECURE
   
   I am closing this issue as I think no code change is required.
   cc @harikrishna-patnala 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Option of "kvm.guest.os.machine.type" on VM/template not working in this case [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on issue #12535:
URL: https://github.com/apache/cloudstack/issues/12535#issuecomment-5927245408

   > for the sake of completeness, problem is not solved when vm is in bios mode. For my needs, i create an hook in transformation stage that replace xml part of ide cdrom and controller in sata syntax, but is not so clean.
   
   @mchiavac 
   have you tested with the vm settings ?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Option of "kvm.guest.os.machine.type" on VM/template not working in this case [cloudstack]

Posted by "mchiavac (via GitHub)" <gi...@apache.org>.
mchiavac commented on issue #12535:
URL: https://github.com/apache/cloudstack/issues/12535#issuecomment-5929494710

   tested with rootdiskcontroller=virtio or scsi with or without datadiskcontroller setting, but ide controller is still created if vm is in bios mode so:
       <disk type='file' device='cdrom'>
         <driver name='qemu'/>
         <target dev='hdc' bus='ide'/>
         <readonly/>
         <alias name='ide0-1-0'/>
         <address type='drive' controller='0' bus='1' target='0' unit='0'/>
       </disk>
       <disk type='file' device='cdrom'>
         <driver name='qemu'/>
         <target dev='hdd' bus='ide'/>
         <readonly/>
         <alias name='ide0-1-1'/>
         <address type='drive' controller='0' bus='1' target='0' unit='1'/>
       </disk>
       <controller type='ide' index='0'>
         <alias name='ide'/>
         <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
       </controller>
   
   is not supported by qemu with q35 type, but:
   
       <disk type='file' device='cdrom'>
         <driver name='qemu'/>
         <target dev='sdd' bus='sata'/>
         <readonly/>
         <alias name='sata0-0-3'/>
         <address type='drive' controller='0' bus='0' target='0' unit='3'/>
       </disk>
       <disk type='file' device='cdrom'>
         <driver name='qemu'/>
         <target dev='sde' bus='sata'/>
         <readonly/>
         <alias name='sata0-0-4'/>
         <address type='drive' controller='0' bus='0' target='0' unit='4'/>
       </disk>
       </controller>
       <controller type='sata' index='0'>
         <alias name='ide'/>
         <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
       </controller>
   
   works with q35 and bios mode.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org