Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

virtualbox + AMD cpu's: This computer doesn't have VT-X/AMD-v enabled. #3706

Closed
rajinder-yadav opened this issue Feb 16, 2019 · 29 comments
Closed
Assignees
Labels
cause/libmachine-bug Bugs caused by libmachine co/virtualbox kind/bug Categorizes issue or PR as related to a bug. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Milestone

Comments

@rajinder-yadav
Copy link

BUG REPORT

Please provide the following details:

Environment:

Minikube version (use minikube version):

  • OS (e.g. from /etc/os-release):
  • VM Driver (e.g. cat ~/.minikube/machines/minikube/config.json | grep DriverName):
  • ISO version (e.g. cat ~/.minikube/machines/minikube/config.json | grep -i ISO or minikube ssh cat /etc/VERSION):
  • Install tools:
  • Others:
    The above can be generated in one go with the following commands (can be copied and pasted directly into your terminal):
minikube version
echo "";
echo "OS:";
cat /etc/os-release
echo "";
echo "VM driver:"; 
grep DriverName ~/.minikube/machines/minikube/config.json
echo "";
echo "ISO version";
grep -i ISO ~/.minikube/machines/minikube/config.json
$ minikube version
minikube version: v0.34.0
yadav@source$ echo "";

yadav@source$ echo "OS:";
OS:
yadav@source$ cat /etc/os-release
NAME="Ubuntu"
VERSION="18.04.2 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.2 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
yadav@source$ echo "";

yadav@source$ echo "VM driver:"; 
VM driver:
yadav@source$ grep DriverName ~/.minikube/machines/minikube/config.json
grep: /home/yadav/.minikube/machines/minikube/config.json: No such file or directory
yadav@source$ echo "";

yadav@source$ echo "ISO version";
ISO version
yadav@source$ grep -i ISO ~/.minikube/machines/minikube/config.json
grep: /home/yadav/.minikube/machines/minikube/config.json: No such file or directory

What happened:

Ran "ministart", after the download I get a crash

$ minikube start
😄  minikube v0.34.0 on linux (amd64)
🔥  Creating virtualbox VM (CPUs=2, Memory=2048MB, Disk=20000MB) ...
💣  Unable to start VM: create: precreate: This computer doesn't have VT-X/AMD-v enabled. Enabling it in the BIOS is mandatory

😿  Sorry that minikube crashed. If this was unexpected, we would love to hear from you:
👉  https://github.com/kubernetes/minikube/issues/new

Crashes all the time, I reboot and verified Virtualization is enabled. I have Virtualbox also running on my system with no issues.

Anything else do we need to know:

Linux version

$ uname -a
Linux source 4.15.0-45-generic #48-Ubuntu SMP Tue Jan 29 16:28:13 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

CPU Info

$ cat /proc/cpuinfo
processor       : 0
vendor_id       : AuthenticAMD
cpu family      : 16
model           : 4
model name      : AMD Phenom(tm) II X4 940 Processor
stepping        : 2
microcode       : 0x10000db
cpu MHz         : 2300.000
cache size      : 512 KB
physical id     : 0
siblings        : 4
core id         : 0
cpu cores       : 4
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 5
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt hw_pstate vmmcall npt lbrv svm_lock nrip_save
bugs            : tlb_mmatch apic_c1e fxsave_leak sysret_ss_attrs null_seg amd_e400 spectre_v1 spectre_v2
bogomips        : 6026.89
TLB size        : 1024 4K pages
clflush size    : 64
cache_alignment : 64
address sizes   : 48 bits physical, 48 bits virtual
power management: ts ttp tm stc 100mhzsteps hwpstate

processor       : 1
vendor_id       : AuthenticAMD
cpu family      : 16
model           : 4
model name      : AMD Phenom(tm) II X4 940 Processor
stepping        : 2
microcode       : 0x10000db
cpu MHz         : 800.000
cache size      : 512 KB
physical id     : 0
siblings        : 4
core id         : 1
cpu cores       : 4
apicid          : 1
initial apicid  : 1
fpu             : yes
fpu_exception   : yes
cpuid level     : 5
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt hw_pstate vmmcall npt lbrv svm_lock nrip_save
bugs            : tlb_mmatch apic_c1e fxsave_leak sysret_ss_attrs null_seg amd_e400 spectre_v1 spectre_v2
bogomips        : 6026.89
TLB size        : 1024 4K pages
clflush size    : 64
cache_alignment : 64
address sizes   : 48 bits physical, 48 bits virtual
power management: ts ttp tm stc 100mhzsteps hwpstate

