If you have ever worked with the Test-Cluster command in the failover clustering module, you will know that this command generates an HTML report. This is visually good, for like IT managers, but not very appealing to people are automating infrastructure build process. There is no way this command provides any passthru type of functionality through which it returns the result object that can be easily parsed or used in PowerShell.
Cluster validation via powershell
The Powershell cmdlet Test-Cluster queries a myriad of data and performs validation tests which it wraps into a pretty report. If you run Test-Cluster -List you get a list of item's you can individually query with the cmdlet. There's a common naming scheme when you read the DisplayName's. They all start with either "List" or "Validate".
I don't see any logged cluster errors or notice any failover activity while this report is generated. Microsoft technet isn't exactly clear on this either, but they do infer that the behavior is inline with what I'm thinking it is. See this excerpt (emphasis mine):
Test results are captured in a file with the file name that you specify. By running the validation tests, you can confirm that your hardware and settings are compatible with Failover Clustering. There are multiple types of tests, including Cluster, Inventory, Network, Storage, System, and other types of tests. Storage tests will not test online disks or storage pools that are in use by a clustered role. To test such disks, first run Stop-ClusterGroup to stop the clustered role, and then run Test-Cluster. After the tests are done, start the clustered roles, also known as resource groups, again.
All available cluster tests are grouped into 5 test categories. They are Cluster Configuration, Inventory, Network, Storage, and System Configuration. Only the Storage category contains tests which will trigger a failover or impact performance (according to Microsoft that is). Additionally, most of these test categories are not intended to be executed after the cluster is certified and operational. Except for one that is...
In my experience, Test-Cluster never triggers a failover event. It is designed only to check hardware and software configurations to see if everything is compatible with failover clustering. As I understand it, Test-Cluster is also run when using the GUI "Validate Cluster" function from within Failover Cluster Manager. It doesn't actually "Test" the "Failover" function of the cluster.
DisplayNames that start with List just grabs the information from the cluster nodes, while the DisplayNames starting with Validate do actually test the configuration (it does the failover of disks, sharewithess testing, network testing etc...)
Detailed answer: The logic behind splitting the tests into "Validate" vs "List" has been consistent since 2008R2. Most of the tests starting with "List" are considered Inventory Tests, they do not effect the state of a currently configured cluster. All commandlets starting with list are informational in nature as detailed in this technet snippet below.
Test results are captured in a file with the file name that you specify. By running the validationtests, you can confirm that your hardware and settings are compatible with Failover Clustering.There are multiple types of tests, including Cluster, Inventory, Network, Storage, System, and othertypes of tests. Storage tests will not test online disks or storage pools that are in use by aclustered role. To test such disks, first run Stop-ClusterGroup to stop the clustered role, andthen run Test-Cluster. After the tests are done, start the clustered roles, also known as resourcegroups, again.
To perform some of the Cluster Shared Volume (CSV) validation tests, the Test-Cluster commandcreates a local user account named CliTest2 on each cluster node. The account is automaticallyremoved from your system after the cluster validation tests are completed.
This example runs all validation tests except the Inventory tests on the nodes named node1 andnode2. If either node1 or node2 is already a member of a cluster, then the tests will include allnodes in that cluster.
Specifies the disk number or disks for which to run the cmdlet. If the specified disk is online andis assigned to a clustered role or Cluster Shared Volume, you must also specify the Forceparameter to take the disk offline for the duration of the storage tests. Otherwise, the specifieddisk must be offline before the cmdlet is run. If the Disk parameter isn't specified, storagetests run on all disks that are available for use in the cluster or that are in the cluster resourceoffline or failed state.
Specifies the clustered storage pool or pools for which to run the cmdlet. When the specifiedstorage pool is online and a virtual disk in the storage pool is assigned to a clustered role orCluster Shared Volume, you must also specify the Force parameter to take the storage pooloffline for the duration of the storage tests. Otherwise, command will exit with an error. Thespecified storage pool must be taken offline before running the storage tests. If the Poolparameter isn't specified, storage tests run on all storage pools that are available for use in thecluster or that are in the cluster resource offline or failed state.
You can execute the validation wizard in FCM by selecting the cluster and clicking the Validate Cluster action. The Validate a Configuration Wizard will open and you are walked through the cluster testing process.The first decision you will have to make is whether you want to perform all possible or selected tests. Note that some tests, such as those for storage, will disrupt service availability. If you are building a new cluster then you should run all tests. If you have modified your cluster, then you should select only those tests that are required. Microsoft has published an expansive table to help you choose what tests to select in the latter scenario.Choosing validation tests to perform.
An existing cluster will be tested from time to time during the time of operation. Testing the storage of the cluster can disrupt services. For example, testing the disks of a Hyper-V cluster will cause virtual machine outages. Therefore, you might choose to exclude the storage tests, as shown below.Selecting validation tests to perform.
A summary result is displayed when the wizard is complete. You can check out View Report to open the complete results in a web browser. These reports are automatically stored for you in C:\Windows\Cluster\Reports as MHTML files. You can close the browser and reopen the results at a later time.Note that you will need to supply a cluster validation report when opening a support case for a cluster with Microsoft support.The report has a summary result that can be:
You can drill down in the report to get more detail by clicking the hyperlink. Even though the cluster might be supported with a warning, in my experience, there will probably be problems. Do everything you can to resolve the issue(s) to get a more stable cluster for your HA services or virtual machines.
You can use the Validate a Configuration Wizard, which is integrated in Failover Cluster Manager, or the Test-ClusterWindows PowerShell cmdlet, to run a set of focused validation tests. You can run this process on a collection of servers that you intend to use as nodes in a cluster. This tests the underlying hardware and software, directly and individually, to obtain an accurate assessment of how well Failover Clustering can be supported in a given configuration.
The Validate a Configuration Wizard or the Test-ClusterWindows PowerShell cmdlet enables you to run a set of focused tests on a collection of servers, networks, and associated storage that are planned for use as a failover cluster. The cluster validation process tests the underlying hardware and software to obtain an accurate assessment of how well Failover Clustering can be supported in a given configuration.
The fully configured system (servers, network, and storage) must pass all the required tests in the Validate a Configuration Wizard, which you can run from Failover Cluster Manager. Alternatively, you can run the validation tests using the Test-ClusterWindows PowerShell cmdlet.
This is the most straightforward validation scenario. The hardware components (systems, networks, and storage) are connected, but the systems are not functioning as a cluster. Running tests in this situation has no impact on availability.
With systems that you have cloned or imaged to different hardware, you must run the Validate a Configuration Wizard as you would with any new cluster. We recommend that you run the wizard just after you connect the hardware components and install the Failover Clustering feature, before the cluster is used by clients.
With virtualized servers in a cluster, run the Validate a Configuration Wizard as you would with any new cluster. The requirement for running the wizard is the same whether you have a "host cluster" (failover occurs between two physical computers), a "guest cluster" (failover occurs between guest operating systems on the same physical computer), or some other configuration that includes one or more virtualized servers.
You might want to run a limited number of validation tests on a single server that you intend to use in a cluster. Some tests cannot be run in this situation; for example, tests that confirm the software and software updates match between servers, and storage tests that simulate failover between nodes. You must have at least two nodes in a cluster before you can complete the cluster validation process. So if you bring more servers into the configuration, you must run the Cluster Validation Wizard again so that all the tests can be complete.
If you need support from Microsoft, you may be required to you provide the validation report from the wizard. If you have not already run the wizard and saved the report, you might need to take the cluster offline to run the wizard. The report shows whether your configuration is supported, and it can help Microsoft customer support troubleshoot configuration issues with hardware, drivers, and the basic system configuration. 2ff7e9595c
Comments