SOLVED Install WSUS in bhyve

revengineer

Contributor
Joined
Oct 27, 2019
Messages
193
Hello,
Has anyone successfully installed the WSUS role in Windows Server 2019 running on bhyve. This works fine in Virtualbox running on my PC but trying to install it in a bhyve VM in FreeNAS 11.3-U4.1 the installation of the role fails saying that a reboot is required. This loop repeats infinitely after a reboot. I tried using VirtIO and AHCI for the harddrive, both show the same result. I searched the forum, and someone had this issue in 2018 but no solution was provided. I am hoping that i am not the only one attempting this and that someone may have a solution.

Cheers!
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Anything in the event logs?

I would anticipate issues with the network stack more than the disk.
 

revengineer

Contributor
Joined
Oct 27, 2019
Messages
193
When I install using powershell, I get this error:
Code:
PS C:\Windows\system32> install-windowsfeature -name updateservices -includemanagementtools
install-windowsfeature : The request to add or remove features on the specified server failed.
The operation cannot be completed, because the server that you specified requires a restart.
At line:1 char:1
+ install-windowsfeature -name updateservices -includemanagementtools
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : DeviceError: (@{Vhd=; Credent...Name=localhost}:PSObject) [Install-WindowsFeature], Exception
    + FullyQualifiedErrorId : DISMAPI_Error__Failed_Reboot_Required,Microsoft.Windows.ServerManager.Commands.AddWindowsFeatureCommand

Success Restart Needed Exit Code      Feature Result
------- -------------- ---------      --------------
False   No             Failed         {}

 

revengineer

Contributor
Joined
Oct 27, 2019
Messages
193
Here are some lines from CBS.log. Googled the heck out of this one and just cannot figure it out.

Code:
2020-09-28 19:23:22, Info                  CBS    Enumerating Foundation package: Microsoft-Windows-Foundation-Package~31bf3856ad364e35~amd64~~10.0.17763.1, this could be slow
2020-09-28 19:23:22, Info                  CSI    00000002 CSI Store 2569254760224 initialized
2020-09-28 19:23:22, Info                  CSI    00000003 Transaction merge required, do-not-merge flag passed.
2020-09-28 19:23:22, Info                  CSI    00000004@2020/9/28:23:23:22.785 CSI Transaction @0x2563384b3e0 initialized for deployment engine {d16d444c-56d8-11d5-882d-0080c847b195} with flags 00000000 and client id 'TI5.30840302_1519482084:1/'