processor       : 2
vendor_id       : AuthenticAMD
cpu family      : 16
model           : 4
model name      : AMD Phenom(tm) II X4 940 Processor
stepping        : 2
microcode       : 0x10000db
cpu MHz         : 800.000
cache size      : 512 KB
physical id     : 0
siblings        : 4
core id         : 2
cpu cores       : 4
apicid          : 2
initial apicid  : 2
fpu             : yes
fpu_exception   : yes
cpuid level     : 5
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt hw_pstate vmmcall npt lbrv svm_lock nrip_save
bugs            : tlb_mmatch apic_c1e fxsave_leak sysret_ss_attrs null_seg amd_e400 spectre_v1 spectre_v2
bogomips        : 6026.89
TLB size        : 1024 4K pages
clflush size    : 64
cache_alignment : 64
address sizes   : 48 bits physical, 48 bits virtual
power management: ts ttp tm stc 100mhzsteps hwpstate

processor       : 3
vendor_id       : AuthenticAMD
cpu family      : 16
model           : 4
model name      : AMD Phenom(tm) II X4 940 Processor
stepping        : 2
microcode       : 0x10000db
cpu MHz         : 1800.000
cache size      : 512 KB
physical id     : 0
siblings        : 4
core id         : 3
cpu cores       : 4
apicid          : 3
initial apicid  : 3
fpu             : yes
fpu_exception   : yes
cpuid level     : 5
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt hw_pstate vmmcall npt lbrv svm_lock nrip_save
bugs            : tlb_mmatch apic_c1e fxsave_leak sysret_ss_attrs null_seg amd_e400 spectre_v1 spectre_v2
bogomips        : 6026.89
TLB size        : 1024 4K pages
clflush size    : 64
cache_alignment : 64
address sizes   : 48 bits physical, 48 bits virtual
power management: ts ttp tm stc 100mhzsteps hwpstate
$ lscpu
Architecture:        x86_64
CPU op-mode(s):      32-bit, 64-bit
Byte Order:          Little Endian
CPU(s):              4
On-line CPU(s) list: 0-3
Thread(s) per core:  1
Core(s) per socket:  4
Socket(s):           1
NUMA node(s):        1
Vendor ID:           AuthenticAMD
CPU family:          16
Model:               4
Model name:          AMD Phenom(tm) II X4 940 Processor
Stepping:            2
CPU MHz:             800.000
CPU max MHz:         3000.0000
CPU min MHz:         800.0000
BogoMIPS:            6026.89
Virtualisation:      AMD-V
L1d cache:           64K
L1i cache:           64K
L2 cache:            512K
L3 cache:            6144K
NUMA node0 CPU(s):   0-3
Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt hw_pstate vmmcall npt lbrv svm_lock nrip_save
@afbjorklund
Copy link
Collaborator

If you are sure it is enabled and you believe the VT-x check is in error, you can disable it:

export VIRTUALBOX_NO_VTX_CHECK=true

It would be good to file a bug upstream (with VirtualBox/machine), if that is indeed the case...

It might be this change: docker/machine@5a8ce1a

It now uses https://github.com/intel-go/cpuid

This is the check: vendor/github.com/docker/machine/drivers/virtualbox/vtx_intel.go

But it should have worked, since your /proc/cpuinfo does have the "svm" feature listed.

@afbjorklund
Copy link
Collaborator

Can you go run this test program ?

package main

import (
	"fmt"
	"github.com/intel-go/cpuid"
)

// IsVTXDisabled checks if VT-x is disabled in the CPU.
func IsVTXDisabled() bool {
	if cpuid.HasFeature(cpuid.VMX) || cpuid.HasFeature(cpuid.SVM) {
		return false
	}

	return true
}

func main() {
	fmt.Printf("VendorString:   %s\n", cpuid.VendorIdentificatorString)

	fmt.Printf("Features: ")
	for i := uint64(0); i < 64; i++ {
		if cpuid.HasFeature(1 << i) {
			fmt.Printf("%s ", cpuid.FeatureNames[1<<i])
		}
	}
	fmt.Printf("\n")

	fmt.Printf("IsVTXDisabled:  %v\n", IsVTXDisabled())
}

