Virtualization technology has opened a realm of possibilities for tech enthusiasts, allowing them to explore various projects, from running macOS on a home server to hosting multiple services within virtual machines. One particularly intriguing venture is the ability to create a virtualized instance of your primary operating system and run it inside a virtual machine (VM). This ambitious project can be achieved using tools like Disk2vhd and VirtualBox.
Creating a VHD file using Disk2vhd
Disk2vhd is a free utility designed to save the contents of your storage drives as .vhd files. This not only serves as a makeshift backup solution but also enables the virtualization of an existing Windows 11 environment through a process known as Physical to Virtual migration. To create your .vhd file, follow these steps:
- Visit the official Disk2vhd website and download the latest version of the tool.
- Extract the downloaded folder and run disk2vhd.exe with administrator privileges.
- Select the drives you wish to convert into a .vhd file, choose the directory for saving this file, and click Create. It is advisable to keep the Use vhdx checkbox disabled, as well as the Prepare for use in virtual PC option. However, enabling Use Volume Shadow Copy is recommended if you are generating a .vhd file for an external storage drive.
Deploying a virtual machine inside VirtualBox
With your .vhd file ready, the next step is to create a virtual machine that utilizes this file as its disk drive. Ensure that CPU virtualization is enabled in your PC’s BIOS. Here’s how to set up your VM in VirtualBox:
- If VirtualBox is not yet installed, download the setup.exe file and install the hypervisor on your system.
- Launch VirtualBox.exe with administrative rights.
- Click the New button to create a new virtual machine.
- In the pop-up window, enter the Name of your VM, select the Folder for storage, and ensure the Type is set to Microsoft Windows, with the Version option set to Windows 11 (64-bit). Leave the ISO image field unselected.
- Navigate to the Hardware tab and allocate additional Base Memory and Processors to the VM.
- Go to the Hard Disk tab, select the radio button for Use an Existing Virtual Hard Disk, and click the Folder icon to browse for your .vhd file.
- Click the Add button, select the .vhd file you created earlier, and press Choose.
- Finally, click Finish and wait for VirtualBox to set up the virtual machine.
- Select the newly created VM and click the Start button to boot it up.
Running a virtual machine replica of your everyday PC
Once the virtual machine is deployed, it should boot into the familiar Windows 11 environment of your daily driver. If it instead loads the recovery environment, simply follow the prompts to repair your system and launch Windows 11 with all settings, data, and applications intact. However, it’s important to note that the resource-intensive nature of Windows 11 may lead to diminished performance and responsiveness. Unless equipped with a high-end processor and sufficient RAM and CPU cores allocated to the VM, even basic tasks may become cumbersome. Nevertheless, this project offers a unique opportunity to experiment with your daily driver without the risk of compromising its integrity.