Skip to main content

Microsoft Hyper-V

The Hyper-V integration reads a Hyper-V host, or a whole failover cluster through any one node, by running PowerShell over Windows OpenSSH. It runs on an Integrator inside your network.

It is read-only. The integration only runs Get- cmdlets. It never starts, stops, migrates or reconfigures anything.

What it collects​

SyncCollects
Hypervisor discoveryThe failover cluster and every host with its Windows Server version, build, CPU, memory, state and addresses
Virtual machine discoveryVirtual machines with their guest OS, hostname, addresses, MACs, switches, VLANs, CPU, memory, state, generation and host
Network discoveryVirtual switches with their type and uplink, and the VLANs virtual machines use on them

Virtual machines appear under Compute > Instances, next to those from every other cloud.

A VM's guest OS, hostname and addresses come from Hyper-V integration services. A VM without them, or one that is off, is reported without them.

Requirements​

  • OpenSSH Server on the host the integration connects to:

    Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
    Start-Service sshd
    Set-Service sshd -StartupType Automatic
  • Network access from the Integrator to that host on port 22.

  • For a failover cluster: the node the integration connects to reads the other nodes over WinRM, as Hyper-V Manager and Failover Cluster Manager do.

Create an account​

Hyper-V has no read-only role. Reading virtual machines needs membership of the Hyper-V Administrators group, which can also change them, so use a dedicated account for the integration only.

  1. Create a domain account (for example CORP\inventory-hyperv).

  2. Add it to Hyper-V Administrators on every Hyper-V host (by Group Policy for a cluster).

  3. For a failover cluster, also grant it read-only cluster access:

    Grant-ClusterAccess -User CORP\inventory-hyperv -ReadOnly

Connect it​

  1. Under Integrations, add Microsoft Hyper-V with the host's hostname (any node of a cluster), the SSH port if it is not 22, and the account's username and password.
  2. In the integration's settings, assign the Integrator that can reach the host.
  3. Enable the syncs you want.

Host keys​

The first connection accepts the host's SSH host key and records it on the integration. Later connections must present the same key. After reinstalling OpenSSH or the host, clear the pinned host key in the integration's settings so the new one is recorded.

If a cluster node cannot be read (down, or WinRM unreachable), the sync reports which one. The virtual machines and hosts found earlier are kept rather than removed.