How to add and config Hyper-V hosts and Clusters in SCVMM 2019

///How to add and config Hyper-V hosts and Clusters in SCVMM 2019

How to add and config Hyper-V hosts and Clusters in SCVMM 2019

Following the previous System Center Virtual Machine Manager 2019 Series article and with a delay of many months, I will finally continue the SCVMM 2019 third part with this How to add and config Hyper-V hosts and Clusters in SCVMM 2019.

Adding your Hyper-V 2016 or 2019 to your System Center Virtual Machine Manager 2019 is not very difficult, is very straightforward to do it. We can encounter some issues while installing remotely from SCVMM agent in your Hyper-V hosts and other types of problems after the Hyper-V Host or the Hyper-V Cluster is added to your SCVMM 2019.

In my deployment to bypass some issues, I decided first to install the SCVMM 2019 agent in the Hyper-V hosts directly.

I think there is no need to share a how-to to install the agent since it is very straightforward. In your SCVMM 2019 package media, you will find the files to install in your Hyper-V.

Should be in: \System Center Virtual Machine Manager\i386\setup\msi\Agent or \System Center Virtual Machine Manager\amd64\Setup\msi\Agent depending on your system.

Just run the file vmmAgent.msi in each of your Hyper-V host and reboot.

Note: Again, this if for manual agent install, if you don’t want to install manually, or don’t have access to it remotely, just use the add Hyper-V host or Cluster then SCVMM will install the agent and add Hyper-V hosts.

In this article I will go through these sections:

  • Add Hyper-V Server 2016 Custer to SCVMM 2019
  • Add Hyper-V Server 2019 to SCVMM 2019
  • Add Hyper-V Server 2019 Core to SCVMM 2019
  • Remove Hyper-V or VMware ESXi hosts from SCVMM 2019

Note: Before you add any Hyper-V Cluster or Hyper-V Server, you should create an SCVMM user account to use in the configurations. This account should be added to Local Administrators in each Hyper-V Server. For this case, I created one SCVMM-User.

Add Hyper-V Server 2016 Custer to SCVMM 2019

As I said before, before I added my Hyper-V Cluster I installed the SCVMM 2019 agents in all the Hyper-V Hosts. So by adding the Hyper-V Cluster to SCVMM no need to configure the Hyper-V, SCVMM will just connect to the agent and add to its infrastructure.

In your SCVMM select Fabric Tab.

Previously I already create some folder in the Root All Hosts for each type of Hypervisor in the Servers section.

So in your folders that you may create or in the Root folder right click and you will get the menu to add the Hyper-V or ESXi hosts or Clusters.

Note: In the upper icon Add Resources you can also add any type of Servers.

Select Add Hyper-V Hosts and Clusters, then in the Resource Location select Windows Server Computers in a trusted Active Directory Domain.

Note: Servers or Clusters need to be in your Domain, or in an AD that has a trusted relationship with your Domain.

Selecting this option you now can search your Domain (or the trusted Domain) your Cluster.

How to add and config Hyper-V hosts and Clusters in SCVMM 2019

Next, you select your SCMM account, or another administrator account (do not forget needs to be added to Server Local Administrator).

Note: I recommend to use the Manually enter credentials option. I had some issues when used the existing account and use it automatically. So I always use the manual option.

How to add and config Hyper-V hosts and Clusters in SCVMM 2019

Next, you have two options; Specify Windows Server Computers by names, or Specify an Active query to search for Windows Server Computers. In all my testing when I need to add a Hyper-V Cluster second option is better. The first option could get some issues when needed to add the Hyper-V Hosts that belong to the Cluster.

So for this case, I use the second option and Generate an AD query to fetch Hyper-V Cluster and all its Hosts.

How to add and config Hyper-V hosts and Clusters in SCVMM 2019

Automatically SCVMM 2019 recognizes the Hyper-V Cluster and all its Hosts. Select the Cluster and click Next to continue.

How to add and config Hyper-V hosts and Clusters in SCVMM 2019

Next, select where do you want to store your Hyper-V Cluster. If you previously created a folder will show up here now. If not, just select the default, for this, I will select the folder I created for Hyper-V Clusters.

