Jiatong Shen
2022-Nov-24 08:47 UTC
detach-interface success but domiflist still saw interface
Hello Commnunity, I saw an weird situation on a phytium machine (arm64 v8), after the following commands, I can still see the interface which should be successfully detached. virsh # detach-interface 4a365b06-2597-4c17-8b44-dbb6953f9ced bridge --mac fa:16:3e:c5:62:40 Interface detached successfully Future qmp commands shows, that a device hostnet23 exists but seems no front end device exists. So what could be the problem? Thank you very much. /# virsh domiflist --inactive 4a365b06-2597-4c17-8b44-dbb6953f9ced Interface Type Source Model MAC ------------------------------------------------------------------------ tap1eca5838-d5 bridge qbr1eca5838-d5 virtio fa:16:3e:9b:1c:fd tap20318b8b-b5 bridge qbr20318b8b-b5 virtio fa:16:3e:e1:bc:58 tap43bab93f-9a bridge qbr43bab93f-9a virtio fa:16:3e:8f:1e:23 tap2b059179-d9 bridge qbr2b059179-d9 virtio fa:16:3e:4e:f9:47 tap1ec7cd98-1d bridge qbr1ec7cd98-1d virtio fa:16:3e:21:5b:e0 tap46c2470d-08 bridge qbr46c2470d-08 virtio fa:16:3e:33:68:19 tap0a402f8f-05 bridge qbr0a402f8f-05 virtio fa:16:3e:89:dd:c4 tap4e737f62-e2 bridge qbr4e737f62-e2 virtio fa:16:3e:1d:2a:1c tap024ec465-22 bridge qbr024ec465-22 virtio fa:16:3e:16:1c:df tapd17d320e-a5 bridge qbrd17d320e-a5 virtio fa:16:3e:08:bf:9f tapcef35fc7-40 bridge qbrcef35fc7-40 virtio fa:16:3e:d6:5b:bf tap83de3d8e-b5 bridge qbr83de3d8e-b5 virtio fa:16:3e:69:21:90 tap660a3bb9-17 bridge qbr660a3bb9-17 virtio fa:16:3e:b7:33:d3 tap35d08903-93 bridge qbr35d08903-93 virtio fa:16:3e:15:ce:a3 tap8e63ed74-2a bridge qbr8e63ed74-2a virtio fa:16:3e:0a:3f:a8 tapb61b097d-e8 bridge qbrb61b097d-e8 virtio fa:16:3e:f0:f9:da tap189d75de-ee bridge qbr189d75de-ee virtio fa:16:3e:be:98:9d tap7108158a-fe bridge qbr7108158a-fe virtio fa:16:3e:a2:8b:e8 tap38015662-f2 bridge qbr38015662-f2 virtio fa:16:3e:d2:45:fe tapcc37cd83-fc bridge qbrcc37cd83-fc virtio fa:16:3e:64:26:f8 tapaf3ccc2a-0c bridge qbraf3ccc2a-0c virtio fa:16:3e:d2:0a:99 # virsh domiflist 4a365b06-2597-4c17-8b44-dbb6953f9ced Interface Type Source Model MAC ------------------------------------------------------------------------ tap1eca5838-d5 bridge qbr1eca5838-d5 virtio fa:16:3e:9b:1c:fd tap20318b8b-b5 bridge qbr20318b8b-b5 virtio fa:16:3e:e1:bc:58 tap43bab93f-9a bridge qbr43bab93f-9a virtio fa:16:3e:8f:1e:23 tap2b059179-d9 bridge qbr2b059179-d9 virtio fa:16:3e:4e:f9:47 tap1ec7cd98-1d bridge qbr1ec7cd98-1d virtio fa:16:3e:21:5b:e0 tap46c2470d-08 bridge qbr46c2470d-08 virtio fa:16:3e:33:68:19 tap0a402f8f-05 bridge qbr0a402f8f-05 virtio fa:16:3e:89:dd:c4 tap4e737f62-e2 bridge qbr4e737f62-e2 virtio fa:16:3e:1d:2a:1c tap024ec465-22 bridge qbr024ec465-22 virtio fa:16:3e:16:1c:df tapd17d320e-a5 bridge qbrd17d320e-a5 virtio fa:16:3e:08:bf:9f tapcef35fc7-40 bridge qbrcef35fc7-40 virtio fa:16:3e:d6:5b:bf tap7ceb7a77-4d bridge qbr7ceb7a77-4d virtio fa:16:3e:c5:62:40 tap83de3d8e-b5 bridge qbr83de3d8e-b5 virtio fa:16:3e:69:21:90 tap660a3bb9-17 bridge qbr660a3bb9-17 virtio fa:16:3e:b7:33:d3 tap35d08903-93 bridge qbr35d08903-93 virtio fa:16:3e:15:ce:a3 tap8e63ed74-2a bridge qbr8e63ed74-2a virtio fa:16:3e:0a:3f:a8 tapb61b097d-e8 bridge qbrb61b097d-e8 virtio fa:16:3e:f0:f9:da tap189d75de-ee bridge qbr189d75de-ee virtio fa:16:3e:be:98:9d tap7108158a-fe bridge qbr7108158a-fe virtio fa:16:3e:a2:8b:e8 tap38015662-f2 bridge qbr38015662-f2 virtio fa:16:3e:d2:45:fe tapcc37cd83-fc bridge qbrcc37cd83-fc virtio fa:16:3e:64:26:f8 tapaf3ccc2a-0c bridge qbraf3ccc2a-0c virtio fa:16:3e:d2:0a:99 virsh # qemu-monitor-command --hmp 4a365b06-2597-4c17-8b44-dbb6953f9ced info network net0: index=0,type=nic,model=virtio-net-pci,macaddr=fa:16:3e:9b:1c:fd \ hostnet0: index=0,type=tap,fd=40 net1: index=0,type=nic,model=virtio-net-pci,macaddr=fa:16:3e:e1:bc:58 \ hostnet1: index=0,type=tap,fd=42 net5: index=0,type=nic,model=virtio-net-pci,macaddr=fa:16:3e:8f:1e:23 \ hostnet5: index=0,type=tap,fd=52 net9: index=0,type=nic,model=virtio-net-pci,macaddr=fa:16:3e:4e:f9:47 \ hostnet9: index=0,type=tap,fd=58 net15: index=0,type=nic,model=virtio-net-pci,macaddr=fa:16:3e:21:5b:e0 \ hostnet15: index=0,type=tap,fd=262 net16: index=0,type=nic,model=virtio-net-pci,macaddr=fa:16:3e:33:68:19 \ hostnet16: index=0,type=tap,fd=94 net17: index=0,type=nic,model=virtio-net-pci,macaddr=fa:16:3e:89:dd:c4 \ hostnet17: index=0,type=tap,fd=108 net18: index=0,type=nic,model=virtio-net-pci,macaddr=fa:16:3e:1d:2a:1c \ hostnet18: index=0,type=tap,fd=218 net19: index=0,type=nic,model=virtio-net-pci,macaddr=fa:16:3e:16:1c:df \ hostnet19: index=0,type=tap,fd=226 net20: index=0,type=nic,model=virtio-net-pci,macaddr=fa:16:3e:08:bf:9f \ hostnet20: index=0,type=tap,fd=234 net21: index=0,type=nic,model=virtio-net-pci,macaddr=fa:16:3e:d6:5b:bf \ hostnet21: index=0,type=tap,fd=242 hostnet23: index=0,type=tap,fd=273 net25: index=0,type=nic,model=virtio-net-pci,macaddr=fa:16:3e:69:21:90 \ hostnet25: index=0,type=tap,fd=289 net26: index=0,type=nic,model=virtio-net-pci,macaddr=fa:16:3e:b7:33:d3 \ hostnet26: index=0,type=tap,fd=44 net27: index=0,type=nic,model=virtio-net-pci,macaddr=fa:16:3e:15:ce:a3 \ hostnet27: index=0,type=tap,fd=73 net28: index=0,type=nic,model=virtio-net-pci,macaddr=fa:16:3e:0a:3f:a8 \ hostnet28: index=0,type=tap,fd=102 net29: index=0,type=nic,model=virtio-net-pci,macaddr=fa:16:3e:f0:f9:da \ hostnet29: index=0,type=tap,fd=185 net30: index=0,type=nic,model=virtio-net-pci,macaddr=fa:16:3e:be:98:9d \ hostnet30: index=0,type=tap,fd=201 net31: index=0,type=nic,model=virtio-net-pci,macaddr=fa:16:3e:a2:8b:e8 \ hostnet31: index=0,type=tap,fd=255 net32: index=0,type=nic,model=virtio-net-pci,macaddr=fa:16:3e:d2:45:fe \ hostnet32: index=0,type=tap,fd=279 net33: index=0,type=nic,model=virtio-net-pci,macaddr=fa:16:3e:64:26:f8 \ hostnet33: index=0,type=tap,fd=287 net34: index=0,type=nic,model=virtio-net-pci,macaddr=fa:16:3e:d2:0a:99 \ hostnet34: index=0,type=tap,fd=303 -- Best Regards, Jiatong Shen -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20221124/f87762ef/attachment.htm>
Peter Krempa
2022-Nov-24 14:58 UTC
detach-interface success but domiflist still saw interface
On Thu, Nov 24, 2022 at 16:47:48 +0800, Jiatong Shen wrote:> Hello Commnunity, > > I saw an weird situation on a phytium machine (arm64 v8), after the > following commands, I can still see the interface which should be > successfully detached. > > virsh # detach-interface 4a365b06-2597-4c17-8b44-dbb6953f9ced bridge --mac > fa:16:3e:c5:62:40 > Interface detached successfully > > Future qmp commands shows, that a device hostnet23 exists but seems no > front end device exists. > > So what could be the problem? Thank you very much.The man page for virsh states for the 'detach-interface' command: "Please see documentation for detach-device for known quirks." And the 'quirks' part of 'detach-device': Quirk: Device unplug is asynchronous in most cases and requires guest cooperation. This means that it's up to the discretion of the guest to disallow or delay the unplug arbitrarily. As the libvirt API used in this command was designed as synchronous it returns success after some timeout even if the device was not unplugged yet to allow further in? teractions with the domain e.g. if the guest is unresponsive. Callers which need to make sure that the device was unplugged can use libvirt events (see virsh event) to be notified when the device is removed. Note that the event may arrive before the command returns.