VMware Cloud Community
swerly01
Enthusiast
Enthusiast
Jump to solution

Noob... haha. Need help understanding...

Ok, i've downloaded and have the VMa 4.0 linux virtual machine on my cluster...

Now what....

What our goal is, is to get daily reports in our email of information about our VM environment, we are running a 3 node cluster.

I have not worked much with linux, so i may need some help figuring it all out.

Thanks

Tags (1)
Reply
0 Kudos
1 Solution

Accepted Solutions
a2alpha
Expert
Expert
Jump to solution

Try this:

It was started by Ivo Beerens and with contributions from others as well. I use this on our sites and have it set up to email daily as a scheduled task. You don't need the vMA to run it, it will work from the vCenter server. There are details of requirements on the page. Its a powershell script.

Dan

View solution in original post

Reply
0 Kudos
7 Replies
a2alpha
Expert
Expert
Jump to solution

Try this:

It was started by Ivo Beerens and with contributions from others as well. I use this on our sites and have it set up to email daily as a scheduled task. You don't need the vMA to run it, it will work from the vCenter server. There are details of requirements on the page. Its a powershell script.

Dan

Reply
0 Kudos
navadavuluri
Contributor
Contributor
Jump to solution

Hello swerly01,

vMA comes with SDK for Perl, vCLI and WebServices.

Once you are done adding your target servers using using vifp() you can get started with playing with scripts on your environment.

Above document of vMA covers all of this information.

For getting started, I would recommend playing with vCLI which are one-liner commands.

VMware Documenatation for vCLI: & A great external reference to getting started:

You may also start playing with a lot of scripts that are in our sample code repository: http://communities.vmware.com/community/developer/codecentral

I would also recommend looking into the SDK for Perl if you have familiarity with Perl, its a flexible tool.

Thanks Much,

Nava

http://communities.vmware.com/community/developer/codecentral
swerly01
Enthusiast
Enthusiast
Jump to solution

I run the script and get the following errors... is there something i need to install....

I've also ran the set-executionpolicy to unrestricted... not sure why its prompting...

Security Warning

Run only scripts that you trust. While scripts from the Internet can be useful, this script can potentially harm your

computer. Do you want to run c:\scripts\HealthCheck1-7.ps1?

Do not run Run once Suspend Help (default is "D"): r

Add-PSSnapin : No Windows PowerShell Snap-ins are available for version 1.

At c:\scripts\HealthCheck1-7.ps1:39 char:13

+ Add-PSsnapin <<<< VMware.VimAutomation.Core

The term 'Initialize-VIToolkitEnvironment.ps1' is not recognized as a cmdlet, function, operable program, or script fil

e. Verify the term and try again.

At c:\scripts\HealthCheck1-7.ps1:40 char:36

+ Initialize-VIToolkitEnvironment.ps1 <<<<

The term 'connect-VIServer' is not recognized as a cmdlet, function, operable program, or script file. Verify the term

and try again.

At c:\scripts\HealthCheck1-7.ps1:41 char:17

+ connect-VIServer <<<< $vcserver -port $portvc

The term 'get-view' is not recognized as a cmdlet, function, operable program, or script file. Verify the term and try

again.

At c:\scripts\HealthCheck1-7.ps1:48 char:22

+ $vcversion = get-view <<<< serviceinstance

The term 'get-vm' is not recognized as a cmdlet, function, operable program, or script file. Verify the term and try ag

ain.

At c:\scripts\HealthCheck1-7.ps1:49 char:15

+ $snap = get-vm <<<< | get-snapshot

Reply
0 Kudos
swerly01
Enthusiast
Enthusiast
Jump to solution

i found that i needed the plugin.

Reply
0 Kudos
a2alpha
Expert
Expert
Jump to solution

Which plugin did you need so I can update the list, and has that sorted it for you, what do think of the report it generates? To stop the first warning about running scripts if you right-click the .ps1 file and select properties and then click the unblock that should sort it.

Dan

swerly01
Enthusiast
Enthusiast
Jump to solution

I needed the VI-Toolkit, once i did that and unblocked the script it ran, it gives me a small error when it runs but, it still runs and emails.

Thanks for the help!

Reply
0 Kudos
a2alpha
Expert
Expert
Jump to solution

Yes, I mean't to put a link on that page back to the vi-toolkit and powershell downloads. I'll do that now. I normally get a yellow certificate error despite it being run on the vCenter server but not sure how to resolve that. Glad its working for you. Thanks,

Dan

Reply
0 Kudos