SOLVED

DC and RD Virtualization Host on the same Windows Server 2019 Server

%3CLINGO-SUB%20id%3D%22lingo-sub-3269268%22%20slang%3D%22en-US%22%3EDC%20and%20RD%20Virtualization%20Host%20on%20the%20same%20Windows%20Server%202019%20Server%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3269268%22%20slang%3D%22en-US%22%3E%3CP%3EI%20realize%20that%20I%20am%20performing%20something%20unusual%2C%20but%20I'd%20like%20to%20understand%20the%20reasons%20behind%20failure.%3CBR%20%2F%3EI%20try%20to%20install%20on%20a%20single%20Windows%20Server%202019%20VM%20the%20roles%20of%20either%20Domain%20Controller%20and%20RD%20Virtualization%20Host.%3CBR%20%2F%3EI%20do%20realize%20it's%20an%20unusual%20confnguration%20but%20I%20try%20to%20perform%20it%20for%20pure%20testing%20and%20self%20training%20purposes.%3CBR%20%2F%3EInstalling%20Hyper-v%20is%20not%20an%20issue%20as%20the%20hypervisor%20fully%20supports%20nested%20virtualization%20(I%20have%20other%20VM%20running%20Hyper-v).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3COL%3E%3CLI%3EI%20installed%20Windows%20Server%202019%20with%20all%20the%20available%20updates%3C%2FLI%3E%3CLI%3EI%20installed%20Active%20Directory%20Domain%20Services%3C%2FLI%3E%3CLI%3EI%20disabled%20al%20the%20firewalls%3C%2FLI%3E%3CLI%3EI%20started%20the%20installation%20of%20remote%20Desktop%20Services.%3C%2FLI%3E%3CLI%3EThe%20installation%20completes%20successfully%20but%20I%20see%20that%20the%20Hyper-v%20role%20is%20not%20installed.%3C%2FLI%3E%3C%2FOL%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'd%20like%20to%20understand%20the%20real%20reasons%20because%20my%20installation%20fails%20and%2C%20maybe%2C%20try%20to%20perform%20a%20successfull%20installation.%3CBR%20%2F%3ECan%20anybody%20please%20help%3F%3C%2FP%3E%3CP%3E%3CBR%20%2F%3EIn%20the%20logs%20I%20see%20the%20following%20errors%20(%22RD0021.lab21.local%22%20in%20the%20fqdn%20of%20my%20VM)%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CUL%3E%3CLI%3ERD%20Virtualization%20Host%20Configuration%20Failed%20on%20RD0021.lab21.local%20With%20Error%3A%20Could%20not%20add%20RD0021.lab21.local%20to%20the%20RDS%20Management%20Servers%20group%20on%20RD0021.lab21.local.%3C%2FLI%3E%3CLI%3ERD%20Virtualization%20Host%20Configuration%20Failed%20on%20RD0021.lab21.local%20With%20Error%3A%20Could%20not%20add%20the%20RD%20Connection%20Broker%20server%20to%20the%20TS%20Virtual%20Desktop%20Server%20settings%20on%20the%20RD0021.lab21.local%20server.%3C%2FLI%3E%3CLI%3ERD%20Virtualization%20Host%20Configuration%20Failed%20on%20RD0021.lab21.local%20With%20Error%3A%20VmHostAgent%20on%20'RD0021.lab21.local'%20could%20not%20sync%20the%20VM%20objects%20to%20CB%3A'RD0021.lab21.local'.%20Exception%3A%20System.Management.ManagementException%3A%20Invalid%20namespace%3CBR%20%2F%3Eat%20System.Management.ManagementException.ThrowWithExtendedInfo(ManagementStatus%20errorCode)%3CBR%20%2F%3Eat%20System.Management.ManagementScope.InitializeGuts(Object%20o)%3CBR%20%2F%3Eat%20System.Management.ManagementScope.Initialize()%3CBR%20%2F%3Eat%20System.Management.ManagementObjectSearcher.Initialize()%3CBR%20%2F%3Eat%20System.Management.ManagementObjectSearcher.Get()%3CBR%20%2F%3Eat%20Microsoft.RemoteDesktopServices.Management.Cmdlets.VM.NumberOfObjectsInNamespace(String%20namespacePath%2C%20String%20query)%3CBR%20%2F%3Eat%20Microsoft.RemoteDesktopServices.Management.Cmdlets.VM.GetNumberOfVmsOnHyperv(String%20hostName)%3CBR%20%2F%3Eat%20Microsoft.RemoteDesktopServices.Management.Cmdlets.AddRDVirtualizationHostCommand.AddRDVH()%3C%2FLI%3E%3CLI%3ERD%20Virtualization%20Host%20Configuration%20Failed%20on%20RD0021.lab21.local%20With%20Error%3A%20Could%20not%20configure%20the%20migration%20settings%20on%20the%20RD%20Virtualization%20Host%20server%20RD0021.lab21.local.%3C%2FLI%3E%3CLI%3ERD%20Virtualization%20Host%20Configuration%20Failed%20on%20RD0021.lab21.local%20With%20Error%3A%20Could%20not%20create%20the%20virtual%20switch%20on%20the%20server%20RD0021.lab21.local.%3C%2FLI%3E%3CLI%3ERD%20Virtualization%20Host%20Configuration%20Completed%20on%20RD0021.lab21.local%3C%2FLI%3E%3C%2FUL%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-3269268%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EWindows%20Server%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3272690%22%20slang%3D%22en-US%22%3ERe%3A%20DC%20and%20RD%20Virtualization%20Host%20on%20the%20same%20Windows%20Server%202019%20Server%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3272690%22%20slang%3D%22en-US%22%3EDo%20not%20mix%20domain%20controller%20and%20RDS%20host%20on%20the%20same%20VM%2C%20it%20is%20really%2C%20really%20not%20recommended%20-%20and%20not%20even%20supported%20tbh.%20Create%20two%20VM%20instead.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3269956%22%20slang%3D%22en-US%22%3ERe%3A%20DC%20and%20RD%20Virtualization%20Host%20on%20the%20same%20Windows%20Server%202019%20Server%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3269956%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F853711%22%20target%3D%22_blank%22%3E%40Marius_Roma%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESeems%20like%20an%20overly-complicated%20way%20of%20going%20about%20setting%20up%20the%20environment.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20line%20with%20what%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F51719%22%20target%3D%22_blank%22%3E%40Dave%20Patrick%3C%2FA%3E%26nbsp%3Bsaid%2C%20but%20to%20call%20out%20this%20one%20very%20specific%20scenario%3A%20you%20never%20install%20additional%20roles%20on%20a%20domain%20controller.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAssuming%20you%20go%20ahead%20with%20this%20model%2C%20you'd%20be%20better%20off%20building%20the%20top-level%20hypervisor%20as%20a%20workgroup%20host%20and%20then%20establishing%20the%20domain%20controller%20as%20one%20of%20the%20guests.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAnyhow%2C%20as%20far%20as%20the%20errors%20you've%20listed%20go%2C%20there's%20a%20lot.%20I%20get%20the%20feeling%20many%20are%20going%20to%20be%20symptoms%2C%20not%20the%20cause.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIt%20pays%20to%20remember%20that%20nested%20virtualisation%20has%20to%20be%20enabled%20%3CEM%3Eper%20guest%3C%2FEM%3E%20-%20it's%20not%20a%20once-and-done%20thing%20on%20the%20hypervisor%20itself.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHave%20a%20look%20at%20all%20the%20pre-requisites%20in%20this%20article%20(below)%20as%20there's%20more%20to%20configure%26nbsp%3Beven%20after%20you've%20exposed%20the%20virtualisation%20extensions%20on%20the%20guest.%20For%20example%2C%20one%20of%20your%20errors%20relates%20to%20creating%20the%20virtual%20switch%20and%20in%20the%20Microsoft%20article%2C%20you%20can%20see%20there's%20some%20action%20items%20around%20enabling%20MAC%20address%20spoofing%20(or%20alternatives).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAnyhow%2C%20have%20a%20read%20and%20plan%20the%20deployment%20before%20trying%20to%20wing%20it%20on%20the%20tools.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fvirtualization%2Fhyper-v-on-windows%2Fuser-guide%2Fnested-virtualization%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3ENested%20Virtualization%20%7C%20Microsoft%20Docs%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECheers%2C%3C%2FP%3E%3CP%3ELain%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3269303%22%20slang%3D%22en-US%22%3ERe%3A%20DC%20and%20RD%20Virtualization%20Host%20on%20the%20same%20Windows%20Server%202019%20Server%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3269303%22%20slang%3D%22en-US%22%3E%3CP%3EDo%20not%20install%20other%20roles%20on%20a%20hyper-v%20host.%20This%20creates%20unnecessary%20complications%20and%20conflicts.%26nbsp%3B%20Better%20option%20is%20to%20create%20virtual%20machines%20for%20the%20various%20roles.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Contributor

