Quantcast
Channel: VMware Communities : All Content - vSphere Management SDK
Viewing all 1860 articles
Browse latest View live

vds lacp support via powerclie

$
0
0


hi Guys



Im trying to create a new object in order to give my vds lacp support and create lags etc via command line



Im not having any luck  - any ideas ? 



#Connect to vCenter



Write-Verbose "Connecting to vCenter"



$server = Connect-VIServer $vCenter -credential $(get-credential)



$s = Get-VDSwitch $VDS



$vds_view = get-view $s.id



$dvsconfig = New-Object VimApi_55.VMwareDVSFeatureCapability



$dvsconfig.lacpCapability = New-Object VMware.Vim.VMwareDvsLacpCapability



$dvsconfig.lacpCapability.lacpSupported = 'true'



$vds_view.UpdateDvsCapability($dvsconfig)



Thanks



[perl sdk 5.52] VILib.pm : sub add_options wrongly parses %opts [ also solution :) ]

$
0
0

So , as described upper , downloading the tar.gz version of the latest ( at the moment) Perl SDK 5.52 , when invoking


Opts::add_options(%a_hash) 
the %options are not actually updated because


if (!exists($options{$key} ) {

only checks if $options{$key} vas defined but not instantiated

so for me i had to also check for its "->" too, to not be null  ;

ManagedObjectReference to HostSystem, get Host name

$
0
0



I'm new to the vSphere Management SDK, web client and web services.  I've been playing around with some of the samples and things are staring to make some sense. 


I'd like to get a list of all Hosts and their names from vCenter.   I have some sample web client Java code that gets an array of HostSystem ManagedObjectReferences using a QuerySpec from a DataService.


I'm sure it's a simple question, but how do I get the name of the HostSystem for this ManagedObjectReference?  I don't see a HostSystem class in the com.vmware.vim25 package, but some related classes like HostSystemInfo etc.  I assumed I could cast this ref to a HostSystem class, and get the name from some member function. 


Suggestions please.

VMWare SOAP SDK - PHP - Can't get output from method

$
0
0

We would like to execute the QueryNetworkHint method in VMWARE

https://www.vmware.com/support/developer/vc-sdk/visdk41pubs/ApiReference/vim.host.NetworkSystem.html#queryNetworkHint

We do this with SOAP PHP with the VMWARE SDK.

 

 

It works to retrieve the serviceinstance, to log in, to get alle VM's, to get all ESXs,

but not to execute a specific command. And there is no detailed information how to do this.

 

 

 

This works:

 

 

            $request = new stdClass();

            $request->_this = array ('_' => 'ServiceInstance', 'type' => 'ServiceInstance');

            $response = $this->__soapCall('RetrieveServiceContent', array((array)$request));

            $ret = $response->returnval;

 

 

This works:

 

 

            $request = new stdClass();

            $request->_this = $ret->sessionManager;

            $request->userName = $this->VMUSERNAME;

            $request->password = $this->VMPASSWORD;

            $response = $this->__soapCall('Login', array((array)$request));

 

 

Then we would like to execute this commands from the wsdl:

            <element name="QueryNetworkHint" type="vim25:QueryNetworkHintRequestType"/>

            <element name="QueryNetworkHintResponse">

            <complexType>

            <sequence>

            <element name="returnval" type="vim25:PhysicalNicHintInfo" minOccurs="0" maxOccurs="unbounded"/>

            </sequence>

            </complexType>

            </element>

 

 

So I do:

 

 

            $request = new stdClass();

            $request->_this = $ret->physicalNicHintInfo;

            $response = $this->__soapCall('QueryNetworkHint', array((array)$request));

            $ret = $response->returnval;

 

 

But... then I got this error:

 

 

            The object has already been deleted or has not been completely created

 

 

Then I try with:

 

 

            $request->_this = array ('name' => 'physicalNicHintInfo', 'type' => 'physicalNicHintInfo');

 

 

or with:

 

 

            $request->_this = $ret->hostSystem;

 

 

But still seems to got problems.

 

 

If I look to the ServiceInstance output we have:

 

 

    stdClass Object

    (

    [returnval] => stdClass Object

        (

            [rootFolder] => stdClass Object

                (

                    [_] => group-d1

                    [type] => Folder

                )

 

 

            [propertyCollector] => stdClass Object

                (

                    [_] => propertyCollector

                    [type] => PropertyCollector

                )

 

 

            [viewManager] => stdClass Object

                (

                    [_] => ViewManager

                    [type] => ViewManager

                )

 

 

            [about] => stdClass Object

                (

                    [name] => VMware vCenter Server

                    [fullName] => VMware vCenter Server 5.5.0 build-1623101

                    [vendor] => VMware, Inc.

                    [version] => 5.5.0

                    [build] => 1623101

                    [localeVersion] => INTL

                    [localeBuild] => 000

                    [osType] => win32-x64

                    [productLineId] => vpx

                    [apiType] => VirtualCenter

                    [apiVersion] => 5.5

                    [instanceUuid] => 48C9BB63-****

                    [licenseProductName] => VMware VirtualCenter Server

                    [licenseProductVersion] => 5.0

                )

 

 

            [setting] => stdClass Object

                (

                    [_] => VpxSettings

                    [type] => OptionManager

                )

 

 

            [userDirectory] => stdClass Object

                (

                    [_] => UserDirectory

                    [type] => UserDirectory

                )

 

 

            [sessionManager] => stdClass Object

                (

                    [_] => SessionManager

                    [type] => SessionManager

                )

 

 

            [authorizationManager] => stdClass Object

                (

                    [_] => AuthorizationManager

                    [type] => AuthorizationManager

                )

 

 

            [serviceManager] => stdClass Object

                (

                    [_] => ServiceMgr

                    [type] => ServiceManager

                )

 

 

            [perfManager] => stdClass Object

                (

                    [_] => PerfMgr

                    [type] => PerformanceManager

                )

 

 

            [scheduledTaskManager] => stdClass Object

                (

                    [_] => ScheduledTaskManager

                    [type] => ScheduledTaskManager

                )

 

 

            [alarmManager] => stdClass Object

                (

                    [_] => AlarmManager

                    [type] => AlarmManager

                )

 

 

            [eventManager] => stdClass Object

                (

                    [_] => EventManager

                    [type] => EventManager

                )

 

 

            [taskManager] => stdClass Object

                (

                    [_] => TaskManager

                    [type] => TaskManager

                )

 

 

            [extensionManager] => stdClass Object

                (

                    [_] => ExtensionManager

                    [type] => ExtensionManager

                )

 

 

            [customizationSpecManager] => stdClass Object

                (

                    [_] => CustomizationSpecManager

                    [type] => CustomizationSpecManager

                )

 

 

            [customFieldsManager] => stdClass Object

                (

                    [_] => CustomFieldsManager

                    [type] => CustomFieldsManager

                )

 

 

            [diagnosticManager] => stdClass Object

                (

                    [_] => DiagMgr

                    [type] => DiagnosticManager

                )

 

 

            [licenseManager] => stdClass Object

                (

                    [_] => LicenseManager

                    [type] => LicenseManager

                )

 

 

            [searchIndex] => stdClass Object

                (

                    [_] => SearchIndex

                    [type] => SearchIndex

                )

 

 

            [fileManager] => stdClass Object

                (

                    [_] => FileManager

                    [type] => FileManager

                )

 

 

            [datastoreNamespaceManager] => stdClass Object

                (

                    [_] => DatastoreNamespaceManager

                    [type] => DatastoreNamespaceManager

                )

 

 

            [virtualDiskManager] => stdClass Object

                (

                    [_] => virtualDiskManager

                    [type] => VirtualDiskManager

                )

 

 

            [snmpSystem] => stdClass Object

                (

                    [_] => SnmpSystem

                    [type] => HostSnmpSystem

                )

 

 

            [vmProvisioningChecker] => stdClass Object

                (

                    [_] => ProvChecker

                    [type] => VirtualMachineProvisioningChecker

                )

 

 

            [vmCompatibilityChecker] => stdClass Object

                (

                    [_] => CompatChecker

                    [type] => VirtualMachineCompatibilityChecker

                )

 

 

            [ovfManager] => stdClass Object

                (

                    [_] => OvfManager

                    [type] => OvfManager

                )

 

 

            [ipPoolManager] => stdClass Object

                (

                    [_] => IpPoolManager

                    [type] => IpPoolManager

                )

 

 

            [dvSwitchManager] => stdClass Object

                (

                    [_] => DVSManager

                    [type] => DistributedVirtualSwitchManager

                )

 

 

            [hostProfileManager] => stdClass Object

                (

                    [_] => HostProfileManager

                    [type] => HostProfileManager

                )

 

 

            [clusterProfileManager] => stdClass Object

                (

                    [_] => ClusterProfileManager

                    [type] => ClusterProfileManager

                )

 

 

            [complianceManager] => stdClass Object

                (

                    [_] => MoComplianceManager

                    [type] => ProfileComplianceManager

                )

 

 

            [localizationManager] => stdClass Object

                (

                    [_] => LocalizationManager

                    [type] => LocalizationManager

                )

 

 

            [storageResourceManager] => stdClass Object

                (

                    [_] => StorageResourceManager

                    [type] => StorageResourceManager

                )

 

 

            [guestOperationsManager] => stdClass Object

                (

                    [_] => guestOperationsManager

                    [type] => GuestOperationsManager

                )

 

 

        )

 

 

    )

 

 

Other errors when trying which combination:

 

 

    The request refers to an unexpected or unknown type.

Dozens of VMs taking space on the SAN

$
0
0

Can anyone answer this question.

 

After Virtualizing the data center, ICT staff report that there are dozens of VMs taking space on the SAN, but do not have any I/O going to them. These VMs have not been powered on in weeks or months. What do you call for this scenario? How do you overcome it using today’s available solution?

Virtualizing the data center

$
0
0

Virtualizing the data center, ICT staff report that there are dozens of VMs taking space on the SAN, but do not have any I/O going to them. These VMs have not been powered on in weeks or months. What do you call for this scenario? How do you overcome it using today’s available solution?

How do I programmatically add a new host (ESX) to vCenter via the Web Service API?

$
0
0

I want to add a host to vCenter using the web service API.  I have found references to adding or configuring just about every other object within vCenter, except the host.

 

If anyone can point me to a reference or sample code, I would very much appreciate it.

 

Thank you.

vmware traversal spec to the guest information.

$
0
0

Hi I'm new to vmware sdk webservice programming. I'm facing the following problem. vmGuestTraversalSpec (the code in red) is not working somehow. If I comment the line in blue it works perfectly. My mob definition is as follows as in pink. Whats wrong with the code, I can follow different approach but still curious to know why it is not working and throwing some property fault. Logically speaking it must work. Please help.

 

          TraversalSpec vmGuestTraversalSpec = new TraversalSpec();

        vmGuestTraversalSpec.setName("vmGuestTraversalSpec");

        vmGuestTraversalSpec.setType("VirtualMachine");

        vmGuestTraversalSpec.setPath("guest");

        vmGuestTraversalSpec.setSkip(Boolean.FALSE);

       

        TraversalSpec networkVMTraversalSpec = new TraversalSpec();

        networkVMTraversalSpec.setName("networkVMTraversalSpec");

        networkVMTraversalSpec.setType("Network");

        networkVMTraversalSpec.setPath("vm");

        networkVMTraversalSpec.setSkip(Boolean.FALSE);

        networkVMTraversalSpec.getSelectSet().add(vmGuestTraversalSpec);

       

        TraversalSpec datacenterNetworkTraversalSpec = new TraversalSpec();

        datacenterNetworkTraversalSpec.setName("datacenterNetworkTraversalSpec");

        datacenterNetworkTraversalSpec.setType("Datacenter");

        datacenterNetworkTraversalSpec.setPath("networkFolder");

        datacenterNetworkTraversalSpec.setSkip(Boolean.FALSE);

        SelectionSpec networkSpec = new SelectionSpec();

        networkSpec.setName("folderTraversalSpec");

        datacenterNetworkTraversalSpec.getSelectSet().add(networkSpec);

        datacenterNetworkTraversalSpec.getSelectSet().add(networkVMTraversalSpec);

 

vm      ManagedObjectReference:VirtualMachine[]          vm1,vm2...etc...


client.FindEntityViews(typeof(HostSystem)...... SLOW take over 20 minutes to retreive 50+ Host... Faster Ways...?

$
0
0

Hi,

     I have an app that i use to create some report from data I grab on each host connected to the VCs....

 

So when I connect I create an List of host using something like  :

 

List<EntityViewBase> hostslist = new List<EntityViewBase>();

hostslist = client.FindEntityViews(typeof(HostSystem), null, null, null ) ;

 

So for a VC where there is only 1 to 5 host this does not take to long to create that list....

 

But I have a VC with 100+ hosts and it took like 25 minutes to just create the list and continue after,....

 

Is there a way to speed up the host listing ?

 

Thanks for any help in advance,,, and will award the point for any helpful answers.

 

Jon

client.FindEntityViews(typeof(HostSystem)...... SLOW take over 20 minutes to retreive 50+ Host... Faster Ways...?

$
0
0

Hi,

     I have an app that i use to create some report from data I grab on each host connected to the VCs....

 

So when I connect I create an List of host using something like  :

 

List<EntityViewBase> hostslist = new List<EntityViewBase>();

hostslist = client.FindEntityViews(typeof(HostSystem), null, null, null ) ;

 

So for a VC where there is only 1 to 5 host this does not take to long to create that list....

 

But I have a VC with 100+ hosts and it took like 25 minutes to just create the list and continue after,....

 

Is there a way to speed up the host listing ?

 

Thanks for any help in advance,,, and will award the point for any helpful answers.

 

Jon

About custom privilege and role

$
0
0

Hi All,

 

I want to creat a new privilege and role for my extension. Now I use this code to set privilege info on my extension,

 

PrivilegeInfo myPriv = new ExtensionImpl.PrivilegeInfoImpl();

myPriv.setPrivGroupName("MyPrivilege");

myPriv.setPrivID("Login");

extension.setPrivilegeList(new Extension.PrivilegeInfo[] {myPriv});

 

And create a role with below code,

 

authorizationManager.addRole("myRole", new String[]{"MyPrivilege.Login"});


But It always throws an Exception with message 'A specified parameter was not correct. privIds'.  It seems that this API cannot accept customized privilege.

 

So how should I do this?

 

Regards,

Selina

Non-extension user session cannot create a VDS with Capability.DvsOperationSupported is false

$
0
0

Hi,

 

I am facing this issue when I tried to add a distributed port group to Cisco Nexus 1000V. I dont have any issues when i do the same for Vmware distributed switch.

I tried invoking updateDvsCapability with the required parameters updated but still I am facing the same issue.

 

Even through vSphere client the options "Edit Settings", "New and Manage Port group" options are disabled. I could not find a way to modify the parameters of Cisco switch through Sdk or through client.

 

Please do let me know how to update the parameters for adding the distributed port group and to get rid of above issue.

Support for TLS 1.2 SSL protocol in vCenter server 5.5?

$
0
0



Hello,


        hopefully this is correct forum to ask this question, if not, please advise.


        does any version of vCenter 5.5 support the TLS 1.2  SSL protocol when connecting using web services SDK?  In testing, our client offers TLS1.2 and the server uses one of the cipher suites proposed by the client in the hello message, but the server hello message responds with supported protocol of TLS v1.


Here is the handshake:

      

      • ClientHello, TLSv1.2 ...


     main, READ: TLSv1 Handshake, length = 49

      

      • ServerHello, TLSv1

     RandomCookie:  GMT: 1414970441 bytes = { 20, 240, 95, 152, 93, 203, 167, 125, 147, 68, 151, 250, 249, 138, 216, 111, 5, 57, 106, 191, 158, 124, 195, 117, 172, 238, 51, 31 }

     Session ID:  {}

     Cipher Suite: SSL_RSA_WITH_AES_128_CBC_SHA

     Compression Method: 0

vmsdk Java - How to get ManagedObjectReference from user configured VM name

$
0
0



Hi All,


I am writing sample code in java using vmsdk in which i am implementing following functionalities


1. Get user configured VM names as input.


2. Construct createListView() with the user provided VM names to get the metrics


But i am not able to easily figure it out, how to get the ManagedObjectReference from VM name like done in perl

        "my $entity = Vim::find_entity_view( view_type=&gt;'VirtualMachine', filter =&gt; { name=&gt; $vm } );"



any find_entity_view() equivalent method in Java ?


can someday help me in identifying the proper API or proper way to get the metrics data for set of given VM's alone ?


Thanks,


Pluto.


 

Unrecognized version URI "urn:vim25/test"; using default handler for "urn:vim25/5.5"

$
0
0

We are trying to create a new virtual machine using vmware api. The system logs (/var/log/hostd.log) shows the following error:

 

2014-11-04T09:12:12.609Z [28580B70 verbose 'Cimsvc'] Ticket issued for CIMOM version 1.0, user root

2014-11-04T09:12:15.942Z [269C2B70 error 'SoapAdapter.HTTPService'] Failed to read request; stream: <io_obj p:0x27149470

, h:-1, <TCP '0.0.0.0:0'>, <TCP '0.0.0.0:0'>>, error: N7Vmacore16TimeoutExceptionE(Operation timed out)

2014-11-04T09:12:15.998Z [28580B70 verbose 'SoapAdapter'] Unrecognized version URI "urn:vim25/test"; using default

handler for "urn:vim25/5.5"

pam_per_user: create_subrequest_handle(): doing map lookup for user "cubit"

pam_per_user: create_subrequest_handle(): creating new subrequest (user="cubit", service="system-auth-generic")

Accepted password for user cubit from 10.2.46.4

2014-11-04T09:12:16.078Z [253C2B70 info 'Vimsvc.ha-eventmgr' opID=hostd-abd2] Event 37606 : User cubit@10.2.46.4 logged

in as VI Perl

2014-11-04T09:12:16.103Z [25381B70 info 'Vimsvc.TaskManager' opID=hostd-459b user=cubit] Task Created : haTask--vim.

SearchIndex.findByInventoryPath-89996897

2014-11-04T09:12:16.104Z [25381B70 verbose 'Solo.SearchIndex' opID=hostd-459b user=cubit] FindByInventoryPath:

inventoryPath = ha-datacenter

2014-11-04T09:12:16.104Z [25381B70 verbose 'Solo.SearchIndex' opID=hostd-459b user=cubit] GetMatchingChild: node = <null

>, childName = ha-datacenter

2014-11-04T09:12:16.104Z [25381B70 verbose 'Solo.SearchIndex' opID=hostd-459b user=cubit] RefToNamedManagedEntity: ref =

vim.Datacenter:ha-datacenter, name = ha-datacenter

2014-11-04T09:12:16.104Z [25381B70 verbose 'Solo.SearchIndex' opID=hostd-459b user=cubit] RefNamedManagedEntity: result

= vim.Datacenter:ha-datacenter

2014-11-04T09:12:16.104Z [25381B70 verbose 'Solo.SearchIndex' opID=hostd-459b user=cubit] GetMatchingChild: returning

child = [N4Solo17HaFixedDatacenterE:0x1f47865c]

2014-11-04T09:12:16.104Z [25381B70 verbose 'Solo.SearchIndex' opID=hostd-459b user=cubit] FindByInventoryPath returning

vim.Datacenter:ha-datacenter

2014-11-04T09:12:16.104Z [25381B70 info 'Vimsvc.TaskManager' opID=hostd-459b user=cubit] Task Completed : haTask--vim.

SearchIndex.findByInventoryPath-89996897 Status success

2014-11-04T09:12:16.106Z [28580B70 verbose 'DatastoreBrowser' opID=hostd-50e2 user=cubit] 4f58eb42-6cf1e6bc-2855-

3cd92b09c6ba-datastorebrowser::Search Path = [datastore1] Spec = (vim.host.DatastoreBrowser.SearchSpec) {

--> dynamicType = <unset>,

--> query = (vim.host.DatastoreBrowser.Query) [

--> (vim.host.DatastoreBrowser.FolderQuery) {

--> dynamicType = <unset>,

--> },

--> (vim.host.DatastoreBrowser.Query) {

--> dynamicType = <unset>,

--> }

--> ],

--> details = (vim.host.DatastoreBrowser.FileInfo.Details) {

--> dynamicType = <unset>,

--> fileType = true,

--> fileSize = false,

--> modification = false,

--> fileOwner = false,

--> },

--> searchCaseInsensitive = <unset>,

--> matchPattern = (string) [

--> "cu003\.f\.maa\.collab\.net"

--> ],

--> sortFoldersFirst = <unset>,

--> }

2014-11-04T09:12:16.107Z [28580B70 info 'DatastoreBrowser' opID=hostd-50e2 user=cubit] 4f58eb42-6cf1e6bc-2855-

3cd92b09c6ba-datastorebrowser::SearchInt

2014-11-04T09:12:16.107Z [28580B70 verbose 'DatastoreBrowser' opID=hostd-50e2 user=cubit] 4f58eb42-6cf1e6bc-2855-

3cd92b09c6ba-datastorebrowser::GetLocalpathFromDatastorepath

2014-11-04T09:12:16.107Z [28580B70 verbose 'DatastoreBrowser' opID=hostd-50e2 user=cubit] 4f58eb42-6cf1e6bc-2855-

3cd92b09c6ba-datastorebrowser::Verify

2014-11-04T09:12:16.111Z [269C2B70 verbose 'HTTP server /folder'] Sent NotFound response for GET /folder/cu003.f.maa.

collab.net?dsName=datastore1

2014-11-04T09:12:16.119Z [250CBB70 verbose 'Default' opID=C05D9B40-0000080C user=root] AdapterServer: target='vmodl.

query.PropertyCollector:ha-property-collector', method='waitForUpdates'

2014-11-04T09:12:16.149Z [253C2B70 verbose 'SoapAdapter'] Unrecognized version URI "urn:vim25/test"; using default

handler for "urn:vim25/5.5"

2014-11-04T09:12:16.150Z [25381B70 verbose 'Default' opID=D983AFC3-000003E2 user=root] AdapterServer: target='vmodl.

query.PropertyCollector:ha-property-collector', method='waitForUpdates'

2014-11-04T09:12:16.150Z [28580B70 verbose 'Default' opID=hostd-fb4f user=cubit] CloseSession called for session id=

e58547b6-0e56-252d-8fe1-955c4e7cdb60

2014-11-04T09:12:16.150Z [28580B70 info 'Vimsvc.ha-eventmgr' opID=hostd-fb4f user=cubit] Event 37607 : User cubit@10.2.

46.4 logged out (login time: Tuesday, 04 November, 2014 09:11:26, number of API invocations: 0, user agent: VI Perl)

2014-11-04T09:12:16.711Z [28580B70 verbose 'SoapAdapter'] Unrecognized version URI "urn:vim25/test"; using default

handler for "urn:vim25/5.5"

 

 

We already raised with the vmware support team.. here is the email discussion:

 

Hello Rengarajan,

 

 

As discussed, since SDK entitlement is not part your account you can post this issue on our communities link.

 

 

I will proceed with archiving the SR if you have no further questions.

 

 

Thank you for choosing VMware Products.

 

 

 

 

On 05/11/2014, "VMware Technical Support" <webform@vmware.com> <webform@vmware.com> wrote:

> ** Please do not change the subject line of this email if you wish to

> respond. **

>

> Hello Rengarajan,

>

> My name is Kishore Kumar J and I am taking ownership of the Support

> Request#14550657711. 

>

> I understand from your case description that you are getting an error when

> trying to execute a script on vCLI. Correct me if I am wrong.

>

> Please note that for assistance with vCLI scripts you need to speak to our

> SDK support team. SDK support is available if you have SDK entitlement on

> your account.

>

> kindly refer the below URL for details on SDK Support.

>

> https://www.vmware.com/support/sdk.html

>

> https://www.vmware.com/support/services/sdk/sdk-overview.html

>

> You can validate if your account has SDK entitlement by speaking with our

> customer service team@1-877-486-9273.

>

> Let me know if you have any questions.

>

> Regards,

> Kishore kumar J

> ITIL V3 Foundations | CCNA | VCP5

> Technical Support Engineer

> Global Support Services, VMware Inc.

> 1-877-4-VMWARE (1-877-486-9273)

> Office Hours: Monday-Friday 09:00AM – 06:00PM IST.

> Review your Support Requests Online: http://support.vmware.com/selfsupport/

> Existing Service Request: 1-877-4-VMWARE (1-877-486-9273), Option 4 for

> Support, Option 2

> Satisfied customers are our top priority. Please contact my manager, Neha

> Jain: njain@vmware.com , if you would like to provide feedback on your

> support experience.

> Please visit us at: http://www.vmware.com/support/

> VMware Knowledge Base: http://www.vmware.com/r/knowledgebase.html

> VMware Documentation: http://www.vmware.com/support/pubs/

> ref:_00D409hQR._50080cJpMv:ref

>

 

 

 

 

On 04/11/2014, VMware Technical Support <webform@vmware.com> wrote:

> ** This is a post-only email. Please do not reply. **

> Dear Rengarajan Govindan,

>

> Thank you for requesting support from VMware.

> Your Support Request Number is 14550657711

> Commit Time: 2014-11-05 17:12 IST

> Severity of Support Request: 3 - Medium

> If you have not had the opportunity to upload log files related to the

> problem you are experiencing please do so now. This will expedite the

> resolution of your problem. Our knowledge article explains the steps to

> collect and upload log files; http://kb.vmware.com/kb/1008524

> A copy of your Support Request is included at the end of this message.

> You may review the status of your Support Request at anytime by accessing:

> http://www.vmware.com/support/sr/sr_history.jsp

>

> We also offer several Web-based resources to assist our customers in finding

> answers to their questions quickly. Many issues reported by users are

> addressed and posted in our knowledgebase which you can access at:

> http://www.vmware.com/support/kb/enduser/std_alp.php

> Submit Support Requests and Receive Troubleshooting Alerts with vSphere Web

> Client.

>

> You can open support requests, update existing support requests, and

> identify issues in your vSphere environment before outages occur – all

> through your vSphere Web Client. Use vCenter Support Assistant, a free

> vCenter plug-in, to shorten the time needed to submit support requests,

> collect and upload diagnostic support data, and troubleshoot technical

> issues. Support Assistant allows you to open and manage support requests

> directly in the vSphere Web Client. It also automates the process of

> collecting and uploading ESXi and vCenter Server log files and matches this

> data to a continuously updated list of known customer issues to provide you

> with proactive alerts and recommended fixes. To save time and improve your

> support experience, download Support Assistant for free today!

>

> Download here:

> http://www.vmware.com/go/download-vcenter-support-assistant

>

> Learn more here:

> https://www.vmware.com/products/vcenter-support-assistant/overview.html

>

> In addition, VMTN discussion forums are available at:

> http://www.vmware.com/community/index.jspa for the VMware user community to

> share work-arounds, fixes, technical tips, and other valuable information

> about using our products.

> Based on the support contract you purchased with your VMware software, you

> are entitled to Basic Support Agreement.

> We will review your Support Request and respond appropriately based on the

> severity of your issue in accordance with our response policy at:

> http://www.vmware.com/support/policies/response.html

> Thank you for using VMware software.

> Sincerely,

> VMware Customer Service

> ref:_00D409hQR._50080cJpMv:ref

>

> You filed the following Support Request:

> Customer Email: rengarajan@collab.net

> Phone: 914442203763

> Contact: Rengarajan Govindan

> Entitlement: Basic Support Agreement

> Region: APJ

> Commit Time: 2014-11-05 17:12 IST

> Severity of Support Request: 3 - Medium

> Description of Support Request: Team,

>

> We are using vmware vsphere cli (5.5/5.5u1)to build boxes in ESXI (5.5 u1).

> ERROR: EsxGuest.status

> SOAP request error - possibly a

>  protocol issue: <?xml version="1.0" encoding="UTF-8"?>

> <soapenv:Envelope xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"

>  xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"

>  xmlns:xsd="http://www.w3.org/2001/XMLSchema"

>  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

> <soapenv:Body>

> <RetrievePropertiesResponse xmlns="urn:vim25"><returnval><obj

> type="VirtualMachine">1697</obj><propSet><name>summary.

> config.vmPathName</name><val xsi

> :type="xsd:string">[datastore1]

> cu117.cloud.maa.collab.net/cu117.cloud.maa.collab.net.vmx</val></propSet></returnval><

> returnval><obj type="VirtualMac

> hine">1701</obj><propSet><name>summary.config.vmPathName</name><val

> xsi:type="xsd:string">[datastore1] cu171.cloud.maa.

> collab.net/cu171.cloud.maa.col

> lab.net.vmx</val></propSet></returnval><returnval><obj

> type="VirtualMachine">1854</obj><propSet><name>summary.config.

> vmPa

> Nov 04 02:54:31 [16973] ERROR: VmfsDir.exists failed to verify existence of

> directory '[datastore1] cu003.f.maa.collab.

> net'

> Nov 04 02:59:12 [16973] ERROR: EsxGuest.create_new_disk Unable to create

> disk [datastore1] cu003.f.maa.collab.net/cu003.

> f.maa.collab.net.vmdk: Unable

>  to create virtual disk : SOAP request error - possibly a protocol issue:

> <?xml version="1.0" encoding="UTF-8"?>

> <soapenv:Envelope xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"

>  xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"

>  xmlns:xsd="http://www.w3.org/2001/XMLSchema"

>  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

> <soapenv:Body>

> <RetrievePropertiesResponse xmlns="urn:vim25"><returnval><obj

> type="Task">haTask--vim.VirtualDiskManager.

> createVirtualDisk-90007550</obj><propSet><name>availableField</name><val

> xsi:type="ArrayOfCustomFieldDef"></val></

> propSet><propSet><name>info</name><val

> xsi:type="TaskInfo"><key>haTask--vim.VirtualDiskManager.createVirtualDisk-

> 90007550</key><task

> type="Task">haTask--vim.VirtualDiskManager.createVirtualDisk-90007550</task><name>

> CreateVirtualDisk_Task</name><descriptionId>VirtualDiskManager.createVirtualDisk</descriptionId><state>running</state><

> cancelled>false

> Date Entered: 11/4/2014

> Support Request ID: 14550657711

> Preferred Contact Method: Email

>

 

 

 

 

 

 

Can someone please help. Thanks in advance..


Clone template, change portgroup

$
0
0

Hi all,


i´m trying to clone templates with c# using the Vmware Sdk (vim.vmware). Actually, i'm able to clone, config virtual machine even do the sysprep part (join domain, change hostname, etc).


For the network customization part i'm using:

 

    spec.Customization = new CustomizationSpec();

    spec.Customization.GlobalIPSettings = new CustomizationGlobalIPSettings();

    spec.Customization.NicSettingMap = new CustomizationAdapterMapping[1];

    spec.Customization.NicSettingMap[0] = new CustomizationAdapterMapping();

 

 

    spec.Customization.GlobalIPSettings = new CustomizationGlobalIPSettings();

    spec.Customization.GlobalIPSettings.DnsServerList = T.Dns;

 

 

    VirtualDevice NetDevice = new VirtualDevice();

    foreach (VirtualDevice dev in T.Vm.Config.Hardware.Device)

    {

         if (dev.DeviceInfo.Label.Contains("Network"))

         {

              NetDevice = dev;

         }

    }

 

 

    VirtualDeviceConfigSpec[] DevSpec = new VirtualDeviceConfigSpec[0];

    spec.Config.DeviceChange = new VirtualDeviceConfigSpec[1];

    spec.Config.DeviceChange[0] = new VirtualDeviceConfigSpec();

    spec.Config.DeviceChange[0].Operation = VirtualDeviceConfigSpecOperation.edit;

    spec.Config.DeviceChange[0].Device = NetDevice;

 

 

    CustomizationFixedIp Nic0IpAdd = new CustomizationFixedIp();

    Nic0IpAdd.IpAddress = T.Ip;

    spec.Customization.NicSettingMap[0].Adapter = new CustomizationIPSettings();

    spec.Customization.NicSettingMap[0].Adapter.Ip = Nic0IpAdd;

    spec.Customization.NicSettingMap[0].Adapter.SubnetMask = T.Netmask;

    spec.Customization.NicSettingMap[0].Adapter.Gateway = T.Gateway;


T is an object with all the needed params (Ip, netmask, vm to clone...).


At this point, i need to map the adapter to the right standard switch and portgroup (no distribuited switch).

 

I did some test with VirtualEthernetCardNetworkBackingInfo with no luck at all


Anybody can point me in the right direction or give a hint?


Thanks!

Session ID expiration / timeout

$
0
0

We are working on a management application, which requires storing and passing around the Session ID ( in a safe and careful way, of course).  Session ID is essentially a cookie returned by the login, which can be used subsequently until some of the users logs out.  There is an example of its generation and usage in Steve Jin's book (e.g p.509), and in his code samples for VIJava (in com.vmware.vim25mo.samples.session.SessionConsumer/SessionProducer).  All this is fine and good, BUT:

 

Steve's book says that the Session ID doesn't expire and / or timeout.  This is not what I'm seeing - apparently it does.  Moreover, a couple of VMWare KB articles (e.g. 2015135 and 2040626) discuss ways to increase or disable timeout period for a Web Client session and vCenter Operations UI sessions. 


Now, I'm not sure I want to disable the timeout for any Web Client session, just for the SDK.  Is that possible?  Or is my only option to have a thread "ping" the vCenter with some innocuous request now and then?  Would that "pinging" help me for my task, or the session would expire anyway?

 

Thanks,

 

--Anatol

Unable to connect to vSphere from my application server

$
0
0



Hi


Below code is working find if i run it from my development environment.


but getting error "No trusted certificate found" when i deploy in application server(JBOSS) please find the below logs for more information


import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.HttpsURLConnection;
import javax.net.ssl.SSLSession;
import javax.net.ssl.X509TrustManager;
import javax.xml.ws.BindingProvider;

import com.vmware.vim25.ManagedObjectReference;
import com.vmware.vim25.ServiceContent;
import com.vmware.vim25.UserSession;
import com.vmware.vim25.VimPortType;
import com.vmware.vim25.VimService;

public class test {

   public void testFun() {
      // TODO Auto-generated method stub
      String host = "hostIP";
      String user = "root";
      String password = "root";
      final String url = "https://" + host + "/sdk/vimService";
      try {
         HostnameVerifier hv = new HostnameVerifier() {
            public boolean verify(String hostname, SSLSession session) {

               return true;
            }
         };
         final javax.net.ssl.TrustManager[] trustAllCerts = new javax.net.ssl.TrustManager[1];
         final javax.net.ssl.TrustManager tm = new X509TrustManager() {
            public java.security.cert.X509Certificate[] getAcceptedIssuers() {return null; }
            public boolean isServerTrusted(java.security.cert.X509Certificate[] certs) {return true; }
            public boolean isClientTrusted(java.security.cert.X509Certificate[] certs) {return true; }
            public void checkServerTrusted(java.security.cert.X509Certificate[] certs, String authType) throws java.security.cert.CertificateException {}
            public void checkClientTrusted(java.security.cert.X509Certificate[] certs, String authType) throws java.security.cert.CertificateException { }
            };
            
         trustAllCerts[0] = tm;
         final javax.net.ssl.SSLContext sc = javax.net.ssl.SSLContext.getInstance("SSL");
         final javax.net.ssl.SSLSessionContext sslsc = sc.getServerSessionContext();
         sslsc.setSessionTimeout(0);
         sc.init(null, trustAllCerts, null);
         javax.net.ssl.HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());
         HttpsURLConnection.setDefaultHostnameVerifier(hv);
         
         final VimService vimService = new VimService();
         VimPortType vimPort = vimService.getVimPort();
         Map<String, Object> ctxt = ((BindingProvider) vimPort).getRequestContext();
         ctxt.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, url);
         ctxt.put(BindingProvider.SESSION_MAINTAIN_PROPERTY, true);
         System.setProperty("org.jboss.security.ignoreHttpsHost", "true");
         
         ManagedObjectReference ref = new ManagedObjectReference();
         ref.setType("ServiceInstance");
         ref.setValue("ServiceInstance");
         ServiceContent serviceContent = vimPort.retrieveServiceContent(ref);
         UserSession userSession = vimPort.login(serviceContent.getSessionManager(), user, password, null);
         System.out.println(serviceContent.getRootFolder().getType());
      }
      catch (Exception e) {
         // TODO Auto-generated catch block
         e.printStackTrace();
      }
   }
}


Error message:


Caused by: java.io.IOException: Could not transmit message
        at org.jboss.ws.core.client.HTTPRemotingConnection.invoke(HTTPRemotingConnection.java:265)
        at org.jboss.ws.core.client.SOAPProtocolConnectionHTTP.invoke(SOAPProtocolConnectionHTTP.java:71)
        at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:340)
        at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:290)
        ... 50 more
