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

virsh_domif_setlink_getlink:Remove driver settings from iface when model is not virtio #5892

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
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
Loading