Quantcast
Viewing all articles
Browse latest Browse all 179681

Problems with Get-VMHostSyslogServer

I am unclear as to why this command is failing. I am connected to my vCenter, and then want to see what the syslog server settings of all my hosts (6 hosts in 1 cluster, 2 hosts in another cluster, both clusters in 1 datacenter):

 

PowerCLI Z:\PHA Scripts> get-vmhost | get-vmhostsyslogserver

 

get-vmhostsyslogserver : 5/30/2013 2:20:52 PM    Get-VMHostSysLogServer        Input string was not in a correct format.

At line:1 char:14

+ get-vmhost | get-vmhostsyslogserver

+              ~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : NotSpecified: (:) [Get-VMHostSysLogServer], VimException

    + FullyQualifiedErrorId : Core_BaseCmdlet_UnknownError,VMware.VimAutomation.ViCore.Cmdlets.Commands.Host.GetVMHostSysLogServer

 

(repeated 5 times)

 

Host                                     Port

----                                     ----

(IP of vCenter)

(IP of vCenter)

 

Get-VMHost does return all 8 hosts, so why is there an error feeding the returned objects to Get-VMHostSyslogServer? Even when I try using an IP address, as per the examples in the help.

 

PowerCLI Z:\PHA Scripts> $SysLogServer = Get-VMHostSysLogServer -VMHost (IP of a single ESXi server)

Get-VMHostSysLogServer : 5/30/2013 2:28:55 PM    Get-VMHostSysLogServer        Could not find VMHost with name 'xx.xx.xx.xx'.

At line:1 char:17

+ $SysLogServer = Get-VMHostSysLogServer -VMHost xx.xx.xx.xx

+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : ObjectNotFound: (xx.xx.xx.xx:String) [Get-VMHostSysLogServer], VimException

    + FullyQualifiedErrorId : Core_ObnSelector_SelectObjectByNameCore_ObjectNotFound,VMware.VimAutomation.ViCore.Cmdlets.Commands.Hos

   t.GetVMHostSysLogServer

 

 

Get-VMHostSysLogServer : 5/30/2013 2:28:55 PM    Get-VMHostSysLogServer        Value cannot be found for the mandatory parameter

VMHost

 

 

I've got to be doing something wrong, something simple, but I can't figure out what. I just want to see what the settings of the syslog server are for all my hosts (I have them all configured to send the syslog remotely to the IP of the vCenter server. If I ssh to the host, and do "esxcli system syslog config get

 

# esxcli system syslog config get

   Local Log Output: /scratch/log

   Local Logging Default Rotation Size: 4096

   Local Logging Default Rotations: 8

   Log To Unique Subdirectory: true

   Remote Host: tcp://xx.xx.xx.xx:514

 

This is the latest PowerCLI version:

 

PowerCLI Z:\PHA Scripts> get-powercliversion

 

 

PowerCLI Version

----------------

   VMware vSphere PowerCLI 5.1 Release 2 build 1012425

---------------

Snapin Versions

---------------

   VMWare AutoDeploy PowerCLI Component 5.1 build 768137

   VMWare ImageBuilder PowerCLI Component 5.1 build 768137

   VMware License PowerCLI Component 5.1 build 669840

   VMware VDS PowerCLI Component 5.1 build 1012428

   VMware vSphere PowerCLI Component 5.1 build 1012428

   VMware vSphere Update Manager PowerCLI 5.0 build 432001


Viewing all articles
Browse latest Browse all 179681

Trending Articles



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