@tstromberg
Copy link
Contributor

I'm curious, if libvirt-clients is installed, could you also include the output of virt-host-validate?

If the output looks OK, you can probably use the kvm2 driver in the mean time:
https://github.com/kubernetes/minikube/blob/master/docs/drivers.md#kvm2-driver

@rajinder-yadav
Copy link
Author

rajinder-yadav commented Feb 16, 2019

@afbjorklund

Env variable doesn't do anything, still same crash.

yadav@source$ export VIRTUALBOX_NO_VTX_CHECK=true
yadav@source$ sudo minikube start
[sudo] password for yadav: 
😄  minikube v0.34.0 on linux (amd64)
🔥  Creating virtualbox VM (CPUs=2, Memory=2048MB, Disk=20000MB) ...
💣  Unable to start VM: create: precreate: This computer doesn't have VT-X/AMD-v enabled. Enabling it in the BIOS is mandatory

😿  Sorry that minikube crashed. If this was unexpected, we would love to hear from you:
👉  https://github.com/kubernetes/minikube/issues/new

Running the go program, I get an error:
FYI: I have an AMD CPU, not Intel, so should be checking for AMD-V

yadav@source$ lscpu|grep -i amd-v
Virtualisation:      AMD-V
$ go run main.go 
main.go:5:2: cannot find package "github.com/intel-go/cpuid" in any of:
        /opt/local/apps/go/src/github.com/intel-go/cpuid (from $GOROOT)
        /home/yadav/dev/golang/work/src/github.com/intel-go/cpuid (from $GOPATH)
$ go version
go version go1.11.5 linux/amd64
egrep --color 'vmx|svm' /proc/cpuinfo
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt hw_pstate vmmcall npt lbrv svm_lock nrip_save
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt hw_pstate vmmcall npt lbrv svm_lock nrip_save
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt hw_pstate vmmcall npt lbrv svm_lock nrip_save
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt hw_pstate vmmcall npt lbrv svm_lock nrip_save

@rajinder-yadav
Copy link
Author

@tstromberg I got one fail, QEMU: Checking if device /dev/kvm is accessible ?

virt-host-validate
  QEMU: Checking for hardware virtualization                                 : PASS
  QEMU: Checking if device /dev/kvm exists                                   : PASS
  QEMU: Checking if device /dev/kvm is accessible                            : FAIL (Check /dev/kvm is world writable or you are in a group that is allowed to access it)
  QEMU: Checking if device /dev/vhost-net exists                             : PASS
  QEMU: Checking if device /dev/net/tun exists                               : PASS
  QEMU: Checking for cgroup 'memory' controller support                      : PASS
  QEMU: Checking for cgroup 'memory' controller mount-point                  : PASS
  QEMU: Checking for cgroup 'cpu' controller support                         : PASS
  QEMU: Checking for cgroup 'cpu' controller mount-point                     : PASS
  QEMU: Checking for cgroup 'cpuacct' controller support                     : PASS
  QEMU: Checking for cgroup 'cpuacct' controller mount-point                 : PASS
  QEMU: Checking for cgroup 'cpuset' controller support                      : PASS
  QEMU: Checking for cgroup 'cpuset' controller mount-point                  : PASS
  QEMU: Checking for cgroup 'devices' controller support                     : PASS
  QEMU: Checking for cgroup 'devices' controller mount-point                 : PASS
  QEMU: Checking for cgroup 'blkio' controller support                       : PASS
  QEMU: Checking for cgroup 'blkio' controller mount-point                   : PASS
  QEMU: Checking for device assignment IOMMU support                         : WARN (No ACPI IVRS table found, IOMMU either disabled in BIOS or not supported by this hardware platform)
   LXC: Checking for Linux >= 2.6.26                                         : PASS
   LXC: Checking for namespace ipc                                           : PASS
   LXC: Checking for namespace mnt                                           : PASS
   LXC: Checking for namespace pid                                           : PASS
   LXC: Checking for namespace uts                                           : PASS
   LXC: Checking for namespace net                                           : PASS
   LXC: Checking for namespace user                                          : PASS
   LXC: Checking for cgroup 'memory' controller support                      : PASS
   LXC: Checking for cgroup 'memory' controller mount-point                  : PASS
   LXC: Checking for cgroup 'cpu' controller support                         : PASS
   LXC: Checking for cgroup 'cpu' controller mount-point                     : PASS
   LXC: Checking for cgroup 'cpuacct' controller support                     : PASS
   LXC: Checking for cgroup 'cpuacct' controller mount-point                 : PASS
   LXC: Checking for cgroup 'cpuset' controller support                      : PASS
   LXC: Checking for cgroup 'cpuset' controller mount-point                  : PASS
   LXC: Checking for cgroup 'devices' controller support                     : PASS
   LXC: Checking for cgroup 'devices' controller mount-point                 : PASS
   LXC: Checking for cgroup 'blkio' controller support                       : PASS
   LXC: Checking for cgroup 'blkio' controller mount-point                   : PASS
   LXC: Checking if device /sys/fs/fuse/connections exists                   : PASS

