I really appreciated Krystical’s original post with instructions on how to convert Whonix images to run in Microsoft’s Hyper-V so I wanted to provide updated instructions that work with Whonix 14 in case anyone else desires such a setup. We already use Hyper-V so installing a second Hypervisor like VirtualBox was undesirable. I have updated the original instructions so they work in 2019.
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 14 images (Whonix-Gateway-XFCE-14.0.0.9.9.ova
and Whonix-Workstation-XFCE-14.0.0.9.9.ova
) using 7zip and extract the .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\dsfo.exe "c:\temp\Whonix-Gateway-XFCE-14.0.0.9.9-disk001.vmdk" 512 1024 descriptor.txt
to extract the descriptor files from the 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 the file.
Step 6) Use a command like: c:\temp\dsfi.exe "c:\temp\Whonix-Gateway-XFCE-14.0.0.9.9-disk001.vmdk" 512 1024 descriptor.txt
to inject the descriptor back into the VMDK file
Step 7) Repeat steps 4-6 using Whonix-Workstation-XFCE-14.0.0.9.9-disk001.vmdk so that you have two VMDK files with modified descriptors
Step 8) Install Microsoft’s VM Converter 3.0 (or newer) which you downloaded in step 1
Step 9) Open PowerShell (as administrator) and enter commands like this if you used c:\temp
1) Import converter module to powershell: Import-Module "C:\Program Files\Microsoft Virtual Machine Converter\MvmcCmdlet.psd1"
2) Convert the Gateway VMDK file to VHDX: ConvertTo-MvmcVirtualHardDisk -SourceLiteralPath "c:\temp\Whonix-Gateway-XFCE-14.0.0.9.9-disk001.vmdk" -DestinationLiteralPath "c:\temp\Whonix-Gateway-XFCE-14.0.0.9.9.vhdx" -VhdType DynamicHardDisk -VhdFormat Vhdx
3) Convert the Workstation VMDK file to VHDX: ConvertTo-MvmcVirtualHardDisk -SourceLiteralPath "c:\temp\Whonix-Workstation -XFCE-14.0.0.9.9-disk001.vmdk" -DestinationLiteralPath "c:\temp\Whonix-Workstation -XFCE-14.0.0.9.9.vhdx" -VhdType DynamicHardDisk -VhdFormat Vhdx
Step 10) In Microsoft’s Hyper-V Manager, create a Generation 1 (Not a GEN 2 EFI) Hyper-V virtual machine to use as the Whonix Gateway and use the option for selecting an existing hard drive. Then select the newly created VHDX file. Add 2 legacy network adapters to the virtual machine; the first legacy network adapter should be connected to a virtual switch which has external connectivity to your LAN. The second legacy network adapter should be connected to a private virtual switch; this switch will let your Whonix Workstation connect to the internet through your Gateway’s private network connection.
Step 11) The first time you boot the Whonix Gateway, you will need to “cancel” out of the Anon Connection Wizard and configure your network settings through the console. We need to change your ‘eth0’ to connect to your network via DHCP rather than use VirtualBox’s network settings (which are typically on a different subnet).
Step 12) In console, enter the command sudo nano /etc/network/interfaces.d/30_non-qubes-whonix
to open the configuration file and uncomment the two lines which contain auto eth0
and iface eth0 inet dhcp
by removing the # in front of them. Then exit and save the changes you made.
Step 13) We still need to make one more configuration change to avoid getting a big ugly warning about Hyper-V not being a supported virtualizer. Open the configuration file for editing with the following command sudo nano /etc/whonix.d/30_whonixcheck_default.conf
and then change the 0 to a 1 in the line to stop on the detection of an unsupported virtualizer. Reboot the virtual machine after you have saved these changes.
Step 14) In Microsoft’s Hyper-V Manager, create a Generation 1 (Not a GEN 2 EFI) Hyper-V virtual machine to use as the Whonix Workstation and use the option for selecting an existing hard drive. Then select the newly created Workstation VHDX file. Add 1 legacy network adapters to the virtual machine; and connect it to the same private virtual switch as you connected to the 2nd interface of the Gateway virtual machine. The Whonix workstation should not need any additional configuration and should work correctly when you start it.
Step 15) If you have followed these steps correctly and you didn’t encounter any problems, you should now be able to enjoy Whonix 14 on Hyper-V!
Edit by Patrick:
User @akcryptoguy and only user @akcryptoguy is responsible for this. This is a community project. Unsupported by Whonix developers. Whonix developers are delighted that Whonix can be modified and useful for others since this is in the spirit of Whonix.
At time of writing, Hyper-V
is non-freedom software. Therefore the following Whonix policy is related:
Changed title from How to get Whonix 14 running on Hyper-V
to How to get Whonix running on Hyper-V
.