?
Solved

Running Scripts on VMWARE

Posted on 2011-05-03
18
Medium Priority
?
683 Views
Last Modified: 2012-05-11
I have to run a script on VMWare server, i have the instructions, i just need bit more guidance on how to run it...The instructions that i have are;

1.       Copy the attached script to your vSphere (vCentre) server.
2.       Change the extension of the file from .txt to .ps1
3.       Open “vSphere PowerCLI”
4.       Connect to vsphere server.
5.       Change to directory with this script in it.
6.       Type ./inventory.ps1
7.       A file called inventory.csv is created (works for both Windows and Linux).
I  want to go step by step, now in the first point it says i have to run script on vsphere? we have 8 VMware servers, all of them running ESX 3.5, so what do i have to do in the first step....
0
Comment
Question by:usmansultan
  • 8
  • 4
  • 3
  • +2
17 Comments
 
LVL 40

Expert Comment

by:coolsport00
ID: 35518007
What server it's refering to is just that - your vCenter Server server...whether that is a VM server or physical. So, you just need to copy the file to that server somewhere (I personally create a C:\Support folder to place tech files in).

~coolsport00
0
 
LVL 40

Expert Comment

by:coolsport00
ID: 35518013
The vSphere PowerCLI can be on your local workstation. I'm not a CLI guru by any means, but there is a command (reference in CLI User's Guide) on what to type to connect to your vCenter Server server. Once connected via CLI, just do a 'CD' (change directory) command to the directory you placed the .txt/.ps1 file and follow the rest of the steps.

~coolsport00
0
 
LVL 40

Expert Comment

by:coolsport00
ID: 35518018
What is the version of your vCenter Server/ESX or ESXi hosts?

~coolsport00
0
Get quick recovery of individual SharePoint items

Free tool – Veeam Explorer for Microsoft SharePoint, enables fast, easy restores of SharePoint sites, documents, libraries and lists — all with no agents to manage and no additional licenses to buy.

 
LVL 124
ID: 35518021
The Inventory PowerCLI script querys the VMware vSphere vCenter server which contains all the details about your ESX 3.5 servers and Virtual Machines and creates a nice CSV file.

Personally I prefer Veeam Reporter

download for free

http://www.veeam.com/vmware-esx-reporter-free.html

(it produces nice pictures for Management!)
0
 
LVL 124
ID: 35518024
The first thing you need to do after launching vSphere PowerCLI is to get a connection to a vCenter Server system or ESX host. To get started, call the Connect-VIServer cmdlet and specify the IP address or DNS name of your vCenter Server system or ESX host, the protocol (http or https), user name, and password.

Connect-VIServer –Server 10.22.36.36 –Protocol https –User admin –Password mypass
0
 
LVL 124
ID: 35518028
to check you've connected and all is working type

Get-VM

0
 
LVL 1

Author Comment

by:usmansultan
ID: 35656972
how can i found out which server is running VCenter, i have no documents to find out that information.....
0
 
LVL 1

Author Comment

by:usmansultan
ID: 35659546
and how can i open the console for the servers which are running ESX server? i cant RDP in to those servers......
0
 
LVL 1

Author Comment

by:usmansultan
ID: 35673348
I have downloaded and installed that tool, now how can i configure it to make it work?
0
 
LVL 24

Expert Comment

by:Luciano Patrão
ID: 35690006
Hi

Without most of that information, is pointless to run that scripts.

You can get the information witch host hold a VM. You get information by running a power shell script. But again, you need to connect to a vCenter.

But also you can use the perl VMware Scripts
http://www.vmware.com/support/developer/viperltoolkit/

Using vminfo.pl you can get lots of information. But also there is so many perl scritps to work and get many information.

Hope this can help

Jail
0
 
LVL 124
ID: 35690143
You need to find your vCenter server, and also your ESX servers, you cannot RDP to ESX servers, but you can use ssh to connect to the console of them, if ssh has been enabled.

Do you use the vSphere vCenter Client GUI? You usually use it to connect to ESX hosts or vCenter server?
0
 
LVL 124
ID: 35690168
When you have found your vCenter and ESX servers, you can also run these

I would recommend and use the VMware Community PowerPack.

in combination with PowerGUI http://powergui.org/index.jspa

http://www.virtu-al.net/featured-scripts/vmware-powerpack/

This will give you all the information you need, (datastores, hba, LUNs) and has the ability to run your scripts on your VMs.

Let me know if you require help finding your servers!
0
 
LVL 124
ID: 35690175
Do you have a vCenter Management Server?
0
 
LVL 1

Author Comment

by:usmansultan
ID: 35704056
We dont have a VCentre or Vsphere, because there are six ESX servers, all of them are running ESX 3.5, and those ESX i can see the machines attached to them, but log in to them?
0
 
LVL 124
ID: 35705296
In that case you cannot use the script. Because that script needs to be run on the vCenter server.
0
 
LVL 124

Accepted Solution

by:
Andrew Hancock (VMware vExpert / EE MVE^2) earned 2000 total points
ID: 35705301
But, I can recommend Veeam Reporter (free download)

http://www.veeam.com/vmware-esx-reporter-free.html

which may help you with your Inventory.
0
 
LVL 38

Expert Comment

by:younghv
ID: 36157542
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

Get quick recovery of individual SharePoint items

Free tool – Veeam Explorer for Microsoft SharePoint, enables fast, easy restores of SharePoint sites, documents, libraries and lists — all with no agents to manage and no additional licenses to buy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will show you how to create an ISO CD-ROM/DVD-ROM image (*.iso), and MD5 checksum signature, for use with VMware vSphere Hypervisor 6.5 (ESXi 6.5). It's a good idea to compare checksums, because many installations fail because of a corr…
In this article, I will show you HOW TO: Perform a Physical to Virtual (P2V) Conversion the easy way from a computer backup (image).
Teach the user how to install and configure the vCenter Orchestrator virtual appliance Open vSphere Web Client: Deploy vCenter Orchestrator virtual appliance OVA file: Verify vCenter Orchestrator virtual appliance boots successfully: Connect to the …
Teach the user how to join ESXi hosts to Active Directory domains Open vSphere Client: Join ESXi host to AD domain: Verify ESXi computer account in AD: Configure permissions for domain user in ESXi: Test domain user login to ESXi host:
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question