Disable Hyper-V under Windows 10

Image of the RAW mode error.

Trying to disable Hyper-V under Windows 10 is a little trickier than simply uninstalling it; but not much!

tl;dr If you’re just interested in how to disable Hyper-V so VirtualBox can get RAW mode, skip down to the “Turning off Hyper-V” section below.

Some background

I am a fan of virtual machines but I don’t get to use them often at work. I do use them at home to evaluate operating systems like Linux from time to time for fun and staying aware.

Most of my computer use is with Microsoft platforms though I have had a few Macs and Linux desktops over the years.

The addition of the Hyper-V into the Windows 10 operating system is exciting because it reduces the number of software setups required after a new  setup – everybody has time for that!

I have  been digging into privacy and security lately; No doubt you’ve seen the data-breaches and customer privacy abuse headlines over the years.

I have used Tor browser by the Tor Project which led me to their Tails operating system, “a live operating system that you can start on almost any computer from a USB stick or a DVD.

The plot thickens

While looking into Tails, two other security and privacy minded operating systems were found to be more recommended (high counts of recommendations not necessarily authoritative ones): Qubes and Whonix.

This post won’t go into the details of what these operating systems offer, but they were interesting enough to make it on to the list for evaluation.

And the Gotcha!

Qubes will not install on a Hyper-V virtual machine. There are many systems it can run, however Qubes is not one of them. The only choice is disabling Hyper-V.

More digging uncovered reports of being able to convert an existing Qubes VM to the Hyper-V format. My use case is to install the operating system manually to an empty VM.

There are third-party Qubes VMS out there but not being able to build it yourself stands against the fundamental privacy premise.

Starting a VirtualBox virtual machine with an active Hyper-V will cause the following error:

Image of the RAW mode error: "Raw-mode is unavailable courtesy of Hyper-V. (VERR_SUPDRV_NO_RAW_MODE_HYPER_V_ROOT)."
RAW mode error caused by Hyper-V being active. “Raw-mode is unavailable courtesy of Hyper-V. (VERR_SUPDRV_NO_RAW_MODE_HYPER_V_ROOT).”

Disable Hyper-V

Step 1: Disable Hyper-V Windows 10 features

  • Start the Turn Windows features on or off application
  • Ensure the following items’ checkbox icons are unchecked:
    • Hyper-V and it’s sub-items
      • Hyper-V Management Tools
        • Hyper-V GUI Manaement Tools
        • Hyper-V Module for Windows PowerShell
      • Hyper-V Platform
        • Hyper-V Hypervisor
        • Hyper-V Services
    • Windows Hypervisor Platform
    • Virtual Machine Platform (may be unrelated, needs additional testing. Not a feature I need or use normally.)

Step 2: Ensure Windows 10 boot does not automatically launch Hypervisor

Found this post at ErpNext.com by: Sirjames

  • Open the command prompt as an Administrator.
  • Run the command with no argument: bcdedit. Note the property hypervisorlaunchtype is set Auto by default.
  • Disable Hyper-V by running the command: bcdedit /set hypervisorlaunchtype off
  • Restart the system.

Turning it back on

To re-enable Hyper-V back on, run the command: bcdedit /set hypervisorlaunchtype auto
You will need to reboot the system to use Hyper-V.

Symbolic Links on Windows 10

