diff --git a/changelogs/fragments/348-ovirt_vm-add-virtio_scsi_enabled-and-multi_queues_enabled.yml b/changelogs/fragments/348-ovirt_vm-add-virtio_scsi_enabled-and-multi_queues_enabled.yml new file mode 100644 index 00000000..8ea71612 --- /dev/null +++ b/changelogs/fragments/348-ovirt_vm-add-virtio_scsi_enabled-and-multi_queues_enabled.yml @@ -0,0 +1,3 @@ +--- +minor_changes: + - ovirt_vm - Add virtio_scsi_enabled and multi_queues_enabled (https://github.com/oVirt/ovirt-ansible-collection/pull/348). diff --git a/plugins/modules/ovirt_vm.py b/plugins/modules/ovirt_vm.py index 0be4a1b5..8ec1610f 100644 --- a/plugins/modules/ovirt_vm.py +++ b/plugins/modules/ovirt_vm.py @@ -894,6 +894,16 @@ description: - "Sets the value of the custom_emulated_machine attribute." type: str + virtio_scsi_enabled: + description: + - "Enable Virtio SCSI support." + type: bool + version_added: 1.7.0 + multi_queues_enabled: + description: + - "If `true`, each virtual interface will get the optimal number of queues, depending on the available virtual Cpus." + type: bool + version_added: 1.7.0 notes: - If VM is in I(UNASSIGNED) or I(UNKNOWN) state before any operation, the module will fail. @@ -1553,6 +1563,10 @@ def build_entity(self): self.param('cpu_pinning') )) else None, cpu_shares=self.param('cpu_shares'), + virtio_scsi=otypes.VirtioScsi( + enabled=self.param('virtio_scsi_enabled'), + ) if self.param('virtio_scsi_enabled') is not None else None, + multi_queues_enabled=self.param('multi_queues_enabled'), os=otypes.OperatingSystem( type=self.param('operating_system'), boot=otypes.Boot( @@ -1746,6 +1760,8 @@ def check_custom_compatibility_version(): equal(self.param('serial_policy'), str(getattr(entity.serial_number, 'policy', None))) and equal(self.param('serial_policy_value'), getattr(entity.serial_number, 'value', None)) and equal(self.param('numa_tune_mode'), str(entity.numa_tune_mode)) and + equal(self.param('virtio_scsi_enabled'), entity.virtio_scsi.enabled) and + equal(self.param('multi_queues_enabled'), entity.multi_queues_enabled) and equal(self.param('rng_device'), str(entity.rng_device.source) if entity.rng_device else None) and equal(provided_vm_display.get('monitors'), getattr(vm_display, 'monitors', None)) and equal(provided_vm_display.get('keyboard_layout'), getattr(vm_display, 'keyboard_layout', None)) and @@ -2579,6 +2595,8 @@ def main(): force_migrate=dict(type='bool'), migrate=dict(type='bool', default=None), next_run=dict(type='bool'), + virtio_scsi_enabled=dict(type='bool'), + multi_queues_enabled=dict(type='bool'), snapshot_name=dict(type='str'), snapshot_vm=dict(type='str'), )