We aren't setting the persistent bit when a network is defined, so 'destroy' makes them disappear (though they will reappear later since their persistent config is never removed). Attached patch fixes this. Thanks, Cole
Mark 'defined' networks as persistent. diff --git a/src/network_conf.c b/src/network_conf.c index e19f0fe..6ad0d01 100644 --- a/src/network_conf.c +++ b/src/network_conf.c @@ -747,6 +747,7 @@ virNetworkObjPtr virNetworkLoadConfig(virConnectPtr conn, goto error; net->autostart = autostart; + net->persistent = 1; VIR_FREE(configFile); VIR_FREE(autostartLink); diff --git a/src/network_driver.c b/src/network_driver.c index 3c765c8..4b9c666 100644 --- a/src/network_driver.c +++ b/src/network_driver.c @@ -1153,6 +1153,8 @@ static virNetworkPtr networkDefine(virConnectPtr conn, const char *xml) { goto cleanup; def = NULL; + network->persistent = 1; + if (virNetworkSaveConfig(conn, driver->networkConfigDir, network->newDef ? network->newDef : network->def) < 0) {
-- Libvir-list mailing list Libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list