avocado-vt icon indicating copy to clipboard operation
avocado-vt copied to clipboard

create_controller_xml function uses defaults that create invalid controllers

Open vasekhodina opened this issue 2 years ago • 1 comments

In create_controller_xml function there are defaults for type and model:

contr_type = contr_dict.get("controller_type", 'scsi')
 contr_model = contr_dict.get("controller_model", "virtio-scsi")

However sata type controllers do not have models. The look like this:

<controller type='sata' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
</controller>

But when create_controller_xml() is used it created controller like this:

<controller type='sata' model='virtio-scsi' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
 </controller>

And then the vm define or vm start command fails.

vasekhodina avatar Feb 21 '23 17:02 vasekhodina

@vasekhodina , thanks for finding this bug. sata controller is seldom tested, so we did not find this bug before. There should be an easy fix.

dzhengfy avatar Feb 22 '23 03:02 dzhengfy