1 similar comment
@rajinder-yadav
Copy link
Author

@tstromberg I got one fail, QEMU: Checking if device /dev/kvm is accessible ?

virt-host-validate
  QEMU: Checking for hardware virtualization                                 : PASS
  QEMU: Checking if device /dev/kvm exists                                   : PASS
  QEMU: Checking if device /dev/kvm is accessible                            : FAIL (Check /dev/kvm is world writable or you are in a group that is allowed to access it)
  QEMU: Checking if device /dev/vhost-net exists                             : PASS
  QEMU: Checking if device /dev/net/tun exists                               : PASS
  QEMU: Checking for cgroup 'memory' controller support                      : PASS
  QEMU: Checking for cgroup 'memory' controller mount-point                  : PASS
  QEMU: Checking for cgroup 'cpu' controller support                         : PASS
  QEMU: Checking for cgroup 'cpu' controller mount-point                     : PASS
  QEMU: Checking for cgroup 'cpuacct' controller support                     : PASS
  QEMU: Checking for cgroup 'cpuacct' controller mount-point                 : PASS
  QEMU: Checking for cgroup 'cpuset' controller support                      : PASS
  QEMU: Checking for cgroup 'cpuset' controller mount-point                  : PASS
  QEMU: Checking for cgroup 'devices' controller support                     : PASS
  QEMU: Checking for cgroup 'devices' controller mount-point                 : PASS
  QEMU: Checking for cgroup 'blkio' controller support                       : PASS
  QEMU: Checking for cgroup 'blkio' controller mount-point                   : PASS
  QEMU: Checking for device assignment IOMMU support                         : WARN (No ACPI IVRS table found, IOMMU either disabled in BIOS or not supported by this hardware platform)
   LXC: Checking for Linux >= 2.6.26                                         : PASS
   LXC: Checking for namespace ipc                                           : PASS
   LXC: Checking for namespace mnt                                           : PASS
   LXC: Checking for namespace pid                                           : PASS
   LXC: Checking for namespace uts                                           : PASS
   LXC: Checking for namespace net                                           : PASS
   LXC: Checking for namespace user                                          : PASS
   LXC: Checking for cgroup 'memory' controller support                      : PASS
   LXC: Checking for cgroup 'memory' controller mount-point                  : PASS
   LXC: Checking for cgroup 'cpu' controller support                         : PASS
   LXC: Checking for cgroup 'cpu' controller mount-point                     : PASS
   LXC: Checking for cgroup 'cpuacct' controller support                     : PASS
   LXC: Checking for cgroup 'cpuacct' controller mount-point                 : PASS
   LXC: Checking for cgroup 'cpuset' controller support                      : PASS
   LXC: Checking for cgroup 'cpuset' controller mount-point                  : PASS
   LXC: Checking for cgroup 'devices' controller support                     : PASS
   LXC: Checking for cgroup 'devices' controller mount-point                 : PASS
   LXC: Checking for cgroup 'blkio' controller support                       : PASS
   LXC: Checking for cgroup 'blkio' controller mount-point                   : PASS
   LXC: Checking if device /sys/fs/fuse/connections exists                   : PASS

@rajinder-yadav
Copy link
Author

rajinder-yadav commented Feb 17, 2019

@tstromberg I installed KVM driver, rebooted my system, but still getting a error, crash.

I made "/dev/kvm" world writable with, "chmod 777 /dev/kvm".

