Skip to content

Commit 3342d3a

Browse files
Merge pull request #12811 from nbusseneau/pr/fix-virtualbox-ip
virtualbox: change default `host-only-cidr`
2 parents 9dde4cb + 02a43c5 commit 3342d3a

File tree

28 files changed

+59
-58
lines changed

28 files changed

+59
-58
lines changed

cmd/minikube/cmd/start_flags.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ func initDriverFlags() {
205205
startCmd.Flags().Int(kvmNUMACount, 1, "Simulate numa node count in minikube, supported numa node count range is 1-8 (kvm2 driver only)")
206206

207207
// virtualbox
208-
startCmd.Flags().String(hostOnlyCIDR, "192.168.99.1/24", "The CIDR to be used for the minikube VM (virtualbox driver only)")
208+
startCmd.Flags().String(hostOnlyCIDR, "192.168.59.1/24", "The CIDR to be used for the minikube VM (virtualbox driver only)")
209209
startCmd.Flags().Bool(dnsProxy, false, "Enable proxy for NAT DNS requests (virtualbox driver only)")
210210
startCmd.Flags().Bool(hostDNSResolver, true, "Enable host resolver for NAT DNS requests (virtualbox driver only)")
211211
startCmd.Flags().Bool(noVTXCheck, false, "Disable checking for the availability of hardware virtualization before the vm is started (virtualbox driver only)")

pkg/minikube/config/profile_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ func TestGetPrimaryControlPlane(t *testing.T) {
280280
expectedName string
281281
}{
282282
{"old style", "p1", "192.168.64.75", 8443, "minikube"},
283-
{"new style", "p2_newformat", "192.168.99.136", 8443, "m01"},
283+
{"new style", "p2_newformat", "192.168.59.136", 8443, "m01"},
284284
}
285285

286286
for _, tc := range tests {

pkg/minikube/config/testdata/.minikube/profiles/p1/config.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"DockerEnv": null,
1414
"InsecureRegistry": null,
1515
"RegistryMirror": null,
16-
"HostOnlyCIDR": "192.168.99.1/24",
16+
"HostOnlyCIDR": "192.168.59.1/24",
1717
"HypervVirtualSwitch": "",
1818
"KVMNetwork": "default",
1919
"KVMQemuURI": "qemu:///system",
@@ -47,4 +47,4 @@
4747
"ShouldLoadCachedImages": true,
4848
"EnableDefaultCNI": false
4949
}
50-
}
50+
}

pkg/minikube/config/testdata/.minikube/profiles/p2_newformat/config.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"DockerEnv": null,
1313
"InsecureRegistry": null,
1414
"RegistryMirror": null,
15-
"HostOnlyCIDR": "192.168.99.1/24",
15+
"HostOnlyCIDR": "192.168.59.1/24",
1616
"HypervVirtualSwitch": "",
1717
"KVMNetwork": "default",
1818
"KVMQemuURI": "qemu:///system",
@@ -46,11 +46,11 @@
4646
"Nodes": [
4747
{
4848
"Name": "m01",
49-
"IP": "192.168.99.136",
49+
"IP": "192.168.59.136",
5050
"Port": 8443,
5151
"KubernetesVersion": "v1.15.0",
5252
"ControlPlane": true,
5353
"Worker": true
5454
}
5555
]
56-
}
56+
}

pkg/minikube/config/testdata/.minikube/profiles/p5_partial_config/config.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"DockerEnv": null,
1313
"InsecureRegistry": null,
1414
"RegistryMirror": null,
15-
"HostOnlyCIDR": "192.168.99.1/24",
15+
"HostOnlyCIDR": "192.168.59.1/24",
1616
"HypervVirtualSwitch": "",
1717
"KVMNetwork": "default",
1818
"KVMQemuURI": "qemu:///system",
@@ -44,4 +44,4 @@
4444
"ShouldLoadCachedImages": true,
4545
"EnableDefaultCNI": false
4646
}
47-
}
47+
}

pkg/minikube/config/testdata/delete-all/.minikube/profiles/p1/config.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"DockerEnv": null,
1313
"InsecureRegistry": null,
1414
"RegistryMirror": null,
15-
"HostOnlyCIDR": "192.168.99.1/24",
15+
"HostOnlyCIDR": "192.168.59.1/24",
1616
"HypervVirtualSwitch": "",
1717
"KVMNetwork": "default",
1818
"KVMQemuURI": "qemu:///system",
@@ -46,4 +46,4 @@
4646
"ShouldLoadCachedImages": true,
4747
"EnableDefaultCNI": false
4848
}
49-
}
49+
}

