Hyper-V and Whonix?

Hello all?

Does anyone have any experience importing whonix into a hyper v virtual machine? Just finished a class on virtual machines and was gonna try to install whonix on a hyper v virtual machine, then edit the boot info to boot to the image.

I was wondering if anyone has any advice to doing this task.

Thanks, I graduate this may with an associates in computer science and still have a lot to learn!


No one ever shared any experiences in public to my knowledge.

Also see this answer:

It is theoretically possible, but practically it needs someone to do the original research. That someone could be you. Interested?

This is pretty old, but figured I could post this to help anyone else.
It’s actually pretty easy to do and doesn’t take too long.

Step 1) Download, extract, and install everything you need: Whonix images, dsfok tools, 7zip, Notepad++, Microsoft Virtual Machine Converter 3.0

Step 2) Open Whonix images using 7zip and extract .vmdk files somewhere like c:\temp
Step 3) Extract dsfok tools to some location like c:\temp
Step 4) using powershell or CMD prompt, enter a command like: c:\temp\dfso.exe "c:\temp\Whonix-Gateway-" 512 1024 descriptor.txt
to extract the descriptor files from VMDK file
Step 5) use notepad++ or similar to edit descriptor.txt, and comment out (Put # in front of) all lines starting with “ddb.uuid” and “ddb.comment” and save file.
Step 6) use a command like: c:\temp\dfsi.exe "c:\temp\Whonix-Gateway-" 512 1024 descriptor.txt to inject the descriptor back into the vmdk
Step 7) repeat steps 4-6 using Whonix-Workstation-

Now You have two VMDK files with modified descriptors, and you have installed Microsoft VM Converter 3.0 or newer

Step 8) Open Powershell and enter commands like this if you used c:\temp
1) To import the converter module to powershell: Import-Module "C:\Program Files\Microsoft Virtual Machine Converter\MvmcCmdlet.psd1"
2) To convert the VMDK file to VHDX: ConvertTo-MvmcVirtualHardDisk -SourceLiteralPath "c:\temp\Whonix-Gateway-" -DestinationLiteralPath "c:\temp\Whonix-Gateway-" -VhdType DynamicHardDisk -VhdFormat Vhdx

Step 9) Create a generation 1 (Not a GEN 2 EFI) Hyper-V virtual machine and use the option for selecting an existing hard drive, and select the newly created VHDX file.

Step 10) Enjoy Whonix on Hyper-V!

EDIT after testing-------
Everything seems to function perfectly once its all setup.

The Whonix gateway has two network adapters.
One connected to the Internet and one for the Whonix internal network.
So on the Hyper-V host connect the Whonix gateway’s Internet facing interface to an “External” Virtual Switch and connect the internal interface to a “Private” virtual switch.
The Whonix workstation only connects to the “Private” switch.

Hope it helps!

1 Like

Why bother when there are plenty of opensource VMMs?

1 Like

OpenSource doesn’t matter to me in this particular situation. Hyper-V is available for free.
Hyper-V is/should generally be faster than most other hypervisors.
Hyper-V is what is already in use at my company, and I wanted to run whonix on one of our servers out in another country… I’m unable to change the hypervisor…

If someone else had posted it, it would have helped me… but nobody did, so I posted it… so maybe it will help someone else…
Why not?

1 Like

so could you please share you experiences about running Whonix on Hyper-V? Did you face any difficulties? Any other thoughts?

Have a look:

How is VirtualBox Paravirtualization mode related to Hyper-V?

It supports Hyper-V and there is a bit of experience report there.

I’m using Whonix with Hyper-V.

I have no issues so far. Lookout for using the lagacy network adapter - also Gen 1 VMs.

Is there a community Hyper-V build I can download so that I can run Whonix right out of the box with Hyper-V? If not, can someone please upload their Hyper-V functional VHDXs?

I’ve been using Whonix with Virtualbox for the longest time, and I’d love to try it with Hyper-V but the above descriptions seem a bit… Too much for me.

I updated your instructions to work in 2019 with Whonix 14. I hope you don’t mind. How to get Whonix running on Hyper-V

I am undecided about whether or not to export the VHDXs and then create a torrent to make them available for download for some of the people who aren’t interested in going through the whole conversion process themselves. Do you think that would be a good or bad idea?

You might be free to do that under the license of Whonix. Not legal advice.

However, to become an official Whonix download, downloadable from whonix.org, to match quality standards, these builds would have to be created by the Whonix build script.

From Policy for Inclusion of Compiled Software - #6 by Patrick

Why didn’t I develop “Whonix freeware” style? What I mean by “freeware” style: Not a “proper” Open Source project with instructions on how to build it from source code. Why bother spending hours and hours with the development of a build script if I could just install Debian inside VirtualBox, manually make all changes by keyboard and mice, run a cleanup script, export ova, upload? Could even post instructions how I did it so anyone can manually replicate. With “freeware style” development would be actually a lot easier, faster. What’s the difference between “freeware style” development and a package that contains binaries? I am trying to demonstrate the slippery line between a clean Open Source project and “freeware style”.

On top of that, to allow downloadable builds form anonymous contributors, we’d first need:

  • deterministic builds
  • verification of deterministic builds

Please contribute.

I think that’s why I was leaning against it. Since I doubt the conversion steps are even possible outside Windows I don’t see an easy way to make a Gitian/deterministic build and it’s easier if people just make it themselves if they care enough to do so. It doesn’t take all that long.

I could certainly provide a torrent which I claim to have not altered but it would be lazy for anyone to use it without verifying that for themselves.

Could be a two step build process. Starting on Debian, and then running the other part of the build on Windows.

nah, this could easily be done on windows itself - the build could pull the latest, prebuilt images and convert them … no need to build it a second time