Skip to content

Add switch for enabling qemu guest agent virtio channel #98

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

Merged
merged 1 commit into from
Jul 11, 2023
Merged
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
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ Role Variables
- `enable_spice`: If true enables SPICE listening for use with
Virtual Machine Manager and similar tools

- `enable_guest_virtio`: If true enables guest virtio device for use with
Qemu guest agent

- `volumes`: a list of volumes to attach to the VM. Each volume is
defined with the following dict:
- `type`: What type of backing volume does the instance use? All
Expand Down
1 change: 1 addition & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
autostart: "{{ vm.autostart | default(true) }}"
enable_vnc: "{{ vm.enable_vnc | default(false) }}"
enable_spice: "{{ vm.enable_spice | default(false) }}"
enable_guest_virtio: "{{ vm.enable_guest_virtio | default(false) }}"
boot_firmware: "{{ vm.boot_firmware | default('bios', true) | lower }}"
with_items: "{{ libvirt_vms }}"
loop_control:
Expand Down
5 changes: 5 additions & 0 deletions templates/vm.xml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,11 @@
<listen type='address'/>
</graphics>
{% endif %}
{% if enable_guest_virtio |bool %}
<channel type='unix'>
<target type='virtio' name='org.qemu.guest_agent.0'/>
</channel>
{% endif %}
{% for usb_device in usb_devices %}
<hostdev mode='subsystem' type='usb' managed='yes'>
<source>
Expand Down