Create virtual machine in VirtualBox from real partition

If you already have Windows 10 (Technical Preview) installed on a real partition and you want to boot it from Linux Ubuntu you can do so very easily. I assume you have VirtualBox installed. Get it at https://www.virtualbox.org/wiki/Linux_Downloads otherwise.

At first find out what your Windows 10 parition is. You can use blkid for that.

It will give you output similar to the following:

/dev/sde1: LABEL="win10" UUID="75C..." TYPE="ntfs"
/dev/sdd1: LABEL="Data" UUID="723..." TYPE="ntfs"

When I partitioned my drives I already named the partition “win10” so it is easy to spot later on. In my case the partition is sde1 and the disk is sde.

sudo VBoxManage internalcommands createrawvmdk -filename win10.vmdk -rawdisk /dev/sde

This will create our virtual machine disk from the real partition.

Hit Alt-F2 and enter gksudo VirtualBox (we have to run it as root for physical partitions)

Create a new virtual machine and use Windows 8.1 (64-Bit) as your operating system. (“Other Windows” won’t work and will give you the error 0x0000005D if you try to boot it)

Assign it a proper amount of RAM. Then select “Use an existing virtual hard drive file” and select the previous created vmdk-file. Now boot into your virtual machine. Windows 10 now needs to repair (don’t worry, it’s because of the changed file system) and restart.

You should now be able to boot into Windows 10 from Ubuntu.

Flattr this!