In this section, we have an option: Reassociate this host with the VMM environment. Meaning is this Hyper-V host or Cluster was already added to a different Virtual Machine Manager, it will remove it from the previous VMM and add to this one.

Even in this image option is not enabled, I always select this option and click Next.

How to add and config Hyper-V hosts and Clusters in SCVMM 2019

Next, the settings are finished. But as always in any SCVMM task (as we shown in previous articles) we cal always check the task script (in PowerShell).

How to add and config Hyper-V hosts and Clusters in SCVMM 2019

Script:

$credential = Get-Credential
# Get Host Group ‘Hyper-V Cluster’
$hostGroup = Get-SCVMHostGroup -ID “115246e5-d145-4f94-a56b-05f90274ea80”
Add-SCVMHostCluster -Name “Nested-vCluster.vmwarehome.lab” -RunAsynchronously -VMHostGroup $hostGroup -Reassociate $true -Credential $credential

Next we see all the Hyper-V Hosts and the Cluster adding to the SCVMM in the Fabric Resources. In this case took less than a minute to add (do not forget that was not needed to install agents in the Hyper-V hosts).

How to add and config Hyper-V hosts and Clusters in SCVMM 2019

Hyper-V Cluster error:

But before was able to finish, I got the first error. Issues with the user on one of the Hyper-V Servers.

Reason: The user was not added to the Local Administrators.

After added the user to Local Administrators in the server vhyperv01, launched again the task all was good.

Now we can do many tasks in the Hyper-V Cluster and also in the Hyper-V Hosts itself. Righ+click, and you will get the menu.

Here are two examples of the options we have to manage our Hyper-V Cluster and Hyper-V Hosts.

Cluster Options:

How to add and config Hyper-V hosts and Clusters in SCVMM 2019

Hyper-V Host options:

How to add and config Hyper-V hosts and Clusters in SCVMM 2019

Important Note: Before adding any Hyper-V Server 2019 into your SCVMM 2019, apply the latest SCVMM 2019 updates. Today the latest patch is Update Rollup 2.

There were some customers who did complain about many issues with their SCVMM 2019 when using Hyper-V 2019 Servers. This was a bug, so apply the update to fix any issues between this 2019 versions. In this Update, also vSphere 6.7 is officially supported.

New features and support systems released in SCVMM 2019 UR2: 

    • Support for managing Windows Server 2012 R2 hosts 
    • Support for managing VMware vSphere 6.7 ESXi hosts 
    • Support for new Linux versions as guest OS
    • Ability to set affinity between vNICs and pNICs 
    • IPv6 Support for SDN 
    • Simplifying Logical Switch Creation 

Add Hyper-V Server 2019 to SCVMM 2019

In this section, we will add a Hyper-V Server 2019. This is similar to adding a Hyper-V Cluster and is very straightforward.

No need to add again the initial steps that are above for, since they are the same. Only here in the Discovery Scope section, it is better to use the Specify Windows Server Computers by names. Add the Hyper-V host AD name, and SCVMM will discover.

Note: Again, as used in the previous Credentials steps, I use again manually.

How to add and config Hyper-V hosts and Clusters in SCVMM 2019

As we can in the next image, the server was found and recognized, and you just need to select the server and click next.

How to add and config Hyper-V hosts and Clusters in SCVMM 2019

Again here you select the folder, and in this case, I enabled the reassociated option.

How to add and config Hyper-V hosts and Clusters in SCVMM 2019

Hyper-V Server error:

When the SCVMM connected to the Hyper-V Server and was to install the agent, I get the first error.

Reason: This Hyper-V Server previously was connected to an SCVMM 2016 Server so had the agent from 2016 installed. It seems that the install of the SCVMM 2019 agent cannot uninstall the oldest one first.

So I need to manually uninstall the SCVMM 2016 agent. Always after the uninstall double-check if there are any SCVMM folder leftovers like in ProgramData or in Program Files any Microsoft System Center folder, if yes deleted manually, and then restart the task.

After fixing the above error, relaunch the job and Hyper-V Server was added and finish ok

Then all Hyper-V has added into the Fabric Infrastructure and all Virtual Machines from this Hyper-V Server 2019 also.

Add Hyper-V Server 2019 Core to SCVMM 2019

