Skip to content

Commit 9db0975

Browse files
committed
Add kvm network name validation
1 parent 722f501 commit 9db0975

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pkg/drivers/kvm/network.go

+5
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,11 @@ func (d *Driver) ensureNetwork() error {
108108

109109
// createNetwork is called during creation of the VM only (and not on start)
110110
func (d *Driver) createNetwork() error {
111+
112+
if d.Network == defaultPrivateNetworkName {
113+
return fmt.Errorf("KVM network can't be named %s. This is the name of the private network created by minikube", defaultPrivateNetworkName)
114+
}
115+
111116
conn, err := getConnection()
112117
if err != nil {
113118
return errors.Wrap(err, "getting libvirt connection")

0 commit comments

Comments
 (0)