yadav@source$ sudo minikube delete
🔥  Deleting "minikube" from kvm2 ...
💔  The "minikube" cluster has been deleted.
yadav@source$ sudo minikube start --vm-driver kvm2
😄  minikube v0.34.0 on linux (amd64)
🔥  Creating kvm2 VM (CPUs=2, Memory=2048MB, Disk=20000MB) ...
💣  Unable to start VM: create: Error creating machine: Error in driver during machine creation: Error creating VM: virError(Code=1, Domain=24, Message='internal error: cannot load AppArmor profile 'libvirt-71515e41-2d68-4a13-b3d0-81d55da75a69'')

😿  Sorry that minikube crashed. If this was unexpected, we would love to hear from you:
👉  https://github.com/kubernetes/minikube/issues/new

@tstromberg
Copy link
Contributor

@rajinder-yadav - I've never seen that error, but did find it referenced on Google:

Based on those, my recommendations are to try each of these approaches, and see if you find one that works for you:

  • sudo apt install libvirt-daemon-system.
  • sudo aa-complain /usr/sbin/libvirtd
  • sudo apt remove apparmor

Thanks for helping us debug this!

@rajinder-yadav
Copy link
Author

@tstromberg thanks for you help. Uninstalling apparmor seems to fix the error, and it works with kvm driver.

minikube start --vm-driver kvm2

However I don't feel comfortable with this solution. If the original bug can be fixed, that would be super!

@rajinder-yadav
Copy link
Author

rajinder-yadav commented Feb 17, 2019

@tstromberg the KVM option now breaks my Virtualbox from running my old images.

VirtualBox can't enable the AMD-V extension. Please disable the KVM kernel extension, recompile your kernel and reboot (VERR_SVM_IN_USE).

I am back to a broken minikube start command, after uninstalling KVM to get VirtualBox working again.

@afbjorklund
Copy link
Collaborator

@rajinder-yadav : You also need to go get github.com/intel-go/cpuid, sorry for not mentioning.
Maybe the environment variable only works in docker-machine, not in libmachine (minikube) ?

The downside with the KVM(2) driver is that you can't run it at the same time as any VirtualBox VM...
So you will need to shut down all VMs first before switching to run the other VMs, and vice-versa.

@afbjorklund
Copy link
Collaborator

FYI: I have an AMD CPU, not Intel, so should be checking for AMD-V

The VTX check is supposed to look for both VMX (Intel) and SVM (AMD-V) features. See code above.

@rajinder-yadav
Copy link
Author

rajinder-yadav commented Feb 17, 2019

@afbjorklund here is the output from the run

yadav@source$ go run main.go 
VendorString:   AuthenticAMD
Features: SSE3 MONITOR CX16 POPCNT FPU VME DE PSE TSC MSR PAE MCE CX8 APIC SEP MTRR PGE MCA CMOV PAT PSE_36 CLFSH MMX FXSR SSE SSE2 HTT 
IsVTXDisabled:  true

Only one place for me to enable Virtual Machine Mode see below, it's active.
KVM is not a option for me with the switching.

amd-bios

@afbjorklund
Copy link
Collaborator

Thanks for running the test program! Unfortunately, this means the CPUID detection is buggy. 😔
It fails to detect the SVM feature, although it was clearly available in the /proc/cpuinfo output...

We inherited this with the libmachine upgrade, the problem appears upstream (with the workaround).
For minikube 1.0, we should look at either reverting the cpuid patch or at least provide NoVTXCheck

@rajinder-yadav
Copy link
Author

Glad to be of help, when could I expect a fix for my issue so I can get minikube working?

@afbjorklund
Copy link
Collaborator

The older versions should still work, libmachine moves slowly but the option should be quick:

https://github.com/kubernetes/minikube/blob/master/vendor/github.com/docker/machine/drivers/virtualbox/virtualbox.go#L71

https://github.com/kubernetes/minikube/blob/master/pkg/minikube/drivers/virtualbox/driver.go#L41

So adding some means of setting d.NoVTXCheck, similar to $VIRTUALBOX_NO_VTX_CHECK

@nob13
Copy link

nob13 commented Feb 18, 2019

Same problem with Ryzen CPU here. As a workaround, downgrading to Minikube v0.33.1 seems to work.

@Dmitriy-DE
Copy link

