Find VMs without tags

Check Backup-Tag SLA

VMware tags are a versatile tool to dynamically assign VMs to groups. One use-case is leveraging VM-Tags to guarantee backup-SLA. Im my case there’s a category named “Backup” which contains several backup SLA tags for weekly or daily backups.

Oneliner

With PowerCLI you can find out quickly which VMs have no tags.

connect-viserver myVC
get-vm | ?{ (get-tagassignment $_) -eq $null}

This query isn’t sufficient yet. It’ll report only VMs that have no tags at all. But we’d like to find VMs that have no tags from the category “Backup”. So we have to modify our query a little bit.

get-vm | ?{ (get-tagassignment $_ -category Backup) -eq $null}

You need to adjust your query with the corresponding category name.

 

Monitoring HPE Switches with Log Insight

Using Log Insight as Syslog Server for HPE 5000 series Switches

In one of my last posts I’ve shown how to collect and monitor status logs of many different systems wit vRealize Log Insight. In this post I will show how to leverage Log Insight as syslog target for HPE switches.

Basically you can use Log Insight for any system that uses the syslog protocol, but there might be slight differences in the data structure of the transmitted datasets. For example some HPE FlexFabric 5000 series switches sent the year of the timestamp where Log Insight expected to find the hostname. Not very useful, because you want to know WHO sent that dataset.

The following commands on the switch shell will prepare the switch for logging to a remotehost and adjust the dataset to read properly by Log Insight. Finally you tell the switch which VLAN interface should be used to communicate with the loghost. In my simple example it’s VLAN interface 1. You’ll have to adjust values for loghost and interface according to your infrastructure.

system-view
info-center enable
info-center loghost s-vlog.mydomain.local port 514
info-center timestamp loghost no-year-date 
info-center loghost source Vlan-interface 1

 

VCSA and SCP

Using WinSCP with vCenter Server Appliance

Sometimes it’s necesary to exchange files with the vCenter Server Appliance (VCSA). Secure Copy Protocol is the tool of choice to do that job. Besides CLI commands there are handy programs like WinSCP.

While trying to establish a WinSCP connection to VCSA I’ve received communication errors. Whereas SSH connection worked without problems.

The problem is that WinSCP cannot use VCSA’s default shell as communication target. You have to switch default shell first before connecting. To do so, login to VCSA with SSH and activate Bash. Continue reading “VCSA and SCP”