Hypervisor-101-in-Rust icon indicating copy to clipboard operation
Hypervisor-101-in-Rust copied to clipboard

On Windows, the provided VMware VM cannot be started when Hyper-V is enabled

Open tandasat opened this issue 1 year ago • 0 comments

On Windows, the provided VMware VM cannot be started when Hyper-V is enabled, which is almost always the case. This issue describes workaround for it.

The issue exists because the provided VMware VM requires nested virtualization to be enabled, which is not possible when Hyper-V is enabled on the host.

Here are two workaround:

  1. Disable Hyper-V when running VMware, and re-enable it when building the project.
  2. Disable Hyper-V indefinitely and work on WSL version 1 Ubuntu.

About (1)

It is good for trial.

Run this command in the administrator command prompt when you need to run the VM.

bcdedit /set hypervisorlaunchtype off
shutdown /r

This disables WSL if it is version 2, which is default, and prevents you from successfully running cargo xtask vmware. Whenever you need to rebuild the project, re-enable Hyper-V.

bcdedit /set hypervisorlaunchtype auto
shutdown /r

About (2)

This provides better workflow. After disabling Hyper-V in the same way as above, change the WSL version on the Administrator command prompt.

wsl --set-default-version 1

Then, create a Ubuntu WSL instance. This allows the VMware VM to start while all other instructions and workflow remain to work. If you need to test with VMware frequently, this setup is recommended. This is my Windows setup as well.

tandasat avatar Apr 27 '23 15:04 tandasat