Re: about the script /etc/qemu-ifup with nmcli command
On Wed, Oct 21, 2020 at 06:31:50PM +0800, Yalan Zhang wrote: > Hi, > > I have tried the qemu-ifup script as below with nmcli command as brctl is > deprecated on rhel8, but the guest network can not work. > I think the script needs update. Could you please help to have a look? > Thank you in advance. > > 1. prepare a linux bridge on the host named br0; > > 2. prepare the qemu-ifup script as below: > # cat /etc/qemu-ifup > #!/bin/bash > # A br0 bridge should be already set up. > # Compare with: > # http://en.wikibooks.org/wiki/QEMU/Networking#qemu-ifup > # > # For the bridge setup, see: > # http://wiki.libvirt.org/page/Networking#Fedora.2FRHEL_Bridging > # http://gist.github.com/393525 > ip link set "$1" up > nmcli c add type bridge-slave ifname $1 con-name $1 master br0 autoconnect > yes > > 3. start vm with below interface setting: > # virsh dumpxml rh | grep /interface -B5 > > > I don't know how to make the script work, but I don't understand why you are using
Re: about the script /etc/qemu-ifup with nmcli command
Hi, Could anyone familiar with NetworkManager help with this? This question has been bothering me for a long time. Thank you very much! --- Best Regards, Yalan Zhang IRC: yalzhang On Wed, Oct 21, 2020 at 6:31 PM Yalan Zhang wrote: > Hi, > > I have tried the qemu-ifup script as below with nmcli command as brctl is > deprecated on rhel8, but the guest network can not work. > I think the script needs update. Could you please help to have a look? > Thank you in advance. > > 1. prepare a linux bridge on the host named br0; > > 2. prepare the qemu-ifup script as below: > # cat /etc/qemu-ifup > #!/bin/bash > # A br0 bridge should be already set up. > # Compare with: > # http://en.wikibooks.org/wiki/QEMU/Networking#qemu-ifup > # > # For the bridge setup, see: > # http://wiki.libvirt.org/page/Networking#Fedora.2FRHEL_Bridging > # http://gist.github.com/393525 > ip link set "$1" up > nmcli c add type bridge-slave ifname $1 con-name $1 master br0 autoconnect > yes > > 3. start vm with below interface setting: > # virsh dumpxml rh | grep /interface -B5 > > > > >function='0x0'/> > > # virsh start rh > Domain rh started > > 4.check on guest, the interface can not get dhcp ip address; > > 5. check on host, > # nmcli con > NAMEUUID TYPE DEVICE > br0 f68f73c7-10ee-40c1-bb09-3366d11ac896 bridgebr0 > ... > vnet0 90a48d77-dccc-4b59-98f5-09f8cbd62458 ethernet -- > > # nmcli dev > DEVICE TYPE STATE CONNECTION > br0 bridgeconnected br0 > ... > vnet0 tun unmanaged -- > > 6. hotplug a bridge type interface and compare the tap devices: > # virsh attach-interface rh bridge br0 --model virtio > Interface attached successfully > > # nmcli con > NAMEUUID TYPE DEVICE > br0 f68f73c7-10ee-40c1-bb09-3366d11ac896 bridgebr0 > vnet1 07c2a1f8-396f-4d5f-b61f-ef2ddb42ed93 tun vnet1--->the > hot-plugged one > ... > vnet0 90a48d77-dccc-4b59-98f5-09f8cbd62458 ethernet -- > the > ethernet one > > # nmcli dev > DEVICE TYPE STATE CONNECTION > vnet1 tun connected (externally) vnet1 --->the > hot-plugged one > vnet0 tun unmanaged -- > the ethernet one > ... > > 7. from the outputs above, the back-end tun device for ethernet type > interface is unmanaged. > I don't know how to update the script to fix it. Could you please help? > > > --- > Best Regards, > Yalan Zhang > IRC: yalzhang >
about the script /etc/qemu-ifup with nmcli command
Hi, I have tried the qemu-ifup script as below with nmcli command as brctl is deprecated on rhel8, but the guest network can not work. I think the script needs update. Could you please help to have a look? Thank you in advance. 1. prepare a linux bridge on the host named br0; 2. prepare the qemu-ifup script as below: # cat /etc/qemu-ifup #!/bin/bash # A br0 bridge should be already set up. # Compare with: # http://en.wikibooks.org/wiki/QEMU/Networking#qemu-ifup # # For the bridge setup, see: # http://wiki.libvirt.org/page/Networking#Fedora.2FRHEL_Bridging # http://gist.github.com/393525 ip link set "$1" up nmcli c add type bridge-slave ifname $1 con-name $1 master br0 autoconnect yes 3. start vm with below interface setting: # virsh dumpxml rh | grep /interface -B5 # virsh start rh Domain rh started 4.check on guest, the interface can not get dhcp ip address; 5. check on host, # nmcli con NAMEUUID TYPE DEVICE br0 f68f73c7-10ee-40c1-bb09-3366d11ac896 bridgebr0 ... vnet0 90a48d77-dccc-4b59-98f5-09f8cbd62458 ethernet -- # nmcli dev DEVICE TYPE STATE CONNECTION br0 bridgeconnected br0 ... vnet0 tun unmanaged -- 6. hotplug a bridge type interface and compare the tap devices: # virsh attach-interface rh bridge br0 --model virtio Interface attached successfully # nmcli con NAMEUUID TYPE DEVICE br0 f68f73c7-10ee-40c1-bb09-3366d11ac896 bridgebr0 vnet1 07c2a1f8-396f-4d5f-b61f-ef2ddb42ed93 tun vnet1--->the hot-plugged one ... vnet0 90a48d77-dccc-4b59-98f5-09f8cbd62458 ethernet -- > the ethernet one # nmcli dev DEVICE TYPE STATE CONNECTION vnet1 tun connected (externally) vnet1 --->the hot-plugged one vnet0 tun unmanaged -- > the ethernet one ... 7. from the outputs above, the back-end tun device for ethernet type interface is unmanaged. I don't know how to update the script to fix it. Could you please help? --- Best Regards, Yalan Zhang IRC: yalzhang