Caused by: org.jboss.remoting.CannotConnectException: Can not connect http client invoker. sun.security.validator.ValidatorException: No trusted certificate found.
        at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:348)
        at org.jboss.remoting.transport.http.HTTPClientInvoker.transport(HTTPClientInvoker.java:137)
        at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:122)
        at org.jboss.remoting.Client.invoke(Client.java:1634)
        at org.jboss.remoting.Client.invoke(Client.java:548)
        at org.jboss.ws.core.client.HTTPRemotingConnection.invoke(HTTPRemotingConnection.java:243)
        ... 53 more
Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: No trusted certificate found
        at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source)
        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(Unknown Source)
        at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source)
        at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source)
        at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(Unknown Source)
        at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(Unknown Source)
        at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Unknown Source)
        at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Unknown Source)
        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source)
        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source)
        at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source)
        at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
        at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown Source)
        at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(Unknown Source)
        at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:277)
        ... 58 more
Caused by: sun.security.validator.ValidatorException: No trusted certificate found
        at sun.security.validator.SimpleValidator.buildTrustedChain(Unknown Source)
        at sun.security.validator.SimpleValidator.engineValidate(Unknown Source)
        at sun.security.validator.Validator.validate(Unknown Source)
        at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.validate(Unknown Source)
        at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)
        at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)
        ... 71 more


