Allow USB device passthrough
This commit is contained in:
parent
1081b98b09
commit
9f31fcfd52
1 changed files with 3 additions and 10 deletions
|
@ -34,13 +34,6 @@
|
|||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
virt_install_passthrough: >-
|
||||
{% if passthrough_devices is defined %}
|
||||
{% for item in passthrough_devices %}
|
||||
--hostdev {{ item }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
tasks:
|
||||
|
||||
- name: get vm list
|
||||
|
@ -86,8 +79,7 @@
|
|||
command: >
|
||||
virt-install --name {{ inventory_hostname }} \
|
||||
--graphics none --boot useserial=on --noautoconsole \
|
||||
--serial pty,log.file={{ console_log }} \
|
||||
--controller usb,model=none --sound none \
|
||||
--serial pty,log.file={{ console_log }} --sound none \
|
||||
--vcpus "sockets=1,cores={{ num_cpus }},threads=1,placement=auto" \
|
||||
--memory {{ mem_size }} --cpu host-passthrough \
|
||||
--disk {{ os_disk_image }},{{ dsk_opts }},size={{ dsk_size }} \
|
||||
|
@ -101,9 +93,10 @@
|
|||
{% for dev in virt_install_devices -%}
|
||||
--hostdev {{ dev }} \
|
||||
{% endfor -%}
|
||||
{% else -%}
|
||||
--controller usb,model=none \
|
||||
{% endif -%}
|
||||
{{ virt_install_disks }} \
|
||||
{{ virt_install_passthrough }} \
|
||||
{{ virt_install_network }} \
|
||||
{{ virt_install_os_args }}
|
||||
delegate_to: "{{ vmhost }}"
|
||||
|
|
Loading…
Add table
Reference in a new issue