pkg/minikube/config/testdata/delete-all/.minikube/profiles/p4_partial_profile_config/config.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"DockerEnv": null,
1313
"InsecureRegistry": null,
1414
"RegistryMirror": null,
15-
"HostOnlyCIDR": "192.168.99.1/24",
15+
"HostOnlyCIDR": "192.168.59.1/24",
1616
"HypervVirtualSwitch": "",
1717
"KVMNetwork": "default",
1818
"KVMQemuURI": "qemu:///system",
@@ -44,4 +44,4 @@
4444
"ShouldLoadCachedImages": true,
4545
"EnableDefaultCNI": false
4646
}
47-
}
47+
}

pkg/minikube/config/testdata/delete-all/.minikube/profiles/p5_missing_machine_config/config.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"DockerEnv": null,
1313
"InsecureRegistry": null,
1414
"RegistryMirror": null,
15-
"HostOnlyCIDR": "192.168.99.1/24",
15+
"HostOnlyCIDR": "192.168.59.1/24",
1616
"HypervVirtualSwitch": "",
1717
"KVMNetwork": "default",
1818
"KVMQemuURI": "qemu:///system",
@@ -46,4 +46,4 @@
4646
"ShouldLoadCachedImages": true,
4747
"EnableDefaultCNI": false
4848
}
49-
}
49+
}

pkg/minikube/config/testdata/delete-all/.minikube/profiles/p6_empty_machine_config/config.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"DockerEnv": null,
1313
"InsecureRegistry": null,
1414
"RegistryMirror": null,
15-
"HostOnlyCIDR": "192.168.99.1/24",
15+
"HostOnlyCIDR": "192.168.59.1/24",
1616
"HypervVirtualSwitch": "",
1717
"KVMNetwork": "default",
1818
"KVMQemuURI": "qemu:///system",
@@ -46,4 +46,4 @@
4646
"ShouldLoadCachedImages": true,
4747
"EnableDefaultCNI": false
4848
}
49-
}
49+
}

pkg/minikube/config/testdata/delete-all/.minikube/profiles/p7_invalid_machine_config/config.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"DockerEnv": null,
1313
"InsecureRegistry": null,
1414
"RegistryMirror": null,
15-
"HostOnlyCIDR": "192.168.99.1/24",
15+
"HostOnlyCIDR": "192.168.59.1/24",
1616
"HypervVirtualSwitch": "",
1717
"KVMNetwork": "default",
1818
"KVMQemuURI": "qemu:///system",
@@ -46,4 +46,4 @@
4646
"ShouldLoadCachedImages": true,
4747
"EnableDefaultCNI": false
4848
}
49-
}
49+
}

pkg/minikube/config/testdata/delete-all/.minikube/profiles/p8_partial_machine_config/config.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"DockerEnv": null,
1313
"InsecureRegistry": null,
1414
"RegistryMirror": null,
15-
"HostOnlyCIDR": "192.168.99.1/24",
15+
"HostOnlyCIDR": "192.168.59.1/24",
1616
"HypervVirtualSwitch": "",
1717
"KVMNetwork": "default",
1818
"KVMQemuURI": "qemu:///system",

pkg/minikube/config/testdata/delete-single/.minikube/profiles/p1/config.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"DockerEnv": null,
1313
"InsecureRegistry": null,
1414
"RegistryMirror": null,
15-
"HostOnlyCIDR": "192.168.99.1/24",
15+
"HostOnlyCIDR": "192.168.59.1/24",
1616
"HypervVirtualSwitch": "",
1717
"KVMNetwork": "default",
1818
"KVMQemuURI": "qemu:///system",
@@ -46,4 +46,4 @@
4646
"ShouldLoadCachedImages": true,
4747
"EnableDefaultCNI": false
4848
}
49-
}
49+
}

pkg/minikube/config/testdata/delete-single/.minikube/profiles/p4_partial_profile_config/config.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"DockerEnv": null,
1313
"InsecureRegistry": null,
1414
"RegistryMirror": null,
15-
"HostOnlyCIDR": "192.168.99.1/24",
15+
"HostOnlyCIDR": "192.168.59.1/24",
1616
"HypervVirtualSwitch": "",
1717
"KVMNetwork": "default",
1818
"KVMQemuURI": "qemu:///system",
@@ -44,4 +44,4 @@
4444
"ShouldLoadCachedImages": true,
4545
"EnableDefaultCNI": false
4646
}
47-
}
47+
}

