7.5. Interface lifecycle management
In libvirt parlance, "creating" an interface means making it active, or "bringing it up", and "deleting" an interface means making it inactive, or "bringing it down". On hosts using the netcf backend for interface configuration, such as Fedora and Red Hat Enterprise Linux, this is the same as calling the system shell scripts ifup
and ifdown
for the interface.
7.5.1. Activating an interface
The
create
method makes the given inactive interface active ("up"). On success, it returns 0. If there is any problem making the interface active, -1 is returned.
Example 7.12, “Defining a new interface” shows typical usage of this method.