I realize that I am performing something unusual, but I'd like to understand the reasons behind failure.
I try to install on a single Windows Server 2019 VM the roles of either Domain Controller and RD Virtualization Host.
I do realize it's an unusual confnguration but I try to perform it for pure testing and self training purposes.
Installing Hyper-v is not an issue as the hypervisor fully supports nested virtualization (I have other VM running Hyper-v).

 

  1. I installed Windows Server 2019 with all the available updates
  2. I installed Active Directory Domain Services
  3. I disabled al the firewalls
  4. I started the installation of remote Desktop Services.
  5. The installation completes successfully but I see that the Hyper-v role is not installed.

 

I'd like to understand the real reasons because my installation fails and, maybe, try to perform a successfull installation.
Can anybody please help?


In the logs I see the following errors ("RD0021.lab21.local" in the fqdn of my VM):

 

  • RD Virtualization Host Configuration Failed on RD0021.lab21.local With Error: Could not add RD0021.lab21.local to the RDS Management Servers group on RD0021.lab21.local.
  • RD Virtualization Host Configuration Failed on RD0021.lab21.local With Error: Could not add the RD Connection Broker server to the TS Virtual Desktop Server settings on the RD0021.lab21.local server.
  • RD Virtualization Host Configuration Failed on RD0021.lab21.local With Error: VmHostAgent on 'RD0021.lab21.local' could not sync the VM objects to CB:'RD0021.lab21.local'. Exception: System.Management.ManagementException: Invalid namespace
    at System.Management.ManagementException.ThrowWithExtendedInfo(ManagementStatus errorCode)
    at System.Management.ManagementScope.InitializeGuts(Object o)
    at System.Management.ManagementScope.Initialize()
    at System.Management.ManagementObjectSearcher.Initialize()
    at System.Management.ManagementObjectSearcher.Get()
    at Microsoft.RemoteDesktopServices.Management.Cmdlets.VM.NumberOfObjectsInNamespace(String namespacePath, String query)
    at Microsoft.RemoteDesktopServices.Management.Cmdlets.VM.GetNumberOfVmsOnHyperv(String hostName)
    at Microsoft.RemoteDesktopServices.Management.Cmdlets.AddRDVirtualizationHostCommand.AddRDVH()
  • RD Virtualization Host Configuration Failed on RD0021.lab21.local With Error: Could not configure the migration settings on the RD Virtualization Host server RD0021.lab21.local.
  • RD Virtualization Host Configuration Failed on RD0021.lab21.local With Error: Could not create the virtual switch on the server RD0021.lab21.local.
  • RD Virtualization Host Configuration Completed on RD0021.lab21.local
