Skip to content

Commit 167d158

Browse files
committed
Add flag for disabling the VirtualBox VTX check
Currently this is broken upstream, provide workaround... Already available in docker-machine, so port to minikube.
1 parent 8cae13f commit 167d158

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

cmd/minikube/cmd/start.go

+3
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ const (
8585
vsockPorts = "hyperkit-vsock-ports"
8686
gpu = "gpu"
8787
embedCerts = "embed-certs"
88+
noVTXCheck = "no-vtx-check"
8889
)
8990

9091
var (
@@ -139,6 +140,7 @@ func init() {
139140
startCmd.Flags().String(vpnkitSock, "", "Location of the VPNKit socket used for networking. If empty, disables Hyperkit VPNKitSock, if 'auto' uses Docker for Mac VPNKit connection, otherwise uses the specified VSock.")
140141
startCmd.Flags().StringSlice(vsockPorts, []string{}, "List of guest VSock ports that should be exposed as sockets on the host (Only supported on with hyperkit now).")
141142
startCmd.Flags().Bool(gpu, false, "Enable experimental NVIDIA GPU support in minikube (works only with kvm2 driver on Linux)")
143+
startCmd.Flags().Bool(noVTXCheck, false, "Disable checking for the availability of hardware virtualization before the vm is started (virtualbox)")
142144
viper.BindPFlags(startCmd.Flags())
143145
RootCmd.AddCommand(startCmd)
144146
}
@@ -282,6 +284,7 @@ func generateConfig(cmd *cobra.Command, kVersion string) (cfg.Config, error) {
282284
DisableDriverMounts: viper.GetBool(disableDriverMounts),
283285
UUID: viper.GetString(uuid),
284286
GPU: viper.GetBool(gpu),
287+
NoVTXCheck: viper.GetBool(noVTXCheck),
285288
},
286289
KubernetesConfig: cfg.KubernetesConfig{
287290
KubernetesVersion: kVersion,

pkg/minikube/config/types.go

+1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ type MachineConfig struct {
5252
NFSSharesRoot string
5353
UUID string // Only used by hyperkit to restore the mac address
5454
GPU bool // Only used by kvm2
55+
NoVTXCheck bool // Only used by virtualbox
5556
}
5657

5758
// KubernetesConfig contains the parameters used to configure the VM Kubernetes.

pkg/minikube/drivers/virtualbox/driver.go

+1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ func createVirtualboxHost(config cfg.MachineConfig) interface{} {
4646
d.DiskSize = int(config.DiskSize)
4747
d.HostOnlyCIDR = config.HostOnlyCIDR
4848
d.NoShare = config.DisableDriverMounts
49+
d.NoVTXCheck = config.NoVTXCheck
4950
d.NatNicType = defaultVirtualboxNicType
5051
d.HostOnlyNicType = defaultVirtualboxNicType
5152
d.DNSProxy = false

0 commit comments

Comments
 (0)