I have storage device connected via FiberChanel.
I want to list all the available luns/Volumes available in it.
how to navigate over fiberchanelHba to get all volumes?
I have storage device connected via FiberChanel.
I want to list all the available luns/Volumes available in it.
how to navigate over fiberchanelHba to get all volumes?
I am trying to update /change configutaions detaills of host object using c#.net. Can anyone help out for this?
Gettting host object by
VimClient vimClient = new VimClient();
vimclient.Connect(URL);
List<EntityViewBase> hosts = vimClient.FindEntityViews(typeof(VMware.Vim.HostSystem),null,null,null);
Thanks.
I recently updated some code to use the web sdk for vsphere 5.5. I also updated the code to use retrievepropertiesex with continuepropertiesex where apiver is > 4.0, and to use just retrieveproperties where apiver < 4.1. The code is all C# with .NET, built for .NET 3.5. I used wsdl.exe from MS to generate the proxies and performed the proper edits to generate the xml serializer assemblies etc.
Retrieveproperties works (and has always worked) just fine.
However, sometimes, retrievepropertiesex and continueretrievepropertiesex (more so for retrievepropertiesex than for continueretrievepropertiesex) throw an exception about an error in the xml document. I noticed that it usually happens for 4.1 VCs, more so much more often for one particular 4.1 VC though sometimes for other 4.1 VCs as well. I have not found anything in common with the VCs where the exception is thrown, they are at the same version and patch level as many others that are processed just fine. Also I get exceptions much more often when I run the code on one machine versus another.
Whenever the exception is thrown, the inner exception is always empty (null), thereby leaving me with nothing more than the message about xml error. Is anyone else seeing anything like this?
Regards,
--Moby
Hi,
I am trying to download a file using the datastore browser. I have credentials to login to VCenter. So I can download the file via the datastore browser using the VCenter URL:
However, this is slow when the VCenter managing the ESX is in different location than the ESX on which that file is present. Hence I would like to download the file directly via the datastore browser using ESX URL:
The ESX is part of that VCenter. But since I don't have ESX credentials, I am unable to login to ESX. Is there a way for me to login to ESX using only VCenter credentials?
Thank you.
Hi all,
I'm tearing my hair out here. I can successfully connect to the API via SOAP using PHP and calling the "ServiceInstance" method, I can get the following:
Hi,
I have an ESX added to a VCenter.
Can I create a local user for the ESX using the Vcenter?
Thank you.
i find the sample in java,it's name is UploadGuestFile. But can't find the similar sample in C#. is any sample here for reference?
Hi ,
I am developing an app to upgrade the hard disk of a VM.
ExtendVirtualDisk_Task seems to be the API to extend the hard disk. However it is throwing the below exceptions when trying to upgrade the hard disk.
"The request refers to an unexpected or unknow type"
Please help me with the sample code or examples.
Hi,
I want to know if there is an API available (VMware vSphere Web Services API) that one can use to identify if the
1. VAAI plug-in / Hardware Acceleration is "Supported" for specific datastore
AND the
2. VASA plug-in is "Supported"/"Installed" for specific datastore/host
If there is no such API available (VMware vSphere Web Services API); then is there any configuration setting for any Managed Object that can be checked for deriving this information
Thanks in advance.
Hi,
I am trying to genreate jar file from java classes by compiling the Vsphere wsd, using the Axis2 wsdl2java utility.
Java complains that the code is tool large for method populateFaults in VimServiceStub
vim25\vim25service\VimServiceStub.java:4552: code too large
javac private void populateFaults(){
javac ^
Looks like there is a 64k limit on the method byte size code in java. This method came upto 4000 lines approximately, and it was trying to build the exception to fault map
Did anyone face this issue? I am using javac 1.6.0_14
Currently, I split this method manually, into two parts and calling them separately.
However, I can't rely on this manual intervention, and I would like to automate the whole process.
Let me know if you have any hints/ideas on how to solve this issue
Thank you
So I'm trying to use CreateVAPP to create a new barebones Vapp and I'm running into problems.
I have this call: my $vapp = $rp->CreateVApp(name => "Test_for_DR_Script", configSpec => $vAppConfig, resSpec => $resConfig);
and the configSpec: my $vAppConfig = VAppConfigSpec->new(annotation => "This is a test VApp", vmFolder => $tmpFolder);
and everytime I run it, I get:
Argument vmFolder is not valid at /usr/share/perl5/VMware/VICommon.pm line 2486
ComplexType::arg_validation('VAppConfigSpec', 'vmFolder', 'ManagedObjectReference=HASH(0x4ac8090)', 'annotation', 'This is a test VApp') called at /usr/share/perl5/VMware/VICommon.pm line 2458
ComplexType::new('VAppConfigSpec', 'annotation', 'This is a test VApp', 'vmFolder', 'ManagedObjectReference=HASH(0x4ac8090)') called at ./getVAPPInfo.pl line 154
I have run thru practically every folder I can find from the ESXi host on up to the top of the tree and all of them give me that error.
Can anyone give me some help? An example creating a VApp would be great, but short of that, explaining what folder I need would help.
Also, I am using the SDK for Perl v5.1 connecting to a vSphere Appliance v 5.0U2.
Tom
Hi,
I'm creating a simple web page with jsp and Web Services SDK for monitoring usage of resouce pools.
I'm getting usage information from ResourcePool MOR using (ResourcePool object).getRuntime().getMemory().getOverallUsage() for memory and (ResourcePool object).getRuntime().getCpu().getOverallUsage() for cpu usage.
But the values returned are not anyhow covered in vSphere Client or vSphere web client. I'm adding consumed and overhead consumed, private and shared from vSphere clients but it does not cover values taken by getOverallUsage. Can you guys tell me what exactly getOverallUsage shows and which value shows real usage? This is quite important thing, because all resource calculations and planning are based on Consumed value from vSphere clients.
To be specific, getOverallUsage returns values higher (depending on resource pool size - I mean number of VMs and child resource pools ) than consumed + overhead consumed but smaller than private + shared.
-ald017
Hello,
I am currently working on a piece of software that determines how much of different types of traffic is flowing through switches in my VM environment. I am collecting throughput information based on traffic flow on my pNics (see vSphere 5.5 Documentation Center ). I am using the throughput.usage.trafficType counters (e.g. throughput.usage.ft, etc) to gather this information.
Question: What happens if my switch isn't configured to handle a certain traffic type? Say, I don't want any FT traffic flowing through my switch. What will the value of the throughput.usage.ft counter be in that case? Just a zero? Or to be more specific, is there any way to determine, looking just at the counter value for all pNics, whether or not the switch supports a particular traffic type?
Thanks!
When you look at the datastore.siocActiveTimePercentage.average value through the vSphere Web Client you see either a 0 or a 100 for each datastore connected to a Host. When I query that same counter via the SDK, I get really odd values that don't make sense to me. The values are numbers like 333, 666, 2000, 1333, 2666, etc. Can someone please explain how I am supposed to interpret these values returned from the SDK? How do I convert that into a percentage or does the returned value mean something completely different? Thanks.
I am not sure if I missed the memo or what but it seems that in 5.1 custom fields are now read only and everything needs to be converted to tags. I am trying to figure out how to programatically interact with the tagging as we use custom fields to sync some information to and fro from our machine database. I see the property "tags" on most of the managed entities but I don't see where I can manipulate the tags (add/change/delete). All I can do is get an array of the tags currently associated with the entity.
Do I need to tweak something in my vCenter configuration to keep the custom fields in place for now and useable as they were before? The api docs all say "experimental" on that attribute and the vcTag object type.
This is a cross posting from the Orchestrator forums as I use orchestrator/javascript for everyting along with the vCenter plugin.
Paul
Hi!
So far I used the method "copyVirtualDisk_Task" of the API on an ESXi 5.1 server to copy a vmdk file on the datastore - and it worked well.
With an upgrade to version ESXi, 5.5.0, (Build 1331820) it seems that this method is not going to work any more?
On the console I get the following (translated from German):
"Copying Virtual Machine
The method is not implemented by the server."
And in the following the original message in German:
"Virtuelle Festplatte kopieren
Der angeforderte Vorgang wird vom Server nicht implementiert."
Are there any fixes or workarounds?
Thanks in advance!
Best regards,
alex
Hi
I have a virtual machine having a thin provisioned virtual disk. The disk's allocated size is 8 GB but used size is around 2 GB.
I am interested in knowing is there a why of finding out the used size of disk programmatically like we can see in the
vSphere Client GUI's datastore browser. I have already tried to query the datastore using the "HostDatastoreBrowser" but
it also returns the size of disk as 8GB. Any ideas in this direction will be appreciated. Thanks.
We are trying to use the vSphere SOAP API to gather some statistics and informations about running systems. During our development we have found so many stupid, useless, and irritating things,
that i thought to collect them here and "warn" other developers. Maybe some other could avoid making the same mistakes we did.
Don't do it. It would work, but you will get trouble to compile it. The resulting files are so huge, we was not able to compile the library in less then 4 hours, without any optimization. And the resulting binary was >50MB.
Compiling with optimization flags? No way, unless you have systems with more den 128GB of RAM
Not tested, as it first starting to complain about a missing service definition, because there is none in the WSDL file, even if they where fetched from the vSphere Server. After fixing that, the resltung files was even larger then from gSoap, so we deleted it and decided to not use any automatic generator for the C library.
The documentation is a mess. Exactly as the API definitions as a whole. So they match together, but readable is something else.
And there are some very confusing parts in the docs. For example:
The ServiceContent has an optional member: sessionManager. To retrieve these member, if it is not delivered by the api (as it is optional), we have to use the PropertyCollector. To create the matching filter we need the permission System.View - but wait! How should we get a session with the according permission if we could not get the sessionManager (to understand recursion you have to understand recursion first)? So we assume that the sessionManager is NOT optional.
So, if you have found the information you are looking for, and thought you understand what the author wanted to say: Think twice about it, sleep a night, think again and try to put some more logic in it. Don't trust the docs!
If you use the API, you should always remember: It is broken by Design.
It starts with the request headers you have to use. ALL operations have the SOAP-Action "urn:vim25/5.1" according to the vim.wsdl. Some operations need it, for other the header is ignored. I think somebody should explain the developers of the API what the header is really for: Maybe O'Reilly Unraveling the Mystery of SOAPAction - O'Reilly XML Blog ?
Also, all operations a tied to a specific type of Managed Object. In the documentation only of course! All defined operations requires the base type, Managed Object, to be set. There are no derived objects for the real types! That makes it very hard to understand the WSDL without the external documentation. Also, you may miss some errors in your code, if you assign the wrong object as _this to a operation.
The API is a piece of crap. Don't use it unless you really have to.
Hello experts,
I do have the question related to the FileOperation using the vSphere API.
Q: How can we use the InitiateFileTransferToGuest() to upload the directory ?
- Do we have to browse through the directory and get the list of the files. Then recursively call the InitiateFileTransferToGuest() and http function to upload each individual files ??/???
Is there any better way of doing it ? or API available ?
- How to handle the symbolic link files ?
Appreciate your help.
Thanks.
- Bala
hi, Everyone.
I want to make VMware Desktop Pool with making VM.
And I Know There are exist VMware Horizon view Administrator web Page. but There are may step for making the Pool.
So, I want to make a web page like VMware Horizon view Administrator.(using Java)
That page are many defalt value for making VMware Desktop Pool.
How can I make that Page? Using SDK or PowerCli?
Is there exsiting SDK or API for Horizon view Administrator?(I think SDK is for VMware Horizon view Client)
Thank you.