Enabling Hyper-V on Windows 10 not working - windows

When I run Enable-WindowsOptionalFeature -Online -FeatureName:Microsoft-Hyper-V-All I get Error Code: 0x800f0831
I know online it says it is typically a .NET error, but I have double checked that .NET is installed properly.
I've tried the scan now commands and I've tried enabling it in safe mode and through Powershell with no luck.
Why can't I enable Hyper-V on this laptop?

Related

Docker stopped working on windows 10 after installing android emulator

My problem is that docker worked in my windows 10 up until yesterday after I re installed android studio to my computer. It keps on telling me that:
Hardware assisted virtualization and data execution protection must be
enabled in the BIOS. See
https://docs.docker.com/docker-for-windows/troubleshoot/#virtualization
And I don't seem to have hyper-v in my " Turn Windows features on or off " but in task manager it seems to be there. I followed the instruction on the link but it still doesn't work. I have tried to uninstall both docker and android studio. I'm at loss here nothing I have tried so far have changed anything.
Docker requires both hardware virtualization (configured in BIOS) and Hyper-V (configured in Windows) enabled on your machine.
You can check if hardware virtualization is enabled with the PowerShell command (gcim Win32_ComputerSystem).HypervisorPresent If false, you must enable hardware virtualization in your BIOS.
After verifying your BIOS settings, you can check if Hyper-V is enabled by running (Get-WindowsOptionalFeature -FeatureName Microsoft-Hyper-V-All -Online).State To enable Hyper-V, run Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V –All
from an administrator PowerShell session.
If both features are enabled, there is likely an issue with your Docker installation. I would suggest completely removing Docker and subsequently reinstalling per Microsoft's recommendations.
What worked for me was to type the following command into cmd or PowerShell:
bcdedit /set hypervisorlaunchtype auto
Other possible solutions are described here: Docker for Windows error: "Hardware assisted virtualization and data execution protection must be enabled in the BIOS"

Not able to start Minikube - with HyperV

I have been consistently getting above error, I am not able to understand what's wrong when it was working till date. I tried in powershell with following command no luck #(Get-Module -ListAvailable hyper-v).Name | Get-Unique
But I can see Hyper-v enabled and can see by navigating Hyper-v manager window.
System Info:
Minikube version 1.12.3
Windows powershell exists
Hyper-V enabled
WSL2 installed on Windows 10 OS
When I execute below command in PowerShell I get below response
Whereas when I try executing command Get-Module -Name Hyper-V -ListAvailable no output available.
PS C:\WINDOWS\system32> #(Get-Command Get-VM).ModuleName
Hyper-V
Are you using Windows 10 Home or Enterprise/Pro version? I faced the similar issue when I tried it on Windows 10 Home version and came to know that Microsoft-Hyper-V-Management-PowerShell is not available in Windows 10 home. See this link. It worked when I tried it in Enterprise version. Hope this works for you.

Vmware Vsphere snapshot restore Win2008 R2 BOOTMGR is missing

I took a snapshot using Vsphere 5.1 yesterday for my Windows 2008 R2 VM. Today when I restored my VM using this snapshot, the VM failed to start up and it is telling me with the following message:
"BOOTMGR is missing, Press Ctrl+Alt+Del to restart"
A little search online seems to fetch the conclusion that this happens from time to time with Windows 2008 or windows 7 VMs, in that when the VM software compressed the system to make a snapshot, it compressed the boot section too, and on restore the guest OS did not like this, and can not find the boot bios.
Is there anyway I can restore this? Perhaps from the Vsphere command line to rebuild the bootmgr?
Resolved by booting from Windows 2008 CD, going to recovery and then command prompt and doing these commands:
Type Bootrec /RebuildBcd, and then press ENTER.
Reboot, go back into recovery mode and command prompt again, this time selecting the windows 2008 installation that was rebuilt.
Go to X:\Sources\Recovery and run startrep.exe

VMWare Workstation cannot run on Windows 10 after recent update to Windows 10

