Possible to dual boot *and* virtualize same physical drive containing Windows 10?

Solution 1:

Yes, it is possible.

  1. Configure the virtualbox to use your physical disc. It is a little bit risky, because the VM guest will see your host disc directly. Details here.
  2. Give direct read/write access to yourself to your physical disc (setfacl -m u:yourusername:rw /dev/sda)
  3. Update your virtualbox VM to use the same system uuid as your host (dmidecode -s system-uuid shows your system uuid, vboxmanage modifyvm your-vm-name --hardwareuuid <your-hardware-uuid>). You may need to clone also your drive controller uuids (lsblk --nodeps --no name,serial shows the serial ids of your host. I didn't need to clone them into my virtualbox, but it may be needed. Probably some tricky vboxmanage modifyvm command does it, or you have to edit the vm config xml manually.
  4. Try to set up the same disc and dvd controller types in the VM as your host (if your host is SATA-based, use SATA virtual controllers, if it is IDE based, use IDE ones, etc).

There is another danger: if you boot in a VM your host drive directly, it is possible that you boot the same OS twice. Or you open the same partition twice. This will kill your data, so never mount multiple partitions concurrently. Furthermore, don't mount your NTFS partitions while they are used by your Windows (but you can still share data between your partitions, for example with Samba).

If it accidentally happened, reboot with sysrq (alt+printscreen+b) and fsck everything. Some grub trickery may be also needed for that (I reconfigured grub to boot the windows by default, thus I avoid the problem that I boot accidentally my Linux again inside the Windows VM - and it will surely happen, because Windows Update often restarts your Windows behind your back).

Beware: Win10 uses your system uuid and your drive controller uuids to identify your PC. If you miss (3), your win10 will think it was cloned to a new machine, and it won't be activated any more. Although if you boot back to your original hw, it will be activated again.

Solution 2:

I succeeded with windows 10 as guest and linux mint as Host.

First you have to unistall all windows 10 updates (just in case, maybe useless) then : Under linux open a console and line by line :

 sudo su

 fdisk -l # looking for EFI et Microsoft basic data for me 1 and 3 of sdb 

 VBoxManage internalcommands createrawvmdk -filename /home/borto/ww10.vmdk -rawdisk /dev/sdb -partitions 1,3 -relative

Add machine in virtual box (always with "sudo virtualbox" to be root) and enable EFI in system tab, and choose windows xp 64 instead of windows 10 else you juste have a beautifull frozen windows 10 flag. That is all.