3 Replies

Do not install other roles on a hyper-v host. This creates unnecessary complications and conflicts.  Better option is to create virtual machines for the various roles.

 

 

@Marius_Roma 

 

Seems like an overly-complicated way of going about setting up the environment.

 

In line with what @Dave Patrick said, but to call out this one very specific scenario: you never install additional roles on a domain controller.

 

Assuming you go ahead with this model, you'd be better off building the top-level hypervisor as a workgroup host and then establishing the domain controller as one of the guests.

 

Anyhow, as far as the errors you've listed go, there's a lot. I get the feeling many are going to be symptoms, not the cause.

 

It pays to remember that nested virtualisation has to be enabled per guest - it's not a once-and-done thing on the hypervisor itself.

 

Have a look at all the pre-requisites in this article (below) as there's more to configure even after you've exposed the virtualisation extensions on the guest. For example, one of your errors relates to creating the virtual switch and in the Microsoft article, you can see there's some action items around enabling MAC address spoofing (or alternatives).

 

Anyhow, have a read and plan the deployment before trying to wing it on the tools.

 

Nested Virtualization | Microsoft Docs

 

Cheers,

Lain

best response confirmed by Marius_Roma (Contributor)
Solution
Do not mix domain controller and RDS host on the same VM, it is really, really not recommended - and not even supported tbh. Create two VM instead.