As we all know, Windows Server Core doesn’t have a GUI, so is more difficult to install the agent manually (and to much work) so we will leave the agent install for the SCVMM 2019.

Again we need to add our SCVVM user to the Local Administrator. Since this is the Core version we need to do it manually.

    • Using PowerShell
      Add-LocalGroupMember -Group ‘Administrators’ -Member (‘vmwarehome\scvmm-user’) –Verbose
    • Using Command Line
      net localgroup administrators vmwarehome\scvmm-user /add

After adding the user to the Local Administrator Group in the Hyper-V Server 2019 core, I started to add the server in the SCVMM 2019.

Again, no need to go through all the process that is above already, will only add some images examples.

After the search again, SCVMM will find the Hyper-V Server Core, select and click Next.

Hyper-V Server Core error 01:

Then I got the first error in this Hyper-V Server Core.

There is a lot of possibilities for the reason why this happens, as shown next. But initially, I suspect it was the firewall.

I return to the Hyper-V Server Core and checked the Firewall. Was active, so I disabled (since this is a test environment no issues). SCVMM 2019 agent uses port 5985 and 443 to communicate with SCVMM 2019 Server and Hosts.

Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled false

But if you need only to open the ports just for the agent, you can use this:

New-NetFirewallRule -DisplayName ‘SCVMM Agent’ -Profile ‘Private’ -Direction Inbound -Action Allow -Protocol TCP -LocalPort 5985.

After changing the firewall I re-run the SCVMM job. Go to the Jobs tab select the Job and Restart.

The job restarted and finish.

Hyper-V Server Core error 02:

Hyper-V Server 2019 Core was added to the SCVMM Frabic Resources. But I notice that I add the warning in the job.

The Hyper-V Server 2019 Core was added, but this MultipathIO would have had issues. So I need to enable this. By default, this should be enabled in the Hyper-V Server GUI version, but in Core is disable. So we need to enable it.

Again using PowerShell command:

Enable-WindowsOptionalFeature -Online -Featurename MultipathIO

After enabling MultipathIO, refresh the server and I have all status Green.

Remove Hyper-V or VMware ESXi hosts from SCVMM 2019

In the final section just a quick view on how to remove a Hyper-V Cluster or Server and also an ESXi host or even a vCenter.

Note: If a Hyper-V Server or an ESXi host belongs to a Cluster, you cannot remove it. You need to remove it from Cluster first or Remove the full Cluster from SCVMM 2019.

And with this last section, I finish this article How to add and config Hyper-V hosts and Clusters in SCVMM 2019. As always in my blog posts, I try to go all the important details, and not go very newbie, but with technical details that are important. Also very important is always the errors that we can encounter and how to fix it.

The next article in this System Center Virtual Machine Manager 2019 Series is How to integrate System Center with Veeam Backup. I hope I have time to do this during next week to finish and close this System Center Virtual Machine Manager 2019 Series.

SCVMM 2019 Blog Series:

  1. How to Install System Center 2019 in Windows Server 2019
  2. How to add and config vCenter and ESXi hosts in SCVMM 2019
  3. How to add and config Hyper-V hosts and Clusters in SCVMM 2019
  4. How to integrate System Center with Veeam Backup

I hope this blog post is useful in how to add and config Hyper-V hosts and Clusters in SCVMM 2019 and also fix some issues that you may find.

Share this article if you think it is worth sharing. If you have any questions or comments, comment here, or contact me on Twitter.

©2020 ProVirtualzone. All Rights Reserved
By | 2020-09-21T03:14:21+02:00 September 21st, 2020|Hyper-V|0 Comments

About the Author:

I am over 20 years’ experience in the IT industry. Working with Virtualization for more than 10 years (mainly VMware). I am an MCP, VCP6.5-DCV, VMware vSAN Specialist, Veeam Vanguard 2018/2019, vExpert vSAN 2018/2019 and vExpert for the last 4 years. Specialties are Virtualization, Storage, and Virtual Backups. I am working for Elits a Swedish consulting company and allocated to a Swedish multinational networking and telecommunications company as a Teach Lead and acting as a Senior ICT Infrastructure Engineer. I am a blogger and owner of the blog ProVirtualzone.com

Leave a Reply

%d bloggers like this: