Setting a device online or offline

Ubuntu 22.04 LTS LPAR mode z/VM guest

Use the online device group attribute to set a device online or offline.

Procedure

To set a qeth group device online, set the online device group attribute to 1. To set a qeth group device offline, set the online device group attribute to 0.
Issue a command of the form:
# chzdev <device_bus_id> online=<flag>
This setting persists across re-boots. For more details, see Persistent device configuration.
To apply this setting to the running system only, use the chzdev command with the -a option or the sysfs attribute online:
# echo <flag> > /sys/bus/ccwgroup/drivers/qeth/<device_bus_id>/online

Results

Setting a device online associates it with an interface name. When you set a device successfully online or offline, a change uevent is created.

Setting a device offline closes this network device. If IPv6 is active, you lose any IPv6 addresses set for this device. After you set the device online, you can restore lost IPv6 addresses only by issuing the ip or an equivalent command again.

Example

To set a qeth device with bus ID 0.0.a100 online persistently, issue:
# chzdev 0.0.a100 online=1
or, for the running configuration only using sysfs:
# echo 1 > /sys/bus/ccwgroup/drivers/qeth/0.0.a100/online
To set the same device offline issue:
# chzdev 0.0.a100 online=0
or, for the running configuration only using sysfs:
# echo 0 > /sys/bus/ccwgroup/drivers/qeth/0.0.a100/online