Same on my notebook
dmitrijd@dmitrijd-HP-Pavilion-g7-Notebook-PC:~$ minikube start
😄 minikube v0.34.1 on linux (amd64)
🔥 Creating virtualbox VM (CPUs=2, Memory=2048MB, Disk=20000MB) ...
💣 Unable to start VM: create: precreate: This computer doesn't have VT-X/AMD-v enabled. Enabling it in the BIOS is mandatory

😿 Sorry that minikube crashed. If this was unexpected, we would love to hear from you:
👉 https://github.com/kubernetes/minikube/issues/new

Using Ubuntu 18.04 LTS
AMD-v is enabled

1 similar comment
@Dmitriy-DE
Copy link

Same on my notebook
dmitrijd@dmitrijd-HP-Pavilion-g7-Notebook-PC:~$ minikube start
😄 minikube v0.34.1 on linux (amd64)
🔥 Creating virtualbox VM (CPUs=2, Memory=2048MB, Disk=20000MB) ...
💣 Unable to start VM: create: precreate: This computer doesn't have VT-X/AMD-v enabled. Enabling it in the BIOS is mandatory

😿 Sorry that minikube crashed. If this was unexpected, we would love to hear from you:
👉 https://github.com/kubernetes/minikube/issues/new

Using Ubuntu 18.04 LTS
AMD-v is enabled

@tstromberg tstromberg changed the title crash of AMD Phenom with virtuilization enabled virtualbox + AMD cpu's: This computer doesn't have VT-X/AMD-v enabled. Feb 19, 2019
@tstromberg tstromberg added kind/bug Categorizes issue or PR as related to a bug. co/virtualbox priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. cause/libmachine-bug Bugs caused by libmachine labels Feb 19, 2019
@tstromberg tstromberg added this to the v1.0.0-candidate milestone Feb 19, 2019
@RichardKnowles
Copy link

Not sure if this helps, but just to add that I have the same on a Windows 10 PC under Cygwin.

VirtualBox and AMD-v enabled in bios.

Works fine 0.33.1, broken on 0.34.0 and 0.34.1.

All versions work ok on my laptop which is also running Windows 10 under cygwin, so it's not broken everywhere but I don't know what the variation will be.

@Dmitriy-DE
Copy link

Dmitriy-DE commented Feb 21, 2019 via email

@afbjorklund
Copy link
Collaborator

I have added a workaround, for now... Seems like there is a simple upstream fix possible:

docker/machine#4669

@afbjorklund
Copy link
Collaborator

@rajinder-yadav : do you think that you could test with this modified line instead ?

	if cpuid.HasFeature(cpuid.VMX) || cpuid.HasExtraFeature(cpuid.SVM) {

@rajinder-yadav
Copy link
Author

@afbjorklund here is the output, looks good:

yadav@source$ go run main.go 
VendorString:   AuthenticAMD
Features: SSE3 MONITOR CX16 POPCNT FPU VME DE PSE TSC MSR PAE MCE CX8 APIC SEP MTRR PGE MCA CMOV PAT PSE_36 CLFSH MMX FXSR SSE SSE2 HTT 
IsVTXDisabled:  false

@afbjorklund
Copy link
Collaborator

OK, then we know the proposed fix is good. Unfortunately it will probably take "a while" for upstream...

Meanwhile you will have to disable the check, using something like: minikube start --no-vtx-check

Or we have to fork libmachine again.

Becuse machine is in "maintenance".

@johnfg2610
Copy link

I am also having the same issue, and running with the --no-vtx-check seems to just bring up the help menu
version: 0.34.1
cpu: Ryzen 2700x

@afbjorklund
Copy link
Collaborator

@johnfg10 : You need to apply the patch first, as it is not yet merged: PR #3734

@johnfg2610
Copy link

@johnfg10 : You need to apply the patch first, as it is not yet merged: PR #3734

Ahh ok thanks, um is there any documentation on building minikube, this is my first time using it and have no idea how to build it.

@afbjorklund
Copy link
Collaborator

You can wait for v1.0.0 where this will be included, or look here: docs/contributors/build_guide.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cause/libmachine-bug Bugs caused by libmachine co/virtualbox kind/bug Categorizes issue or PR as related to a bug. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Projects
None yet
Development

No branches or pull requests

7 participants