Virtual Machine Manager (VMM) Error ID: 1730

$vm = Get-SCVirtualMachine -Name $vmName
Read-SCVirtualMachine -VM $vm

Read-SCVirtualMachine : The selected action could not be completed because the virtual machine is not in a state in
which the action is valid. (Error ID: 1730)

Check the state of the virtual machine, and verify that the selected job can be run on a virtual machine in that state.

To restart the job, run the following command:
PS> Restart-Job -Job (Get-VMMServer localhost | Get-Job | where { $_.ID -eq "{442cfeda-2df8-4ee8-9c3d-f36390653124}"})
At line:1 char:1
+ Read-SCVirtualMachine -VM $vm
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ReadError: (:) [Read-SCVirtualMachine], CarmineException
    + FullyQualifiedErrorId : 1730,Microsoft.SystemCenter.VirtualMachineManager.Cmdlets.RefreshVmCmdlet

Resolution: remove guest VM clustered role an then re-add it to the cluster
remove guest VM clustered role an then re-add it to the cluster

1. Remove Clustered Role

# Experimental: remove clustered roles via PowerShell
# Note: currently, these commands don't remove the roles properly; hence, the GUI method is necessary
$clusteredRoles=Get-ClusterResource -name *$vmName*
foreach($role in $clusteredRoles){
    write-warning "Remove-ClusterResource -Name $roleName -Force"
    if($env:computername -ne $role.OwnerNode){
        $session=new-pssession $ownerNode
        if($session.State -eq 'Opened'){            
            invoke-command -session $session {param($roleName)Remove-ClusterResource -Name $roleName -Force} -Args $roleName
            remove-pssession $session
        Remove-ClusterResource -Name $roleName -Force

2. Re-add Guest VM to clustered role

# Required: console or RDP session onto the owner node

# Experimental: running this command via Remote WinRM has failed with this error
# WARNING: If you are running Windows PowerShell remotely, note that some failover clustering cmdlets do not work
# remotely. When possible, run the cmdlet locally and specify a remote computer as the target. To run the cmdlet
# remotely, try using the Credential Security Service Provider (CredSSP). All additional errors or warnings from this
# cmdlet might be caused by running it remotely.
# WARNING: You do not have administrative privileges on the cluster. Contact your network administrator to request
# access.
#     Access is denied
function addVmToCluster{
    foreach ($vmName in $vmNames){
            #Start-VM -Name $vmName -EA Stop
            if(!$targetCluster){$targetCluster=(get-cluster -ea SilentlyContinue).Name}
                Add-ClusterVirtualMachineRole -Cluster $targetCluster -VirtualMachine $vmName -EA Stop
                write-host "No clusters defined."
            write-warning "$($error[0])"
    return $results

addVmToCluster $vmName

Repair with the Ignore Option:

Leave a Reply

Your email address will not be published. Required fields are marked *