Page 1 of 1

Windows 10 guest freezes after adding a virtual NVMe SSD

Posted: 9. Sep 2016, 22:27
by chrfranke
The NVMe emulation of VirtualBox 5.1.4 is apparently not yet compatible with the generic Windows 10 NVMe driver (stornvme.sys).

Steps to reproduce (Test host was Windows 10 Pro 1511 x64):
- Select some existing VM with Windows 10 (x64) guest.
- Add new virtual NVMe controller.
- Add one SSD to this controller.
- Boot the guest.

Result: The Windows guest freezes during boot screen. Same happens if only the NVMe controller is added, but no disk.

The build of the Windows 10 guest does not matter. Problem could be reproduced with 1507, 1511 and 1607.

Booting some recent Linux Live CD/DVD in the same VM works. The /dev/nvme0{,n1} nodes appear and could be accessed. Running "smartctl -x /dev/nvme0" also works, but occasionally returns bogus info when reading the NVMe SMART or Error Log.

Thanks for any help.

Re: Windows 10 guest freezes after adding a virtual NVMe SSD

Posted: 26. Sep 2016, 23:24
by aeichner
Thanks for the report, should be fixed in the next maintenance release. Please try a testbuild from https://www.virtualbox.org/wiki/Testbuilds.

Re: Windows 10 guest freezes after adding a virtual NVMe SSD

Posted: 28. Sep 2016, 09:35
by chrfranke
Problem persists with test build 5.1.x revision 110927.

Re: Windows 10 guest freezes after adding a virtual NVMe SSD

Posted: 28. Sep 2016, 11:31
by aeichner
Please attach a VBox.log from a run with the testbuild.

Re: [SOLVED] Windows 10 guest freezes after adding a virtual NVMe SSD

Posted: 28. Sep 2016, 21:26
by chrfranke
After changing number of virtual CPUs from 1 to 2 (or more), Win 10 boots successfully. The virtual NVMe SSD works as expected then.

Interestingly the boot freeze could not be reproduced if #CPUs is turned back to 1 after the first boot with NVMe disk. Possibly some subtle timing problem when stornvme.sys is still unconfigured.

Re: Windows 10 guest freezes after adding a virtual NVMe SSD

Posted: 29. Sep 2016, 19:11
by aeichner
Thanks für the feedback, too bad you can't reproduce the hang with a single core anymore.

Re: Windows 10 guest freezes after adding a virtual NVMe SSD

Posted: 30. Sep 2016, 10:34
by chrfranke
The freeze could be reproduced by restoring the snapshot which was taken after adding the NVMe SSD. Here the results in detail (Win10-1607, snapshots at 'X'):
shutdown -s --X--> Add NVMe Ctrl+SSD --X--> Add CPU --> Boot OK --> shutdown -s --> Remove CPU --> Boot OK(!) --> ...
              |                        +--------------> Boot freeze (see attached log)
              +---------------------------------------> Boot OK --> ...
Freeze occurred before log reports "Guest seems to be unresponsive".

Re: Windows 10 guest freezes after adding a virtual NVMe SSD

Posted: 13. Oct 2016, 09:40
by chrfranke
Meantime I found another method to prevent the boot freeze without adding another CPU: Change the start type of the stornvme.sys driver from "demand" to "boot" before adding the NVMe controller:
C:\> sc qc stornvme
...
        TYPE               : 1  KERNEL_DRIVER
        START_TYPE         : 3   DEMAND_START
...
C:\> sc config stornvme start= boot
...
C:\> sc qc stornvme
...
        START_TYPE         : 0   BOOT_START
...
C:\> shutdown -s
There is possibly some problem in Windows itself when the driver is enabled after initial boot phase and only one CPU is present. Such a problem would possibly never occur on real hardware because single core machines are very rare now...