From 91ec6506cef544e579fa598f9403cfe15310844b Mon Sep 17 00:00:00 2001 From: David Galloway Date: Thu, 18 May 2017 15:47:05 -0400 Subject: [PATCH] scripts: Be more aggressive with libvirt network destruction See https://github.com/vagrant-libvirt/vagrant-libvirt/issues/670#issuecomment-261964248 Can confirm that deleting the default network still allows vagrant-libvirt to run fine on Ubuntu 16.04. Signed-off-by: David Galloway --- scripts/build_utils.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build_utils.sh b/scripts/build_utils.sh index 6817bbfc..6cc5258b 100644 --- a/scripts/build_utils.sh +++ b/scripts/build_utils.sh @@ -423,7 +423,7 @@ delete_libvirt_vms() { clear_libvirt_networks() { # Sometimes, networks may linger around, so we must ensure they are killed: - networks=`sudo virsh net-list --all | grep active | egrep -v "(default|libvirt)" | cut -d ' ' -f 2` + networks=`sudo virsh net-list --all --name` for network in $networks; do sudo virsh net-destroy $network || true sudo virsh net-undefine $network || true -- 2.39.5