Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for pci-passthrough #76

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -761,6 +761,10 @@ virt_infra_host_deps:
virt_infra_guest_deps:
- cloud-init
- qemu-guest-agent

# Array of ids of devices to be passed to the vm
# (see virt-install doc for --host-device option)
virt_infra_host_devices: []
```

## Dependencies
Expand Down
5 changes: 5 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,3 +137,8 @@ virt_infra_host_deps:
virt_infra_guest_deps:
- cloud-init
- qemu-guest-agent

# Array of ids of devices to be passed to the vm
# (see virt-install doc for --host-device option)
virt_infra_host_devices: []

5 changes: 5 additions & 0 deletions tasks/virt-create.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@
--serial pty
--sound none
--vcpus {{ virt_infra_cpus }}{% if virt_infra_cpus_max is defined and virt_infra_cpus_max %},maxvcpus={{ virt_infra_cpus_max }}{% endif %}
{% if virt_infra_host_devices is defined and virt_infra_host_devices %}
{% for hostdev in virt_infra_host_devices %}
--host-device {{ hostdev }}
{% endfor %}
{% endif %}
--virt-type kvm
become: true
register: result_vm_create
Expand Down