Add iSCSI targets and set target parameter with PowerCLI

The code snippet in this blog post is an example of how to add iSCSI targets to an ESXi iSCSI initiator. But there is also a loop within processing a host, that sets iSCSI target parameter. For example this can be used when a storage vendor recommends to disable delayed acknowledgment per iSCSI target, like HPE does for 3PAR and LeftHand. Here you can see why it is recommended for 3PAR. In the code below, I do exactly that for LeftHand: disable delayed acknowledgment per target.

Continue reading “Add iSCSI targets and set target parameter with PowerCLI”

Advertisements

Error when enabling EVC mode

When you try to enable EVC on a cluster-level it could happens, that you get an error saying VMs cause problems enabling EVC on a host. Error is like:

The host cannot be admitted to the cluster's current Enhanced vMotion Compatibility mode. Powered-on or suspended virtual machines on the host may be using CPU features hidden by that mode.

One reason could be, to use Hardware virtualization feature in a VM. evc_vm_error

To find these VMs quickly, you can run the following PowerCLI command:

Get-VM | Where-Object {$_.ExtensionData.config.nestedhvenabled -eq $true}

If there are any VMs, having this feature enabled, you have to disable it to be able to enable EVC mode. To disable the feature, VMs has to be powered down. You can use this small script to disable the feature.

$spec = New-Object VMware.Vim.VirtualMachineConfigSpec
$spec.nestedHVEnabled = $false
foreach ($vm in (Get-VM | Where-Object {$_.ExtensionData.config.nestedhvenabled -eq $true -and $_.PowerState -eq "PoweredOff"} )) {
    $vm.ExtensionData.ReconfigVM($spec)
}

 

Script to answer question: On how many hosts my VMs can run after HTAware Mitigation

When enabling the ESXi Side-Channel-Aware Scheduler (L1 Terminal Fault vulnerability CVE-2018-3646) for a cluster or single hosts, you should use VMware HTAware Mitigation Tool for resource analyzing and enabling.

There are a few limitations after applying and enabling VMware L1TF patches on ESXi hosts (starting in august 2018). One of them is that a VM configured with n vCPUs can only run on hosts with >=n physical cores. It is also no good practice to run a VM with n vCPUs on a host with n physical cores.

There is an important limitation of VMware Mitigation Tool. When analyzing a cluster, the tool just checks if VMs could run on current host after mitigation. If not, VM is red-coded in report. Makes sense. But, when the current host is the only host in cluster a VM can run after mitigation: VM is marked as green!

You can use my PowerCLI function to show on how many hosts VMs can run. For every VM you get the number of hosts in the cluster, the VM can run after enabling Side-Channel-Aware Scheduler.

Continue reading “Script to answer question: On how many hosts my VMs can run after HTAware Mitigation”

PowerCLI script to count paths to VMFS volumes

When implementing new storages or configure existing ones it is a good idea to check paths (state and amount) to volumes. When operating a few hosts using a few datastores this can be a very time-consuming task when using the GUI. Therefore I wrote the following function.

Continue reading “PowerCLI script to count paths to VMFS volumes”

putty cannot connect to 3PAR after upgrading to 3.3.1 MU3

Recently I upgraded a new 3PAR from 3.2.2 MU6 to 3.3.1 MU3. Even during the upgrade I could use me putty to run commands in 3PAR console. After the upgrade process activated 3.3.1 MU3, no putty session could be established any more. When trying to connect, the error appears:

Network error: Software caused connection abort

It turned out this is because no older TLS version than 1.2 can be used to connect any more. My version of putty was not aware of this. After installing the latest version (0.70) I could connect without errors. I am quite sure, this is new to MU3. Probably because of new security features respectively default settings (new command: controlsecurity for FIPS).

Notes

  • Find Command Reference Guide incl. MU3 here.
  • Find Release nodes, incl. MU3 here.

Script to check if VMs part of DRS-Groups

Recently I needed to check, if every VM of a cluster is part of at least one DRS-VM-Group. Typically this is a useful check if you operate a two (or more) site datacenter and/or stretched cluster. You then create DRS-groups for VMs and hosts. For each site a host- and at least a VM-group. At creation time of groups, every VM will be added to a VM-group. But for every new VM, you have to put it to a VM-group manually.

Continue reading “Script to check if VMs part of DRS-Groups”

Errors when installing SimpliVity Deployment Manager

To deploy new HPE SimpliVity nodes, you need to run Deployment Manager. Current version at writing: 3.7.6.244. Requirements to run Deployment Manager are: .NET 4.7.1 and Java 1.8. When .NET is not installed during installation, wizard links to Microsoft and starts the download. When Java is not installed or too old, an message is shown at first start. Sounds very simple. Anyway I had some problems.

I tried on Windows Server 2012 R2 and two Windows 10 Clients. During installation I got the error:

Input string was not in a correct format.

SVT_DeployMan2

When starting the Manager, I got the error:

Simplivity.DM.View has stopped working.

SVT_DeployMan1

The problem is caused by language settings in Windows. Even when just one language is installed, the problem can occur. To work around this issue, configure:

Control Panel –> Language –> Advanced settings –> Override for Windows display language –> select a language, do not  use “Use language list”.

SVT_DeployMan3

At lease starting the program works fine, during installation the same error is shown.