Screenshot of Link Shell Extension
This is not meant as a tutorial in any way, I’m simply trying to not forget this as I need it about once every two years or so and always forget how to do it. The information was found here: https://superuser.com/questions/1020821/how-to-create-a-symbolic-link-on-windows-10 The option I went with was the PowerShell route suggested by Peter Hahndorf:
Open a PowerShell session as elevated administrator:
New-Item -ItemType SymbolicLink -Path E:\Data\MyGames -Target "C:\users\UserName\MyGames"
or using less verbose syntax:
ni E:\Data\MyGames -i SymbolicLink -ta "C:\users\UserName\MyGames"
Another approach is a Windows Shell extension which looked interesting but probably overkill for my current needs (from odvpbre):
If you want a GUI Tool for making/editing that symlinks use http://schinagl.priv.at/nt/hardlinkshellext/linkshellextension.html Link Shell Extension (LSE) provides for the creation of Hardlinks , Junctions , Volume Mountpoints , and Windows7/8’s Symbolic Links, (herein referred to collectively as Links) a folder cloning process that utilises Hardlinks or Symbolic Links and a copy process taking care of Junctions, Symbolic Links, and Hardlinks. LSE, as its name implies is implemented as a Shell extension and is accessed from Windows Explorer, or similar file/folder managers. The extension allows the user to select one or many files or folders, then using the mouse, complete the creation of the required Links – Hardlinks, Junctions or Symbolic Links or in the case of folders to create Clones consisting of Hard or Symbolic Links. LSE is supported on all Windows versions that support NTFS version 5.0 or later, including Windows XP64 and Windows7/8/10. Hardlinks, Junctions and Symbolic Links are NOT supported on FAT file systems, and nor is the Cloning and Smart Copy process supported on FAT file systems.
Screenshot of Link Shell Extension
Link Shell Extension
  Some additional information on different types of links from http://schinagl.priv.at/nt/hardlinkshellext/linkshellextension.html#hardlinks : Hardlinks are a feature common to many Unix based systems, but are not directly available with NT4/W2K/WXP. It is a feature, which must be supported by the file system of the operating system. So what are Hardlinks? It is common to think of a file as being an association between a file name and a data object. Using Windows Explorer, the file system can be readily browsed, showing a 1:1 relationship between the file name and the data object, but this 1:1 relationship does not hold for all file systems. Some file systems, including UFS, XFS, and NTFS have a N:1 relationship between file name and the data object, hence there can be more than one directory entry for a file. So, how does one create multiple entries for the same data object? In Unix there is a command line utility ln, which is used to create link entries for existing files, hence there are many file names, or so called Hardlinks, for the one data object. For each HardLink created, the file system increments a reference count stored with the data object, i.e. it stores how many file names refer to the data object, this counter is maintained (by the file system) within the data object itself. When a file name referencing a data object is deleted, the data object’s reference count is decremented by one. The data object itself only gets deleted when the reference count is decremented to zero. The reference count is the only way of determining whether there are multiple file name references to a data object, and it only informs of their number NOT there whereabouts. Junctions are wormholes in the tree structure of a directed graph. By browsing a Junction a maybe far distant location in the file system is made available. Modifying, Creating, Renaming and Deleting files within a junction tree structure operates at the junction target, i.e. if you delete a file in a Junction it is deleted at the original location. Symbolic Links are to files what Junctions are to folders in that they are both transparent and Symbolic. Transparency means that an application can access them just as they would any other file, Symbolism means that the data objects can reside on any available volume, i.e. they are not limited to a single volume like Hardlinks. Symbolic Links differ from Shortcuts in that they offer a transparent pathway to the desired data object, with a shortcut (.lnk), something has to read and interpret the content of the shortcut file and then open the file that it references (i.e. it is a two step process). When an application uses a symlink it gains immediate access to the data object referenced by the symlink (i.e. it is a one step process).

Limitations

  • Supported platforms are NT4/W2K/WXP/W2K3/W2K3R2/W2K8/W2K8R2/W2K12/W2K12R2/WXP64/Vista/Vista/Windows7/8/10 in 32bit, 64bit or Itanium.
  • Hardlinks can only be made on NTFS volumes, under the supported platforms.
  • Hardlinks can only be made within one NTFS volumes, and can not span across NTFS volumes.
  • Junctions can not be created on NTFS volumes with NT4.
  • The Pick Link Source and Drop … choices are only visible, if it’s possible to create Hardlinks/Junctions/Symbolic Links. E.G.: If you select a file on a FAT drive and press the action button, you wont see the Pick Link Source in the action menu, because FAT file systems, don’t support Hardlinks/Junctions/Symbolic Links. This also happens, if you select source files on a network drive, or select a file as destination, etc.
  • There is an OS limit of creating more than 1023 hardlinks per file. This is less known, but it is there.
  • ReFs does not support hardlinks.