stackhpc / ansible-role-libvirt-vm

This role configures and creates VMs on a KVM hypervisor.
128 stars 67 forks source link

Network interface driver should be tunable #65

Closed gprocunier closed 3 years ago

gprocunier commented 3 years ago

There are reasonable reasons to not use virtio as the default network driver for network interfaces.

Eg. Windows Guests (native boot) Linux guests being used in a network simulator which need mii-mon (e1000 supports it).

Modifying this seems trivial :

https://github.com/stackhpc/ansible-role-libvirt-vm/blob/master/templates/vm.xml.j2#L82

to be

{% if interface.driver is defined %}
      <model type='{{ interface.driver }}/>'
{% else %}
      <model type='virtio'/>
{% endif %}
markgoddard commented 3 years ago

@gprocunier feel free to propose a PR for this.

gprocunier commented 3 years ago

Done