Could you please help me to resolve this issure..


thank in advance

VIJava and Single Sign On (SSO) SAML token

$
0
0

I understand that the VIJava 5.5 doesn't have support for Single Sign On.  Steve Jin had a post on his blog about 2 years ago, which said that he might include the single sign on functionality into VIJava API, but apparently he didn't have time for that.

 

Barring that, does anyone have any pointers / samples / ideas as to how to use the SAML tokens in vVIJava.  In particular, would it be possible to establish a VI SDK session using SAML token, then extract the sessionString (HTTP token) from it, and clone the session (so as not to be dependent on the possible termination of the SSO   session, and control the cloned session independently).  Then we could use the great VIJava functionality with that session.

 

Thanks a lot,

 

--Anatol

Login to host Web Services API with vCenter Ticket?

$
0
0

Our team has successfully created a C++ application that connects to an ESXi host Web Services API using a valid ESXi host username/password and then can perform all sorts requests and get responses.  We now want to be able to do this same this, but using the Ticket retrieved from vCenter using the AcquireCimServicesTicket.  I realize this method says it is only for CIM, but I was hoping it could be made to work for the Web Services Login with the LoginRequestType. For CIM access, the SessionID returned in the ticket is used as the username/password when connecting to the CIMOM.  However, when I tried it, I get an error saying invalid username or password.

 

If using that ticket just won't work, is there some other credential that can be retrieved from vCenter to access the ESXi host Web Services without requiring use of an ESXi host username/password.  Or, are we stuck doing all of our requests through vCenter?

Viewing all 1860 articles
Browse latest View live


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