Win2012 cluster powershell cmd: Add-ClusterVirtualMachineRole fails with error "Unable to connect to via WMI"


  • Win2012 cluster powershell cmd: Add-ClusterVirtualMachineRole fails

    I have 3-node win 2012 hyperv cluster and I'm trying to make a vm highly available and I can do so using the FailOver Cluster Manager GUI, but not using the Powershell cluster cmd Add-ClusterVirtualMachineRole, any idea on what's wrong?

    One additional node is that the 3rd node of the cluster can not host vm.

    Here is the error:

    PS C:\Users\Administrator.AUTOMATION> Import-Module FailoverClusters
    PS C:\Users\Administrator.AUTOMATION> Add-ClusterVirtualMachineRole -Name "vm01" -VirtualMachine "vm01"
    Add-ClusterVirtualMachineRole : Unable to connect to node03 via WMI.  This may be due to networking issues or
    firewall configuration on node03.
        Invalid namespace
    At line:1 char:1
    + Add-ClusterVirtualMachineRole -Name "node01" -VirtualMachine "v ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [Add-ClusterVirtualMachineRole], ClusterCmdletException
        + FullyQualifiedErrorId : Add-ClusterVirtualMachineRole,Microsoft.FailoverClusters.PowerShell.AddClusterVirtualMac

    Thanks in advance!


    • Edited by ChinQ Friday, July 06, 2012 12:40 AM
    Friday, July 06, 2012 12:25 AM

All replies

  • Do you have the cluster nodes set up with remote management enabled?  I've not had any issue with Add-ClusterVirtualMachineRole, but I always set my hosts with Remote Management Enabled.

    If you are not changing the name of the VM (which it looks like you are not), you should not need the -Name parameter.  I'd try it without and see if that makes any difference.  Since I generally create a VM and then make changes to it, I capture the output of the New-VM cmdlet ($VMinfo = New-VM ...) and then pipe that into all the other commands.  So I haven't tried playing with all the other parameters.


    Thursday, July 26, 2012 8:28 PM