mirror of
https://github.com/vagrant-libvirt/vagrant-libvirt.git
synced 2025-02-25 18:55:27 -06:00
Start domain added some support to update the nic model type if it changed to avoid needing to completely destroy and recreate the domain. Additionally support for setting the management network nic model type was added, however the default value did not correctly reflect expected. This updates `management_network_model_type` to default to `nic_model_type`, which in turn defaults to `virtio`. This has now been moved from the create network interfaces action into the config object to allow chained resolving. This should ensure that setting `nic_model_type` will correctly cause all networks to use the model unless explicitly specified to use a different model. Additionally the start domain action for updating the interfaces has been modified to loop over all interfaces and all configured adapters in the order they should have been added. This allows for checking whether the model type needs to be updated based on the `management_network_model_type` config option for the first network, assuming the management network has been attached, and otherwise to fall back to the default from `nic_model_type` for all other interfaces. Finally ensure the iommu attribute is removed from the nic driver if the model type is switched to anything other virtio to avoid issues with attempting to enable invalid settings. Fixes: #1743
45 lines
1004 B
XML
45 lines
1004 B
XML
<domain xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0' type=''>
|
|
<name/>
|
|
<title/>
|
|
<description/>
|
|
<uuid/>
|
|
<memory/>
|
|
<vcpu>1</vcpu>
|
|
<cpu mode='host-model'>
|
|
<model fallback='allow'/>
|
|
</cpu>
|
|
<os>
|
|
<type>hvm</type>
|
|
<kernel/>
|
|
<initrd/>
|
|
<cmdline/>
|
|
</os>
|
|
<features>
|
|
<acpi/>
|
|
<apic/>
|
|
<pae/>
|
|
</features>
|
|
<clock offset='utc'>
|
|
|
|
</clock>
|
|
<devices>
|
|
<interface type='network'>
|
|
<alias name='ua-net-0'/>
|
|
<source network='vagrant-libvirt'/>
|
|
<model type='virtio'/>
|
|
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
|
|
</interface>
|
|
<serial type='pty'>
|
|
<target port='0'/>
|
|
</serial>
|
|
<console type='pty'>
|
|
<target port='0'/>
|
|
</console>
|
|
<input bus='ps2' type='mouse'/>
|
|
<graphics autoport='yes' keymap='en-us' listen='127.0.0.1' port='-1' type='vnc' websocket='-1'/>
|
|
<video>
|
|
<model heads='1' type='cirrus' vram='16384'/>
|
|
</video>
|
|
</devices>
|
|
</domain>
|