Running the command using the vSphere CLI
I installed the vSPhere CLI on my workstation but can't seem to execute commands.
My ESX hosts are managed by a host vCenter.
C:\Program VMware vSphere CLI\bin & gt; esxcli - 10.15.0.11 - user name of server localadmin - password XXXXXXX swiscsi add - n vmk0 d vmhba32
Makes me:
Connect to 10.15.0.11 failed: authorization to perform this operation was refused.
You use an account that has permission to update the configuration of ESX host? Of the error, it looks like a permission problem.
In addition, your syntax can be disabled, try this:
[VI Toolkit] C:\Program Files\VMware\VMware vSphere CLI\bin> .\esxcli.exe --serer esxi40-1.primp-industries.com --username root swiscsi nic add --nic vmk1 --adapter vmhba33 Enter password:
(it worked on our development configuration)
=========================================================================
William Lam
VMware vExpert 2009
Scripts for VMware ESX/ESXi and resources at: http://engineering.ucsb.edu/~duonglt/vmware/
VMware Code Central - Scripts/code samples for developers and administrators
If you find this information useful, please give points to "correct" or "useful".
Tags: VMware
Similar Questions
-
How to find if a scsi disk can be used as a ROW or only use not vsphere CLI.
Hi, I want to know if the SCSI disk can be used as RDM and a remote computer running vSphere CLI.
I tried to use 'vicfg-scsidevs - l', but it doesn't have the required information list
===============================================
Here is sample out put
MPX.vmhba0:C0:T1:l0
Device type: disk
Size: MB 69459
Full name: disk space from VMware (mpx.vmhba0:C0:T1:L0)
Plugin: NMP
Device console: /vmfs/devices/disks/mpx.vmhba0:C0:T1:L0
Devfs Path: /vmfs/devices/disks/mpx.vmhba0:C0:T1:L0
Seller: VMware model: Block device Revis: 1.0
SCSI level: 2 is nickname: status:
: RDM Capable is removable:
Other names:
VML.0000000000766d686261303a313a30
empty fields "Is Capable RDM" here.
=======================================================
When I executed the command 'esxcfg-scsidevs - l' on an ESX Server, he gave me the necessary info.
MPX.vmhba0:C0:t0:l0
Device type: Direct access
Size: 138919 MB
Full name: disk space from VMware (mpx.vmhba0:C0:T0:L0)
Plugin: NMP
The console device: / dev/cciss/c0d0
Devfs Path: /vmfs/devices/disks/mpx.vmhba0:C0:T0:L0
Seller: VMware model: Block device Revis: 1.0
: SCSI 2 is Pseudo: false status: on
: RDM Capable false is removable: false
Is Local: true
Other names:
VML.0000000000766d686261303a303a30
So is it possible for vSphere CLI through which we can tell if the SCSI disk device can be used as ROW or NOT?
and what parameter defined as capable of RDM?
Thank you
Chandra Sekhar P.
Hi Chandra,
In order to get the SCSI LUNS that can serve as RDM, you must use the QueryConfigTarget method. This method is defined on EnvironmentBrowser. You need to recover some EnvironmentBrowser object ComputeResource the HostSystem where the virtual machine is created. The configTarget.ScsiDisk returned after the method call contains the logic unit number information that is capable of RDM.
I hope this helps!
Neha
-
How to run mbralign on esxi with vsphere CLI
I have a few virtual machines with disks misaligned, each of them can be found on ESXi, I also vSphere CLI installed on my laptop.
Thus, it is possible to run mbralign using vSphere CLI, since there is no console on ESXi. If so, what would be the command.
Not possible, vCLI aims for vSphere management regarding the host/vms/etc., that has nothing to do with running the tools custom within the classic ESX or ESXi. As far as I know, the mbralign is not supported on ESXi, if this is the case, it is most likely must be run within the Busybox unsupported console.
Take a look to this blog post by Duncan about the alignment of the VM - http://www.yellow-bricks.com/2010/04/08/aligning-your-vms-virtual-harddisks/
=========================================================================
William Lam
VMware vExpert 2009
Scripts for VMware ESX/ESXi and resources at: http://engineering.ucsb.edu/~duonglt/vmware/
Introduction to the vMA (tips/tricks)
Getting started with vSphere SDK for Perl
VMware Code Central - Scripts/code samples for developers and administrators
If you find this information useful, please give points to "correct" or "useful".
-
Can I use VMware vSphere CLI to perform a post on esxi 3.5 and 4.0?
Currently, we use a bash script (mainly vimsh and esxcfg-* command) to set up post on our server ESX (vSwitch, service), update, etc.. I found that it is not a RCLI for vSphere 4.0? a RCLI be rename to just CLI?
Secondly, what tools or version would work for ESXi3.5 and 4.0? Do not write code twice
And finally, is there any limitation on the CLI or RCLI that it cannot be done locally by esxcfg-# or the VI client
DWC
NP.
Not at points of reward to "correct" or "useful".
=========================================================================
William Lam
VMware vExpert 2009
Scripts for VMware ESX/ESXi and resources at: http://engineering.ucsb.edu/~duonglt/vmware/
VMware Code Central - Scripts/code samples for developers and administrators
If you find this information useful, please give points to "correct" or "useful".
-
What are the steps in vSphere CLI?
I downloaded and installed vSphere CLI but I get the following error
'Connect' is not recognized as internal or external, command an executable program or batch file.
The main difference between the vSphere CLI and PowerCLI is that vSphere CLI is Perl based and PowerCLI is based on PowerShell. Both are great tools and can be used for the automation of your vSphere environment. Which tool is best for you depends on your experience with Perl or PowerShell.
You can also combine these two tools I described in my blog How to run scripts perl CLI of PowerCLI VMware vSphere.
-
Help to install vSphere CLI on Linux 64-bit
Hello!
I try to get the vSphere CLI working on my Fedora 13 64-bit box and I'm running into a problem when I try to execute commands after installation. I downloaded the 64-bit for the vSphere CLI 4.0 U2, unpacked tar.gz and run the installation script which filled perfectly. It installs all the right binary files under/usr/bin. (Although when installing it asks me to replace a bunch of files in/usr/lib64/perl5/and I just accept the defaults)
When I try to execute a command, such as vicfg-vswitch, I get the following error.
usr: symbol lookup error: /usr/lib64/perl5/auto/XML/LibXML/Common/Common.so: undefined symbol: Perl_Tstack_sp_ptr
Essentially, I can't even use the vCLI.
Nobody knows what the error means or have a good guide on installing the vCLI for Linux? VMware documentation don't give me information on how to handle these errors.
Take a look at this thread for your answer - VI Perl Toolkit and Fedora 9. Failure
=========================================================================
William Lam
VMware vExpert 2009,2010
VMware scripts and resources at: http://www.virtuallyghetto.com/
Introduction to the vMA (tips/tricks)
Getting started with vSphere SDK for Perl
VMware Code Central - Scripts/code samples for developers and administrators
If you find this information useful, please give points to "correct" or "useful".
-
vSphere CLI - perl.exe - Unable to locate component
Hello
I installed the vSphere 4.1 CLI on Windows Server 2003 SP2 (x 32) and when I try to connect using the vicfg - nas.pl it gives error below. W2K3 x 32-bit is supported according to the vSphere CLI document. I don't know where he's going wrong then.
Perl.exe - Unable to locate componentThis application has failed to start because libxml2.dll is not found. Reinstalling the application may fix this problem.
Any suggetions would be appreciated.Thank you
Installation of Perl is not in the Path environment variable. To the Path environment variable, add the following location:
I think that the installation of Perl is not in the Path environment variable.
C:\Program VMware VI CLI\Perl\bin remote
-Right click on my computer
-Select properties in the context menu
-Select advanced system settings
-Click the Environment Variables button
-Select the path in the System Variables and click on change
-Add the following line «;» "C:\Program VMware VI remote CLI\Perl\bin" to the Path variableRestart the command prompt for the path access is taken into account
-
I just got my VCenter server running, created my datacenter and the cluster. I added my hosts and must say that it is really cool. Got a quick question though. I can connect is no longer in ESXi 4 using the CLI interface to make changes. I get the login, but it fails "to connect to the local host failed." I have ensure that the server, that I tried to connect is in maintenance mode. Is what is happening because Vcenter now manages the ESXi hosts? I have to install the Vsphere CLI on the Vcenter Server? Any suggestions?
Yes,--param server is required, otherwise by default it resort 'localhost', which is probably not what you want.
=========================================================================
William Lam
VMware vExpert 2009
Scripts for VMware ESX/ESXi and resources at: http://engineering.ucsb.edu/~duonglt/vmware/
Introduction to the vMA (tips/tricks)
Getting started with vSphere SDK for Perl
VMware Code Central - Scripts/code samples for developers and administrators
If you find this information useful, please give points to "correct" or "useful".
-
How to disable the prompt 'more' when you run the command 'See logging' CLI
Hello. I would like to know if there is a command that I can run to disable paging on my SF302 switch.
Thus, for example, when I run the command 'See logging' on the CLI, I care about her return all results rather than ask me hit the SPACEBAR or enter.
Is there a way to do this?
Thanks in advance for your time and your consideration.
J.L.
command is
terminal datadump
-Tom
Please evaluate the useful messages -
Impossible to run a command with the Vsphere Management Assistant
Hi all
I have a little problem.
Soon I'll have to do a new iscsi infrastructure to access my SAN then I read 'VMware-iSCSI-SAN-Configuration-Guide '.
I saw that I must use VSphere Cli, so I downloaded it
After you have installed the VMA in my Virtual Center, I configured it like that.
"vifp addserver my esx Server - username" to add one of my ESX "vifptarget s myesx server" to connect the roof then it works.
The only problem I have is that the esxcli swiscsi nic list d vmhba33 command does not work.
In fact he told me to put a username and password but I don't know what login and password to
I tried to put the root password it work not so can you help me?
So as you can see, you're not a guest for the user and password name which was the original question.
There is no mistake that you touch currently, your order is probably out the correct information, as it is probably no output for this command from your swiSCSI cannot be configured correctly.
Take a look at this blog about Multipathing iSCSI and esxcli post - http://www.yellow-bricks.com/2009/03/18/iscsi-multipathing-with-esxcliexploring-the-next-version-of-esx/
Please mark this question an answer because your actual issue are not related to the vi-fastpass as you see it works and post a new thread if you have any other questions around iSCSI installation and use esxcli program.
Thank you
=========================================================================
William Lam
VMware vExpert 2009,2010
VMware VCP3, 4
VMware VCAP4-DCA
VMware scripts and resources at: http://www.virtuallyghetto.com/
Introduction to the vMA (tips/tricks)
Getting started with vSphere SDK for Perl
VMware Code Central - Scripts/code samples for developers and administrators
If you find this information useful, please give points to "correct" or "useful".
-
How to use the run as command without a password in XP
Hi there ;)
See, me and my father have administrator accounts on a computer running Windows XP. Sometimes, I do not want to connect as myself (I want to use some of its apps while I use my own) but I still want to run commands like me (for example start firefox like me) while I'm logged into his account.We both don't have passwords, but when I use the Runas command either right click or the command line on my father's account, I get the error "failed to connect. The possible reasons are blank passwords." When I give myself a password, I do not get this message, but my password is empty, I get this message. How to use runas without password?
Here is the error: http://bayimg.com/baiFMAadn
Hello
As the two users are administrators of the computer it you cannot use the application without password. You will need to have the password to run the application.
For reference: overview of user accounts: http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/usercpl_overview.mspx?mfr=true
-
need help to run the perl script invoking ESX ssh command power CLI
I tried with the VCLI function call, but my perl script does not work... If I want to download my script for ESX (not ESxi) perl file, then run the command that will display the value in the directory/tmp, then pull the output file in/tmp local VC no matter what directory
something like this article using plink.exe http://communities.VMware.com/message/1260100#1260100
comm and I want to run ""iam_extract_global.pl perl - customer < customer name > - /tmp/xxxxxx.mef outfile " "
so I need pul /tmp/xxxxx.mef to the local directory
Try to place the string values in the first 3 lines in quotes.
$User = "root".
$Pswd = "xxxxx".
$ESXname = "xxxxxxx". -
How to run the command import and jpximport using PuTTY
Hello
I ' v no access to use prompt command for security in place of the customer.
So I have to use Putty to run the import command to import my clumsy custom pages in the database.
I tried XMLImporter using PuTTY, it says import is complete. But still my survey error page that
Application: DNF, Message name: FND_NO_REGION_DATA. Chips: BOUNDING = / at/oracle/apps/per/coe/XXCOEPG
oracle.adf.mds.MetadataDefException: unable to find the component with an absolute reference = / at/oracle/apps/per/coe/XXCOEPG, XML Path = null. Please check that the reference is valid and the definition of the component on the file system or in the MDS repository.
Can someone please provide a solution for this.
Thanks in advance,
SANHi SAN,
Try it by XML importer it I will work
for ex:
Java applications oracle.jrad.tools.xml.importer.XMLImporter $JAVA_TOP/xxtop/oracle/apps/per/jobevaluation/webui/XXTextPG.xml - username username-password apps - rootdir $ rootPackage JAVA_TOP/xxtop/oracle/apps/by/covering/webui - / xxtop/oracle/apps/per/jobevaluation/webui - dbconnection ' (DESCRIPTION = (ADDRESS_LIST = (LOAD_BALANCE = YES) (FAILOVER = YES) (ADDRESS = (PROTOCOL = tcp)(HOST=*xxHostName*) (PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = DEV))) ".
After running successfully command below any DB tool
Begin
JDR.utils_printdocument ('pagepath' ex: ' / xxtop/oracle/apps/by/covering/webui/XXTextPG ');
endKind regards
Srinivas -
Running the command by using VI SDK API esxupdate
Hi all
I need to install a package on an ESX Server. Right now I use the command esxupdate with update on the esx console option, I want to do this remotely without SSHing into the machine. Is there some api in VI SDK for this or there is another VMware SDK/API I should be looking into?
Thank you.
vCLI uses the vSphere SDK for Perl... it's the Perl bindings/stubs to the vSphere API and/or VI API
vSphere 4.x =
VI = 3.x
So yes, there are some methods that handle the updates/etc, look at the source code of vihostupdate which is just the Perl script and you'll see what methods are used.
=========================================================================
William Lam
VMware vExpert 2009,2010
VMware scripts and resources at: http://www.virtuallyghetto.com/
Introduction to the vMA (tips/tricks)
Getting started with vSphere SDK for Perl
VMware Code Central - Scripts/code samples for developers and administrators
If you find this information useful, please give points to "correct" or "useful".
-
Don't vSphere CLI use the FTP mode?
Does anyone know what vSphere CLI uses to connect to a hypervisor? I suspect it is FTP, but I can't get confirmation on this.
I think that ports it communicates via are similar to the vSphere-SSH Client or HTTPS and maybe vmware 901or 902 ports
If you find this or any other answer useful please consider awarding points marking the answer correct or useful
Maybe you are looking for
-
Canvio connect II does not work on Mac
I have a canvio connect II and I had to format it because Windows 7 does not recognize, I did said Toshiba, for formatting so that the hard disk has unit. I formatted with NTFS and my problem is when I connect my Mac hard drive, I can't save anything
-
Hi I find a problem with my iPad 2 Air... I delete almost everything about him and he always tells me almost full storage! can someone help me on this problem pls thank you
-
Connect an SSI absolute encoder to a DAQ card
Hello, everyone I try to connect four encoders of DAQ cards. Two of them are in quadrature encoders and the rest two absolute encoders. I'm guessing that connects the two quadrature encoders to both timers/counters on the card. But what of the SSI ab
-
Re: one photosmart more coper/printer/scanner not to talk to the laptop
1st stop I'm under Win7 32-bit home. The printer will copy the built-in scanner pages and print them very well and printers autotest reports everything is fine. For awhile, I had a problem with any computer see the printer via the USB cable. I wo
-
Order of the albums and tracks in the Windows music player
My albums are in reverse alphabetical order, and the tracks from each album are in reverse numerical order. How can I activate them so that they are in the right order? (If I want to play an entire album, he plays the end at the beginning)