2020-09-28 19:23:23, Error                 CSI    00000005 (F) Current pending rollback transaction content precludes other operations; reboot to complete rollback.[gle=0x80004005]
2020-09-28 19:23:23, Error                 CSI    00000006 (F) HRESULT_FROM_WIN32(ERROR_FAIL_REBOOT_REQUIRED) #1115# from Windows::COM::CComponentStore::InternalTransact(...)[gle=0x80070bc9]
2020-09-28 19:23:23, Error                 CSI    00000007@2020/9/28:23:23:23.918 (F) onecore\base\wcp\componentstore\com\store.cpp(5090): Error HRESULT_FROM_WIN32(ERROR_FAIL_REBOOT_REQUIRED) originated in function Windows::COM::CComponentStore::InternalTransact expression: HRESULT_FROM_WIN32(3017L)
[gle=0x80004005]
2020-09-28 19:23:23, Info                  CBS    Could not get active session for current session file logging [HRESULT = 0x80004003 - E_POINTER]
2020-09-28 19:23:23, Info                  CBS    Could not get file name for current session file logging [HRESULT = 0x80004003 - E_POINTER]
2020-09-28 19:23:23, Info                  CBS    Added C:\Windows\Logs\CBS\CBS.log to WER report.
2020-09-28 19:23:23, Info                  CBS    Added C:\Windows\Logs\CBS\CbsPersist_20200928230322.log to WER report.
2020-09-28 19:23:23, Info                  CBS    Added C:\Windows\Logs\CBS\CbsPersist_20200928225359.log to WER report.
2020-09-28 19:23:23, Info                  CBS    Added C:\Windows\Logs\CBS\CbsPersist_20200928222514.log to WER report.
2020-09-28 19:23:23, Info                  CBS    Added C:\Windows\Logs\CBS\CbsPersist_20200928193303.log to WER report.
2020-09-28 19:23:23, Info                  CBS    Not able to add pending.xml.bad to Windows Error Report. [HRESULT = 0x80070002 - ERROR_FILE_NOT_FOUND]
2020-09-28 19:23:23, Info                  CBS    Not able to add SCM.EVM to Windows Error Report. [HRESULT = 0x80070002 - ERROR_FILE_NOT_FOUND]
2020-09-28 19:23:24, Error                 CSI    00000008 (F) HRESULT_FROM_WIN32(ERROR_FAIL_REBOOT_REQUIRED) #1113# from Windows::ServicingAPI::CCSITransaction::ICSITransaction2_Analyze(Flags = 0, riid = {f4d9decb-0250-4ad4-9500-85c7f2f281ec}, ppUnk = NULL, disp = 0)[gle=0x80070bc9]
2020-09-28 19:23:24, Info                  CBS    Failed to get transaction analysis. [HRESULT = 0x80070bc9 - ERROR_FAIL_REBOOT_REQUIRED]
2020-09-28 19:23:24, Info                  CBS    Failed to get inventory. [HRESULT = 0x80070bc9 - ERROR_FAIL_REBOOT_REQUIRED]
2020-09-28 19:23:24, Info                  CSI    00000009@2020/9/28:23:23:24.091 CSI Transaction @0x2563384b3e0 destroyed
2020-09-28 19:23:24, Info                  CBS    Failed to get CSI Inventory [HRESULT = 0x80070bc9 - ERROR_FAIL_REBOOT_REQUIRED]
2020-09-28 19:23:24, Info                  CBS    Failed to get component state. [HRESULT = 0x80070bc9 - ERROR_FAIL_REBOOT_REQUIRED]
2020-09-28 19:23:24, Info                  CBS    Failed to get current state of the deployment [HRESULT = 0x80070bc9 - ERROR_FAIL_REBOOT_REQUIRED]
2020-09-28 19:23:24, Info                  CBS    Failed to get Transaction State for package: Microsoft-Windows-NetFx4-OC-Package~31bf3856ad364e35~amd64~~10.0.17763.1, update: NetFx4 [HRESULT = 0x80070bc9 - ERROR_FAIL_REBOOT_REQUIRED]
2020-09-28 19:23:24, Error                 CBS    Failed to get store state [HRESULT = 0x80070bc9 - ERROR_FAIL_REBOOT_REQUIRED]
2020-09-28 19:25:24, Info                  CBS    Trusted Installer successfully registered to be restarted for pre-shutdown.
2020-09-28 19:25:24, Info                  CBS    Trusted Installer is shutting down because: SHUTDOWN_REASON_AUTOSTOP
2020-09-28 19:25:24, Info                  CBS    TiWorker signaled for shutdown, going to exit.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
2020-09-28 19:23:22, Info CSI 00000003 Transaction merge required, do-not-merge flag passed. 2020-09-28 19:23:22, Info CSI 00000004@2020/9/28:23:23:22.785 CSI Transaction @0x2563384b3e0 initialized for deployment engine {d16d444c-56d8-11d5-882d-0080c847b195} with flags 00000000 and client id 'TI5.30840302_1519482084:1/' 2020-09-28 19:23:23, Error CSI 00000005 (F) Current pending rollback transaction content precludes other operations; reboot to complete rollback.[gle=0x80004005] 2020-09-28 19:23:23, Error CSI 00000006 (F) HRESULT_FROM_WIN32(ERROR_FAIL_REBOOT_REQUIRED) #1115# from Windows::COM::CComponentStore::InternalTransact(...)[gle=0x80070bc9]
I think those are the lines telling you what's going on... you have something else that's not right before trying to install WSUS... you need to fix that first.
 

