From 9db097544fec4d4ee282ff4a78f77acf5dfc611f Mon Sep 17 00:00:00 2001 From: josedonizetti Date: Thu, 30 May 2019 14:50:02 -0300 Subject: [PATCH] Add kvm network name validation --- pkg/drivers/kvm/network.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/drivers/kvm/network.go b/pkg/drivers/kvm/network.go index 20400eca40a5..b286e412e2fe 100644 --- a/pkg/drivers/kvm/network.go +++ b/pkg/drivers/kvm/network.go @@ -108,6 +108,11 @@ func (d *Driver) ensureNetwork() error { // createNetwork is called during creation of the VM only (and not on start) func (d *Driver) createNetwork() error { + + if d.Network == defaultPrivateNetworkName { + return fmt.Errorf("KVM network can't be named %s. This is the name of the private network created by minikube", defaultPrivateNetworkName) + } + conn, err := getConnection() if err != nil { return errors.Wrap(err, "getting libvirt connection")