Quantcast
Channel: Hyper-V forum
Viewing all articles
Browse latest Browse all 19461

Error while adding a virtual machine to Failover Cluster using PowerShell Command let

$
0
0
Hi

I am trying to add a virtual machine to a failover cluster from a powershell console launched using runas command under the context of a domain administrator. The cluster consist of two Hyper-V nodes runing Windows Server 2012 RTM.
The virtual machine configuration and virtual hard disk are stored on shared cluster storage i.e C:\ClusterStorage\Volume1.

Windows FailoverClustering-Manager event log reports a message stating the virtual machine is not valid. The VM can be powered on successgully and has windows 2003 server OS.

"Failover Cluster PowerShell cmdlet Add-ClusterVirtualMachineRole: The Virtual Machine 'TestVM1OnClusterAgain' is not valid."

The power shell commands fails with detail error

C:\Windows\system32>runas /profile /user:domain\admin "powershell.exe"
Enter the password for domain.com\admin:
Attempting to start powershell.exe as user "domain.com\admin" ...

PS C:\Windows\system32> Import-Module FailoverClusters
PS C:\Windows\system32> Add-ClusterVirtualMachineRole -VMId 92311FBB-B6FE-4F39-A
B31-AF08BAAFA8A8 -verbose
VERBOSE: Connecting to cluster on local computer OCEAN2.
VERBOSE:    at
Microsoft.FailoverClusters.PowerShell.AddClusterVirtualMachineRoleCommand.Wrapp
edProcessRecord()
   at Microsoft.FailoverClusters.PowerShell.FCCmdlet.ProcessRecord()
Add-ClusterVirtualMachineRole : The Virtual Machine
'92311fbb-b6fe-4f39-ab31-af08baafa8a8' is not valid.
At line:1 char:1
+ Add-ClusterVirtualMachineRole -VMId 92311FBB-B6FE-4F39-AB31-AF08BAAFA8A8
-verbos ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~
    + CategoryInfo          : NotSpecified: (:) [Add-ClusterVirtualMachineRole
   ], ClusterCmdletException
    + FullyQualifiedErrorId : Add-ClusterVirtualMachineRole,Microsoft.Failover
   Clusters.PowerShell.AddClusterVirtualMachineRoleCommand

If I run the same command from the normal powershell console with elevated privilege the commands runs fine. The domain user has full access to the cluster. Looking forward for some reply.

Viewing all articles
Browse latest Browse all 19461

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>