I am trying to install Minikube on a GCP VM. I am running into an issue where the OS is complaining that VT-X/AMD-v needs to be enabled. Are there any specific instructions for setting this up on GCP?
Use this link. It works with a warning that environment is outdated, and a solution is given in the warning itself. Basically you may need to upgrade guest environment. I didn't need to do anything; it just worked great. The answer above doesn't work, at least as of now (VM starts and then stops on its own).
Nested Virtualization is supported on GCP and I can confirm the documentation I've linked is up to date and workable.
Quoting the 3 basic points here that you need:
https://www.googleapis.com/compute/v1/projects/vm-options/global/licenses/enable-vmx
(this is offered at no additional cost; it simply signals GCE that you want the feature enabled on instances using this image)gcloud compute images create nested-vm-image --source-disk disk1 --source-disk-zone us-central1-a --licenses "https://www.googleapis.com/compute/v1/projects/vm-options/global/licenses/enable-vmx"
(You will have to create disk1 yourself, for example by starting an instance from an OS image, and deleting the instance afterwards while keeping the boot disk)gcloud compute images create nested-vm-image --source-image=debian-10-buster-v20200326 --source-image-project=debian-cloud --licenses="https://www.googleapis.com/compute/v1/projects/vm-options/global/licenses/enable-vmx"
gcloud compute instances create example-nested-vm --zone us-central1-b --image nested-vm-image
. Keep in mind that you need to pick a zone that has at least Haswell CPUs.SSH into the new instance and verify that the feature is enabled by running grep vmx /proc/cpuinfo
. If you get any output it means that the feature is enabled successfully.