Page 1 of 1

Virtualized Windows Partition on a NVMe disk

Posted: 11. Mar 2016, 10:44
by rm-r*
I've recently received a Lenovo P50 laptop, and turned it into a dual boot with Ubuntu 16.04 and the original OEM Windows 10 install.

It uses a NVMe SSD as the boot / OS partition disk, and a HDD secondary disk. I'm trying to virtualize the Windows10 partition for access in the booted Ubuntu partition via Virtualbox.

I've got a more comprehensive write-up on Stack Exchange:
stackoverflow . com / questions / 35908401 / virtualbox-ssd-ubuntu-xenial-host-physical-windows10-guest-virtualized-c

(sorry - I don't have permission to post U R L -- please remove spaces in the above)

For some reason I'm copping demerit points without explanation, so I thought I'd try with a more targeted community here.

A brief summary of where I think the problem lies is that the rawdisk and partitions specifications can't be munged together for the nvme drive the way they can be for the usual (e.g.) sda drives:

Code: Select all

> parted -l
Model: ATA HGST HTS541010A7 (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags
1 1049kB 135MB 134MB Microsoft reserved partition msftres
2 135MB 32.2GB 32.1GB linux-swap(v1)
3 32.2GB 832GB 800GB ext4


Model: Unknown (unknown)
Disk /dev/nvme0n1: 256GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags
1 1049kB 274MB 273MB fat32 EFI system partition boot, hidden, esp
2 274MB 290MB 16.8MB Microsoft reserved partition msftres
3 290MB 171GB 171GB ntfs Basic data partition msftdata
5 171GB 255GB 83.9GB ext4
4 255GB 256GB 1049MB ntfs Basic data partition hidden, diag

Code: Select all

> install-mbr -d 0x80 --f ~/.VirtualBox/FAKE.mbr
> VBoxManage internalcommands createrawvmdk -filename ~/.VirtualBox/win10.vmdk -rawdisk /dev/nvme0n1 -partitions 3 -mbr ~/.VirtualBox/FAKE.mbr -relative
VBoxManage internalcommands createrawvmdk -filename ~/.VirtualBox/win10.vmdk -rawdisk /dev/nvme0n1 -partitions 3 -mbr ~/.VirtualBox/FAKE.mbr -relative
VBoxManage: error: VMDK: could not open raw partition file '/dev/nvme0n13'
VBoxManage: error: Error code VERR_FILE_NOT_FOUND at /build/virtualbox-vs3aA7/virtualbox-5.0.16-dfsg/src/VBox/Storage/VMDK.cpp(3551) in function int vmdkCreateRawImage(PVMDKIMAGE, PVBOXHDDRAW, uint64_t)
VBoxManage: error: Cannot create the raw disk VMDK: VERR_FILE_NOT_FOUND
VBoxManage: error: The raw disk vmdk file was not created
The disk (per fdisk output) is nvme0n1, but the third partition is nvme0n1p3 -- VBoxManage evidently mungs together the raw disk and partition to get nvme0n13 (no "p" between the 1 and 3).

I'd be very grateful if anybody could advise!