Skip to content

Commit

Permalink
Merge pull request #5892 from chloerh/setlink
Browse files Browse the repository at this point in the history
virsh_domif_setlink_getlink:Remove driver settings from iface when model is not virtio
  • Loading branch information
Yingshun authored Sep 23, 2024
2 parents fa0313e + 14c7dd7 commit 4d2b779
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from virttest import utils_misc
from virttest import utils_libvirtd
from virttest.libvirt_xml import vm_xml
from virttest.utils_libvirt import libvirt_vmxml
from virttest.utils_test import libvirt


Expand Down Expand Up @@ -160,6 +161,9 @@ def check_update_device(vm, if_name, session):
# generate a new one suitable for the model
if vm.is_alive():
vm.destroy()
if model_type != 'virtio':
vmxml = vm_xml.VMXML.new_from_dumpxml(vm.name)
libvirt_vmxml.modify_vm_device(vmxml, 'interface', {'driver': None})
iface_dict = {'model': model_type, 'del_addr': 'yes'}
libvirt.modify_vm_iface(vm_name[0], "update_iface", iface_dict)
# Vm status
Expand Down

0 comments on commit 4d2b779

Please sign in to comment.