revengineer

Contributor
Joined
Oct 27, 2019
Messages
193
The problem is that a reboot does not fix the problem. This sequence repeats on every subsequent try. This is not a pre-condition either. I can reproduce this by installing a fresh image of Windows Server 2019 using to iso updated in September 2019, and then immediate installing the WSUS role. On Virtualbox this works just fine. Not sure if this is a bug in bhyve or if I need to configure something else. I am not excluding a user error here, I just cannot figure it out.
 

revengineer

Contributor
Joined
Oct 27, 2019
Messages
193
You may try TrueNAS-12-RC1 to test a newer version of bhyve.
I do not have spare hardware for this test, but maybe I will try virtualizing FreeNAS/bhyve in Virtualbox to see if a newer bhyve version will fix it. Not sure if this works but it's worth a try.

Nevertheless, if anyone has a solution, I remain interested. :smile:
 

Mlovelace

Guru
Joined
Aug 19, 2014
Messages
1,111
I do not have spare hardware for this test, but maybe I will try virtualizing FreeNAS/bhyve in Virtualbox to see if a newer bhyve version will fix it. Not sure if this works but it's worth a try.

Nevertheless, if anyone has a solution, I remain interested. :smile:
Your best bet for accomplishing this goal would be to run vmware ESXi on bare metal and trueNAS(freeNAS) and server 2019 as VMs. Enable passthrough of the LSI card to the trueNAS VM so it has bare-metal access to the hard drives. Bhyve, while convenient for somethings isn't a mature hypervisor at this point.
 

blanchet

Guru
Joined
Apr 17, 2018
Messages
516
I do not have spare hardware for this test, but maybe I will try virtualizing FreeNAS/bhyve in Virtualbox to see if a newer bhyve version will fix it. Not sure if this works but it's worth a try.
VirtualBox 6.0 supports nested virtualization, so you may try it, but it would be easier to upgrade your FreeNAS 11.3-U4.1 with TrueNAS 12-RC1. If something goes wrong you can revert back immediately with the boot environments. There is no risk and it is pretty easy.

Nevertheless, as @Mlovelace said, running VMware ESXi with a virtualized FreeNAS is the best technical solution even if it is more complicated to setup.
 

revengineer

Contributor
Joined
Oct 27, 2019
Messages
193
Report out: The mystery was finally solved a few days ago. WSUS un the default configuration uses WID (Windows Internal Database) which is a derivative of the SQL database. This required setting the "disk sector size" to 512 bytes, and once I did that WSUS installed and is running well.

I ran into a secondary issue with permissions on an smb share which the windows server vm could not write to. The solution was to simply use a ZVOL as a secondary drive for the database storage.

All is well. I do agree that bhyve is not best solution for vms. I deliberately chose to go that way because as a noob I did not want to get caught with loosing all my data because I of not setting up ESXi correctly. I am still stand by this choice although I may go the ESXi route if I would have to do it all over again.
 

TechMC

Cadet
Joined
Feb 13, 2022
Messages
1
I spent a whole week troubleshooting WID, NT services permissions, and your post about the disk sector size was my solution.
Thank you again!


I am running windows server 2019,

Error when you install WID in Windows Server 2012: MSSQL$MICROSOFT##WID service was unable to log on as NT SERVICE\MSSQL$MICROSOFT##WID​



Things that didn't work for me :

Cause
When WID is installed, the NT SERVICE\MSSQL$MICROSOFT##WID local virtual account is created. This account is granted the Log on as a service user right by local Group Policy. If a Group Policy Object (GPO) that's linked to a site, domain, or organizational unit overwrites the local Group Policy setting, the NT SERVICE\MSSQL$MICROSOFT##WID account doesn't have the necessary user rights. So WID can't be installed.
 
Top