SQL Express in Win10 Pro VM won't install/start

Terydan

Dabbler
Joined
Jan 19, 2017
Messages
31
I just built my first FreeNAS box with some spare hardware that was given to me. Specs are i7 4790k, 8GB RAM, and 3 x 4TB HDD. I am planning on adding another 8GB of RAM in the coming months, but I'm just getting it going for the moment. Will eventually replace with a Xeon D system. It will act as a file storage/plex server/camera surveillance server-recorder. The software I will use is Milestone Xprotect Essential which is their free version. It utilizes SQL Express 2016 for its database.

Before I installed on my freenas box I created a vm in VirtualBox and installed Win10 Pro with Xprotect - I gave it 2 cores and 3 GB of memory, and used the VirtIO network option under the freenas settings. It installed smooth and easy with no hiccups.

Cut to me setting up my vm in bhyve - same exact settings as my VirtualBox vm. Win10 Pro installed no issue. Try to install Xprotect and it errors out while installing SQL. It appears as if SQL installs, but it won't seem to start. I can find it in the SQL Config Manager, but it always fails to start with an error about not reaching the server. Is there some settings need to be modified to allow the SQL to run?

The only thing that I have noticed that may be related is that when I try to search shared folders on the network, I have to type the IP address of the host because my VM doesn't find based on host name. (ie. "\\192.168.1.xxx\shared_files" instead of the usual "\\computer_name\shared_files") but it can ping the other host based on host name and get a response.
 

dir_d

Explorer
Joined
Nov 9, 2013
Messages
55
The only way i could get the Windows VM network to work in bhyve was to install the Redhat network drivers, i forgot the name (not in front of my server right now). Install those ping out and you should be good.
 

Terydan

Dabbler
Joined
Jan 19, 2017
Messages
31
Thank you for the reply, I did a bit of reading through the forums before creating my VM and most people said to use the VirtIO interface instead of the e1000 or whatever it is. This requires installing the VirtIO driver into the VM after installing Win10. The VirtIO driver I installed was the Red Hat version. Once it was installed I don't have any noticeable problems when doing regular network stuff like surfing the net or even connecting to the VM through RDP. But SQL won't start and I can't connect to any machines via host name. I think they may be linked, but not positive. I just remember the error saying something about not reaching the server. I'd include the error code, but I don't have access to that error log at the moment, and it was the error log for the xprotect installer so I don't know that it is specific to SQL Express or Xprotect.
 

Terydan

Dabbler
Joined
Jan 19, 2017
Messages
31
So a little more searching and I have found something more peculiar. I have another machine on my network for testing and here is what I'm finding. Let's call my new server host FreeNAS, my Windows 10 virtual machine will be called VM, and my new machine will be called PC.

- PC can ping both FreeNAS and VM using host names. It can also access shared files on both via \\FreeNAS\Shared_Files or \\VM\Shared_Files

- VM can ping ping PC and itself (VM) using host names. It can also access shared files on PC via \\PC\Shared_Files.

- VM cannot ping FreeNAS by hostname or access shared files via \\FreeNAS\Shared_Files.

- FreeNAS cannot ping anything by hostname, don't know how to test access to shared files via hostname.

It appears as if maybe the VM needs some sort of NAT Loopback to access the host (FreeNAS) by hostname, and that maybe that is preventing the SQL server from coming back and connecting to itself since it uses localhost:port for its connection.

Any insights or ways to resolve this?

Edit: I have all my machines set up to use DHCP and performed reservations in my router. None of the network settings are manual.

This is the Error I receive:

Warning SQLSERVER: Error A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
 
Last edited:

Terydan

Dabbler
Joined
Jan 19, 2017
Messages
31
Update: Found this thread https://forums.freebsd.org/threads/freebsd-11-0-bhyve-windows-10-sectorsize-required.58393/ , will try the solutions later tonight.

Update to the update: Followed the advice in the above thread. TL;DR - changed the sector size of the DISK in the VM settings of FreeNAS to 512 and re-installed Windows 10 (only because removing the remnants of a failed SQL Server install is a pain in the ass). Once booted, added my VirtIO drivers and attempted to install my software which succeeded this time. Hope my troubles can be helpful to others.
 
Last edited:

gatemaster99

Dabbler
Joined
Jul 15, 2019
Messages
12
Hi, I have the same problem.
I just have reinstalled WIndows 10. Can I change the sectorsize afterwards?
I don't want to reinstall Win10 once again.

Is there a "startup" file for the VM, which has to be changed? In my understanding the "bhyve" command starts a VM. Or?
 

Terydan

Dabbler
Joined
Jan 19, 2017
Messages
31
Hi, I have the same problem.
I just have reinstalled WIndows 10. Can I change the sectorsize afterwards?
I don't want to reinstall Win10 once again.

Is there a "startup" file for the VM, which has to be changed? In my understanding the "bhyve" command starts a VM. Or?
I think I was able to change the sectorsize without reinstalling, but I can't remember for sure. I think if you power down and change the sector size and power up it would be seen in Windows 10 as similar to cloning a hard drive from one to another. I just had so many errors that it made it easier to reinstall windows and start from scratch so that I didn't have any lingering problems. I don't know about a startup file, I never looked that far into it. I just went into the settings for the VM and had it set to auto-start. I used that setup for a little over a year until just a few weeks ago I migrated to proper server hadware and setup FreeNAS as a virtual machine under ESXi. Bhyve is still kinda weak for Windows VM and the AHCI drivers for the hard drives don't support heavy read/write workloads. My VM was for CCTV recording and as such would bog the machine (VM) down to nearly unusable even though the RAM and CPU were above the requirements that I needed. I had to restart the VM every 3-4 days to keep it functioning. Now everything runs under a tried and true hypervisor - ESXi VMware - and I don't have to dedicate as much resources to it. If your VM doesn't need high write capabilities then you should be fine after changing the sectorsize. Bhyve worked great for my docker and Linux VMs though.
 
Top