Can't able to run any VM program in a instance

Running win server 2022 GUI , installed vware workstation error saying vt-x not enabled. Blue stacks not working anything with virtualization not working

2 1 43
1 REPLY 1

Hello @Rahulvdb ,

Attaching here the documentation for enabling nested virtualization for VM instances. Included in the documentation the requirements needed before enabling the nested virtualization.

Enable nested virtualization directly on a new or existing VM by setting the enableNestedVirtualization field to true while creating the VM or by updating the VM.
  • For enabling nested virtualization directly on a new VM, you need the compute.instances.create permissions on the project, folder, or organization.

Enable nested virtualization directly on a VM by using the following procedure.

Create an L1 VM with nested virtualization enabled by using the following gcloud compute instances create command:

gcloud compute instances create VM_NAME \
  --enable-nested-virtualization \
  --zone=ZONE \
  --min-cpu-platform="Intel Haswell"

Replace the following:

  • VM_NAME: the name of the new L1 VM with nested virtualization enabled

  • ZONE: the zone for the new L1 VM with nested virtualization enabled

Enable nested virtualization on an existing VM by using the following procedure.

1. Export the properties of the VM by using the following gcloud compute instances export command:

gcloud compute instances export VM_NAME \
  --destination=YAML_FILE_PATH \
  --zone=ZONE
  1. Replace the following:

    • VM_NAME: the name of the VM from which to export properties

    • YAML_FILE_PATH: the path and file name of a .yaml file in which to save the exported configuration data

    • ZONE: the zone that contains the VM

  2. In the VM configuration file that was saved in FILE_PATH, update the value for enableNestedVirtualization. If the value is not in the file, add the following:

    advancedMachineFeatures:
      enableNestedVirtualization: true
3. Update the VM with the value for enableNestedVirtualization by using the following gcloud compute instances update-from-file command:
gcloud compute instances update-from-file VM_NAME \
  --source=FILE_PATH \
  --most-disruptive-allowed-action=RESTART \
  --zone=ZONE

Replace the following:

  • VM_NAME: the name of the VM to update

  • FILE_PATH: the path to the updated VM configuration file

  • ZONE: the zone that contains the VM to update

You can confirm if the Nested Virtualization was enabled by:

1. Connect to the VM instance.

gcloud compute ssh VM_NAME

2. Confirm that nested virtualization is enabled. Any response other than 0 confirms that nested virtualization is enabled.

grep -cw vmx /proc/cpuinfo