avocado-vt
avocado-vt copied to clipboard
create_controller_xml function uses defaults that create invalid controllers
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 , thanks for finding this bug. sata controller is seldom tested, so we did not find this bug before. There should be an easy fix.