pkg/minikube/config/testdata/delete-single/.minikube/profiles/p5_missing_machine_config/config.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"DockerEnv": null,
1313
"InsecureRegistry": null,
1414
"RegistryMirror": null,
15-
"HostOnlyCIDR": "192.168.99.1/24",
15+
"HostOnlyCIDR": "192.168.59.1/24",
1616
"HypervVirtualSwitch": "",
1717
"KVMNetwork": "default",
1818
"KVMQemuURI": "qemu:///system",
@@ -46,4 +46,4 @@
4646
"ShouldLoadCachedImages": true,
4747
"EnableDefaultCNI": false
4848
}
49-
}
49+
}

pkg/minikube/config/testdata/delete-single/.minikube/profiles/p6_empty_machine_config/config.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"DockerEnv": null,
1313
"InsecureRegistry": null,
1414
"RegistryMirror": null,
15-
"HostOnlyCIDR": "192.168.99.1/24",
15+
"HostOnlyCIDR": "192.168.59.1/24",
1616
"HypervVirtualSwitch": "",
1717
"KVMNetwork": "default",
1818
"KVMQemuURI": "qemu:///system",
@@ -46,4 +46,4 @@
4646
"ShouldLoadCachedImages": true,
4747
"EnableDefaultCNI": false
4848
}
49-
}
49+
}

pkg/minikube/config/testdata/delete-single/.minikube/profiles/p7_invalid_machine_config/config.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"DockerEnv": null,
1313
"InsecureRegistry": null,
1414
"RegistryMirror": null,
15-
"HostOnlyCIDR": "192.168.99.1/24",
15+
"HostOnlyCIDR": "192.168.59.1/24",
1616
"HypervVirtualSwitch": "",
1717
"KVMNetwork": "default",
1818
"KVMQemuURI": "qemu:///system",
@@ -46,4 +46,4 @@
4646
"ShouldLoadCachedImages": true,
4747
"EnableDefaultCNI": false
4848
}
49-
}
49+
}

pkg/minikube/config/testdata/delete-single/.minikube/profiles/p8_partial_machine_config/config.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"DockerEnv": null,
1313
"InsecureRegistry": null,
1414
"RegistryMirror": null,
15-
"HostOnlyCIDR": "192.168.99.1/24",
15+
"HostOnlyCIDR": "192.168.59.1/24",
1616
"HypervVirtualSwitch": "",
1717
"KVMNetwork": "default",
1818
"KVMQemuURI": "qemu:///system",

pkg/minikube/config/testdata/profile/.minikube/profiles/p1/config.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"DockerEnv": null,
1414
"InsecureRegistry": null,
1515
"RegistryMirror": null,
16-
"HostOnlyCIDR": "192.168.99.1/24",
16+
"HostOnlyCIDR": "192.168.59.1/24",
1717
"HypervVirtualSwitch": "",
1818
"KVMNetwork": "default",
1919
"KVMQemuURI": "qemu:///system",
@@ -46,4 +46,4 @@
4646
"ShouldLoadCachedImages": true,
4747
"EnableDefaultCNI": false
4848
}
49-
}
49+
}

pkg/minikube/config/testdata/profile/.minikube/profiles/p2_newformat/config.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"DockerEnv": null,
1313
"InsecureRegistry": null,
1414
"RegistryMirror": null,
15-
"HostOnlyCIDR": "192.168.99.1/24",
15+
"HostOnlyCIDR": "192.168.59.1/24",
1616
"HypervVirtualSwitch": "",
1717
"KVMNetwork": "default",
1818
"KVMQemuURI": "qemu:///system",
@@ -45,11 +45,11 @@
4545
"Nodes": [
4646
{
4747
"Name": "m01",
48-
"IP": "192.168.99.136",
48+
"IP": "192.168.59.136",
4949
"Port": 8443,
5050
"KubernetesVersion": "v1.15.0",
5151
"ControlPlane": true,
5252
"Worker": true
5353
}
5454
]
55-
}
55+
}

pkg/minikube/config/testdata/profile/.minikube/profiles/p5_partial_config/config.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"DockerEnv": null,
1212
"InsecureRegistry": null,
1313
"RegistryMirror": null,
14-
"HostOnlyCIDR": "192.168.99.1/24",
14+
"HostOnlyCIDR": "192.168.59.1/24",
1515
"HypervVirtualSwitch": "",
1616
"KVMNetwork": "default",
1717
"KVMQemuURI": "qemu:///system",
@@ -42,4 +42,4 @@
4242
"ShouldLoadCachedImages": true,
4343
"EnableDefaultCNI": false
4444
}
45-
}
45+
}

