How do i stop a device in networkmanager on redhat?
-
Show the status of devices.
$ nmcli device status DEVICE TYPE STATE CONNECTION virbr0 bridge connected virbr0 eth0 ethernet connected eth0 vnet0 tun connected vnet0 lo loopback unmanaged -- virbr0-nic tun unmanaged --
I want to disconnect device vnet0, and ensure it does not get started in anyway. See quote from redhat documentation below.
It is recommended to use nmcli dev disconnect iface-name rather than nmcli con down id id-string because disconnection places the interface into a “manual” mode, in which no automatic connection will be started until the user tells NetworkManager to start a connection or until an external event like a carrier change, hibernate, or sleep, occurs.
$ sudo nmcli dev disconnect vnet0 Device 'vnet0' successfully disconnected.
Check the device status again. It has changed to unmanaged.
$ nmcli device status DEVICE TYPE STATE CONNECTION virbr0 bridge connected virbr0 eth0 ethernet connected eth0 lo loopback unmanaged -- virbr0-nic tun unmanaged -- vnet0 tun unmanaged --
© Lightnetics 2024