Skip to content

Commit

Permalink
kvm: force virtio-scsi for cdrom controller
Browse files Browse the repository at this point in the history
  • Loading branch information
karmab committed Aug 2, 2024
1 parent 5bb7216 commit 342d5b8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
4 changes: 2 additions & 2 deletions kvirt/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -722,13 +722,13 @@ def _filter_info_plan(_list, overrides={}):
if field is not None:
if field not in entry:
continue
if value is not None and entry[field] != value:
continue
if name is not None:
if entry['name'] == name:
return entry[field]
else:
continue
if value is not None and entry[field] != value:
continue
new_entry = {entry['name']: entry[field]}
new_list.append(new_entry)
return new_list
Expand Down
10 changes: 8 additions & 2 deletions kvirt/providers/kvm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,10 @@ def create(self, name, virttype=None, profile='kvirt', flavor=None, plan='kvirt'
<readonly/>
%s
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>""" % (isosourcexml, isobus, bootdevxml)
</disk>
<controller type='scsi' index='0' model='virtio-scsi'>
<alias name='scsi0'/>
</controller>""" % (isosourcexml, isobus, bootdevxml)
floppyxml = ''
floppy = overrides.get('floppy')
if floppy is not None:
Expand Down Expand Up @@ -828,7 +831,10 @@ def create(self, name, virttype=None, profile='kvirt', flavor=None, plan='kvirt'
<target dev='hdd' bus='%s'/>
<readonly/>
%s
</disk>""" % (dtype, dsource, cloudinitiso, isobus, bootdevxml)
</disk>
<controller type='scsi' index='0' model='virtio-scsi'>
<alias name='scsi0'/>
</controller>""" % (dtype, dsource, cloudinitiso, isobus, bootdevxml)
dest_machine = 'q99' if aarch64_full else machine
if ignitiondata is not None:
userdata, metadata, netdata = ignitiondata, '', None
Expand Down

0 comments on commit 342d5b8

Please sign in to comment.