[HOWTO] Convert Windows physical boot disk to Virtualbox and maintain activation

Questions about virtualization software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
earthlingkc
Level 3
Level 3
Posts: 128
Joined: Fri Oct 14, 2016 2:22 pm

[HOWTO] Convert Windows physical boot disk to Virtualbox and maintain activation

Post by earthlingkc »

Don't do this if you plan to still boot from the Windows physical disk after virtualized. Don't do this on a PC planned for Win gaming. This method is using Mint Linux but can be done many different ways with various OSs that have disk imaging.

Use info at your own risk...
1) Convert physical disk to raw disk image (Mint Linux GUI method, many other ways)
- Need separate drive(s) with up to double the disk space the size of Win boot drive
- Assuming Win boot drive is internal, boot from Linux Mint USB install stick or other Linux drive
- Unmount any drives/partitions related to the Windows disk
- Mint Menu>Preferences>Disks app, select the Windows physical drive you want to virtualize
- Select Create Disk Image for _entire_ drive in drive settings icon upper right corner, not for just one partition, save image to separate drive that has enough space

2) Convert raw disk image to Vbox image and shrink/compact (CloneVDI method)
Either boot back into Windows or use Wine in Linux..
- Convert the new disk image to VirtualBox using CloneVDI (in settings, keep old UUID and select compact drive)
http://clonevdi.software.informer.com

3) Details on creating virtual machine
- Install/Run VirtualBox on Linux or other OS
- Setup new virtual machine (VM) in VirtualBox and point to existing disk - the final image converted by CloneVDI
- Set to same number of CPUs in original system but can reduce memory
- Boot virtual machine from the same PC the original Win license is activated on
- If it won't boot, try 'enable EFI' (or disable) in VM System settings
- Is possible that drivers for the physical hardware may need to be removed from Windows VM if having problems with boot completing, try Win Safe Mode
- Install the VirtualBox Guest Additions within VM (reboot)
- Confirm web browsing works
- Confirm Windows is still activated within VM (right click on Computer/PC, select Properties)
- If not activated you should be able to reactivate with the 'phone in' method - run Windows command: slui.exe 4

Once you convert to VM, don't go back and forth booting from physical/virtual or you may lose the activation. Though you should be able to get activation back with 'phone in' activation method, maybe.

To convert a VM back to RAW disk image, from command prompt....
VBoxManage clonehd /path/to/src.vdi /path/to/dst.img --format RAW

There is also a way to directly launch Win physical disk straight from VirtualBox but is riskier to original drive - best to convert to VM image first or make a backup...
https://www.virtualbox.org/manual/ch09.html#rawdisk

chrisuk has pointed out that Disk2vhd can also convert from physical disk to vm in one shot if run from Windows, though it may take another run to get it compacted, haven't tried yet...
https://technet.microsoft.com/en-us/sys ... 56415.aspx
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Locked

Return to “Virtual Machines”