I've Windows 10 Pro system, and use Hyper-V on that system. Due to the needs of device redirection doesn't works well with Hyper-V, I've installed VMWare Workstation 14.
I have to disable Hyper-V to make VMWare Workstation work, at beginning. It worked until last weekend , seems because of the QFE update. I just verified, it was not QFE but Feature update to Windows 10, version 1803 that triggered the problem with VMWare Workstation again.
After Windows update completed (after reboot), I tried to start a VM in VMWare. I get the error dialog complaining about Device/Credential Guard.
Following the instruction in this link: https://kb.vmware.com/s/article/2146361, and after the reboot, I get another complaint about incompatibility with Hyper-V.
After reset the Hyper-V selection in Windows Feature or confirm that HyperV is not already removed, and reboot, the first error came back.
It gets in a loop of error complaining about Device Guard and complaining about Hyper-V for VMWare.
Ok, thanks to the answer from communities of VMWare: https://communities.vmware.com/thread/588526
The issue is now gone, by applying the following change:
Disable credential guard by using readiness tool from Microsoft: https://www.microsoft.com/en-us/download/details.aspx?id=53337, with this command: DG_Readiness_Tool_v3.2.ps1 -disable
Disable Hyper-V by using PowerShell command: Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V
Reboot and accept to boot without CG/DG.
Although I don't like that VMWare cannot work together with device guard from system, I get my VM working for the moment.
1- run cmd as admin
2- run : bcdedit /set hypervisorlaunchtype off
3- reboot
let me knew if it works please
good luck
here are the few steps for you to solve this issue:
Disable the HvHost service (and any other services with prefix Hyper-V if needed) from windows TaskManager(Ctrl+Alt+Del)
use the tool from the official website
Uncompress the downloaded zip file to your own directory, take C:\DG_Readiness_Tool_v3.5 here for instance.
Run Windows PowerShell as admin, type the following two commands:
cd C:\DG_Readiness_Tool_v3.5
.\DG_Readiness_Tool_v3.5.ps1 -Disable
Reboot
Adrian at https://answers.microsoft.com/en-us/windows/forum/windows_10-security/cannot-disable-memory-integrity-core-isolation-in/29ac5ce4-30d2-47d1-ab17-734980fd287b
says "I think it's a bug that this cannot be disabled via UI but fortunately it's possible through the registry by setting the following key to 0:"
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\HypervisorEnforcedCodeIntegrity\Enabled
This worked for me as well [Windows 10 Pro Version 1803(OS Build 17134.112, VMWare Workstation 14 Pro Version 14.1.2]

Cannot start docker after installation on Windows

I am a new to Docker. After the installation of Docker Toolbox (OS: Windows 10) I run Docker Quickstart Terminal and in the console I see this:
Running pre-create checks...
Error wirh pre-create check: "Hyper-V is installed. VirtualBox won't boot a 64bits VM when Hyper-V is activated. It it's installed but deactivated, you can use --virtualbox-no-vtx-check to try anyways"
Look like something went wrong in step 'Checking if machine default exists'...
Press any key to continue...
What did I do wrong? All checking of system and install steps are taken from here.
Thank you very much for your help!
Hyper-V and VirtualBox are conflicting each other.
You can either uninstall Hyper-V or run
docker-machine create -d virtualbox --virtualbox-no-vtx-check test
Source
Docker supports Hyper-V as the driver
You need to perform the following steps:
Create a virtual switch, refer to this article on how to do that
Create a docker machine using that network switch and hyper-V driver.
docker-machine create -d hyperv --hyperv-virtual-switch "name of the virtual switch created above" default
I got the same error when I installed Docker Toolbox on my Windows 10 machine.
Solution:
Install Docker Community Edition (not Docker Toolbox)
Enable Hyper-V
Open Control Panel -> System and Security -> Programs (left panel) -> Turn Windows features on or off -> Check the Hyper-V box
As of 2017's Win 10, if you don't have Hyper-V option, then your Windows OS is not Enterprise Edition. Also, Docker seems to work a lot better on Intel processors (not AMD).
Add C:\Program Files\Docker\Docker\resources\bin to Path in Environmental Variables.
Open Git Bash and type docker-compose up and now that command should work.
If you don't have GitBash, please download it.
I was having the same issue, and this blog post solved it. The author runs you through the steps of adding the --virtualbox-no-vtx-check flag to the docker shell script.
Virtualbox and Hyper-V don't play well together. I am NOT the author.
I set the Hyper-V off using windows feature on off and it worked for me.
See if when you run:
docker-machine create -d hyperv --hyperv-virtual-switch "Virtual Switch" default
you get Error with: pre-create check: "Hyper-V PowerShell Module is not available"
If so just enable in Docker(icon on your desktop)->settings->expose daemon on TCP ...
You need to disable Hypervisor to check new application that use VT-x before the virtual machine launch:
Open the command prompt as Administrator
Run bcdedit to check hypervisor status:
Check hypervisor launch type.
If is set to auto then disable it:
bcdedit /set hypervisorlaunchtype off
Reboot host machine and launch VirtualBox again
After performing above steps I opened again Docker Quickstart terminal and it is working fine.
I pressed the Windows Button on keyboard. Typed 'Hyper-V Manager'. It opened the 'Hyper-V Manager'. Then I right clicked on my machine name. There was an option to 'stop'. I selected this option. It stopped the 'Hyper-V' on my machine and then Kitematic worked fine, i.e., it download the hello-world-nginx and displayed the web page.
NOTE: This is strange and I am not sure why. Once I have done above steps, now when I restarted the Hyper-V using Hyper-V Manager, Kitematic is still working and downloading images. Can anybody comment why it is now still working when Hyper-V is also running ? Thank you.
Good
Ali Ahsan
The solution as suggested by #Gene is correct and works perfectly if:
One has windows pro edition
Both Hyper-V Management Tools and Hyper-V Platform are enabled
Sometime this isn't always the case; here is what to do:
Check Windows Edition:
To check which version right click on Windows key and select System.
Scroll down to Windows specifications and look at [Edition]
Check Hyper-V Platform (virtualisation)
For Hyper-V Platform to be enabled one must turn on virtualisation; normally this is done via the BIOS.
On HP laptop one this is done from the BIOS.
On start-up click Ctrl+F10
Press the right arrow key to System Configuration tab.
Select Virtualization Technology and then press the Enter key.
Select Enabled and press the Enter key.
Once these steps are done then:
Search for Turn Windows features on or off.
Scroll down to Hyper-V
Tick this box (Ensure you see a tick NOT a black box which indicates some features not enabled)
Upon restart docker should be running... good luck !!

Resources