mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 20:45:18 +00:00
qemu: improve the error when try to undefine transient network
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1315059 Signed-off-by: Shanzhi Yu <shyu@redhat.com>
This commit is contained in:
parent
47fdf9bc3a
commit
347035f959
@ -3222,6 +3222,12 @@ networkUndefine(virNetworkPtr net)
|
||||
if (virNetworkObjIsActive(network))
|
||||
active = true;
|
||||
|
||||
if (!network->persistent) {
|
||||
virReportError(VIR_ERR_OPERATION_INVALID, "%s",
|
||||
_("can't undefine transient network"));
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
/* remove autostart link */
|
||||
if (virNetworkDeleteConfig(driver->networkConfigDir,
|
||||
driver->networkAutostartDir,
|
||||
|
Loading…
x
Reference in New Issue
Block a user