pkg/minikube/kubeconfig/kubeconfig_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ func minikubeConfig(config *api.Config) {
559559
// cluster
560560
clusterName := "minikube"
561561
cluster := api.NewCluster()
562-
cluster.Server = "https://192.168.99.100:" + strconv.Itoa(constants.APIServerPort)
562+
cluster.Server = "https://192.168.59.100:" + strconv.Itoa(constants.APIServerPort)
563563
cluster.CertificateAuthority = "/home/tux/.minikube/apiserver.crt"
564564
config.Clusters[clusterName] = cluster
565565

pkg/minikube/machine/client_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import (
3232

3333
const vboxConfig = `
3434
{
35-
"IPAddress": "192.168.99.101",
35+
"IPAddress": "192.168.59.101",
3636
"MachineName": "minikube",
3737
"SSHUser": "docker",
3838
"SSHPort": 33627,
@@ -50,7 +50,7 @@ const vboxConfig = `
5050
"Boot2DockerURL": "file:///home/sundarp/.minikube/cache/iso/minikube-v1.0.6.iso",
5151
"Boot2DockerImportVM": "",
5252
"HostDNSResolver": false,
53-
"HostOnlyCIDR": "192.168.99.1/24",
53+
"HostOnlyCIDR": "192.168.59.1/24",
5454
"HostOnlyNicType": "82540EM",
5555
"HostOnlyPromiscMode": "deny",
5656
"UIType": "headless",

pkg/minikube/service/service_test.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -364,9 +364,9 @@ func TestOptionallyHttpsFormattedUrlString(t *testing.T) {
364364
}{
365365
{
366366
description: "no https for http schemed with no https option",
367-
bareURLString: "http://192.168.99.100:30563",
367+
bareURLString: "http://192.168.59.100:30563",
368368
https: false,
369-
expectedHTTPSFormattedURLString: "http://192.168.99.100:30563",
369+
expectedHTTPSFormattedURLString: "http://192.168.59.100:30563",
370370
expectedIsHTTPSchemedURL: true,
371371
},
372372
{
@@ -378,9 +378,9 @@ func TestOptionallyHttpsFormattedUrlString(t *testing.T) {
378378
},
379379
{
380380
description: "https for http schemed with https option",
381-
bareURLString: "http://192.168.99.100:30563",
381+
bareURLString: "http://192.168.59.100:30563",
382382
https: true,
383-
expectedHTTPSFormattedURLString: "https://192.168.99.100:30563",
383+
expectedHTTPSFormattedURLString: "https://192.168.59.100:30563",
384384
expectedIsHTTPSchemedURL: true,
385385
},
386386
{
@@ -568,7 +568,7 @@ func TestGetCoreClient(t *testing.T) {
568568
mockK8sConfig := `apiVersion: v1
569569
clusters:
570570
- cluster:
571-
server: https://192.168.99.102:8443
571+
server: https://192.168.59.102:8443
572572
name: minikube
573573
contexts:
574574
- context:

pkg/minikube/tunnel/route_windows_test.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -119,18 +119,18 @@ Network Destination Netmask Gateway Interface Metric
119119
192.168.56.0 255.255.255.0 On-link 192.168.56.1 281
120120
192.168.56.1 255.255.255.255 On-link 192.168.56.1 281
121121
192.168.56.255 255.255.255.255 On-link 192.168.56.1 281
122-
192.168.99.0 255.255.255.0 On-link 192.168.99.1 281
123-
192.168.99.1 255.255.255.255 On-link 192.168.99.1 281
122+
192.168.59.0 255.255.255.0 On-link 192.168.59.1 281
123+
192.168.59.1 255.255.255.255 On-link 192.168.59.1 281
124124
10.211.55.0 255.255.255.0 192.168.1.2 10.211.55.3 281
125-
192.168.99.255 255.255.255.255 On-link 192.168.99.1 281
125+
192.168.59.255 255.255.255.255 On-link 192.168.59.1 281
126126
224.0.0.0 240.0.0.0 On-link 127.0.0.1 331
127127
224.0.0.0 240.0.0.0 On-link 10.211.55.3 281
128128
224.0.0.0 240.0.0.0 On-link 192.168.56.1 281
129-
224.0.0.0 240.0.0.0 On-link 192.168.99.1 281
129+
224.0.0.0 240.0.0.0 On-link 192.168.59.1 281
130130
255.255.255.255 255.255.255.255 On-link 127.0.0.1 331
131131
255.255.255.255 255.255.255.255 On-link 10.211.55.3 281
132132
255.255.255.255 255.255.255.255 On-link 192.168.56.1 281
133-
255.255.255.255 255.255.255.255 On-link 192.168.99.1 281
133+
255.255.255.255 255.255.255.255 On-link 192.168.59.1 281
134134
===========================================================================
135135
Persistent Routes:
136136
None`

0 commit comments

Comments
 (0)