VM crashes(?) when I try to create partition during Windows 10 install

ChrisReeve

Explorer
Joined
Feb 21, 2019
Messages
91
Hi

As the topic title describes, I am unable to install Windows to a VM. I try to use the virtio-win-0.1.171 drivers, and load them during the install process. I am able to install the disk drivers (viostor), and the drive pops up in WIndows Installer, but when I press "new", to create a partition to install Windows on, the VM suddendly shuts down. Any idea why?

The VM setup is default, except that I have an extra virtual CDROM for the VirtIO drivers, and I have chosen VirtIO harddive, and VirtIO NIC.
 
D

dlavigne

Guest
Were you able to resolve this? If not, which version of FreeNAS?
 

blanchet

Guru
Joined
Apr 17, 2018
Messages
516
It is a known bug in bhyve which is fixed in FreeBSD 12.1.


Therefore you have to use only AHCI virtual disks for Windows VMs until the FreeNAS 12.1 release ( except if iXsystems backports the patch before).
 

ChrisReeve

Explorer
Joined
Feb 21, 2019
Messages
91
Thank you. And no, I wasnt able to fix it. AHCI is slow/broken for Win10 in bhyve, so I gave up and tried to install Ubuntu with VirtIO for both the boot device, and NIC. That worked wonderfully.

On a side note, my main usage was game server hosting/TeamSpeak 3, which I now realize is much better, both in terms of ease of setup (using LinuxGSM), and performance in general, so I guess things turned out great in the end. :)
 

visualize686

Cadet
Joined
May 16, 2017
Messages
5
It is a known bug in bhyve which is fixed in FreeBSD 12.1.


Therefore you have to use only AHCI virtual disks for Windows VMs until the FreeNAS 12.1 release ( except if iXsystems backports the patch before).
Hey Guys,

I new to the Freebsd/nas world but I have the same problem, can I install the Fix manually? And could you point me in the right direction or is there a way to install something as a nightly build in which this is fixed.

Thank you, guys, for the help I have to setup build server (win10)
 

visualize686

Cadet
Joined
May 16, 2017
Messages
5
Hey Guys,

I new to the Freebsd/nas world but I have the same problem, can I install the Fix manually? And could you point me in the right direction or is there a way to install something as a nightly build in which this is fixed.

Thank you, guys, for the help I have to setup build server (win10)
i am on truenas 12.0 :)
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Change the blocksize of the emulated disk device from "default" to "512". VM > Devices > Disk > Edit.
Use virtio drivers for disk and network.
 

visualize686

Cadet
Joined
May 16, 2017
Messages
5
Hi Patrick, thanks for the quick answer. I did but same thing happened. I am using this virtio-win-0.1.208 driver. i load the driver and the install crashes.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Try AHCI, but make sure to set the virtual disk blocksize. This alone has fixed all crashes with Windows 10 for me. 1636316857718.png
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
You can switch to virtio after installation.
  • install virtio drivers - easy once you got a VM up and running
  • create an additional disk of type virtio, couple of Megabytes is enough
  • partition and format the new disk and make sure it's working in Windows
  • then shutdown and switch your main disk from AHCI to virtio
  • boot, VM should come up fine
  • shutdown, remove small new disk, boot
  • enjoy
And for the network virtio seems to be more or less mandatory. Users frequently report loss of connectivity with anything else.

HTH,
Patrick
 

kaulex

Dabbler
Joined
Jan 25, 2022
Messages
16
A small addition, as this solution by Patrick M Hausen is still true in 2022.

I am using 12.0u7. Although Windows 10 VM installed fine on current virtio (0.1.208 and 0.1.215-2), the Windows 11 VM installation crashed, regardless of RAM assigned, VM disk size, etc... Also turning off TPMCheck, SecureBootCheck and RAMCheck did not resolve the issue (google Win 11 labConfig). Running mediacreationtool.bat () also didn't fix a crash, which directly started after "preparing files for installation".

The only solution was - as described above:
- set disk to AHCI
- set block size to 512

Only then installation ran through. I am posting this, as I have spent ~8hr working on the issue with no solution and screened issues around Win11, install options, bhyve issues with Windows hosts and previously known but fixed FreeBSD issues when running/installing on virtio devices - hope this helps some users to save time and nerves.
 

kaulex

Dabbler
Joined
Jan 25, 2022
Messages
16
Just if anyone reads up on this, switching over to virtio is not running as smooth as expected. Reason could be the test "formatting the disk and make sure it's working in Windows" turns out to crash & ´leave the VM in an ill-defined state. I divert discussion to a separate thread.
 
Top