Quantcast
Channel: VMware Communities : Discussion List - vSphere Client SDK
Viewing all 2218 articles
Browse latest View live

Registering plugin for vsphere html client 6.7

$
0
0

Hi,

 

Can you please suggest what is the best way to register the plugin for html client 6.7.

We have tried using the extension-registration cli commands.

We have developed UI tool as well to register the plugin.

 

In both cases, we need to restart the vsphere-ui services after we register. Is it mandatory to restart the ui services after registering/unregistering the plugin.


Performance manager query (QueryPerf) not returning performance counter values

$
0
0

We have a single vcenter out of a larger set that is not returning any performance counter values for any of its virtual machines.  There are VMs on the vcenter that do have the proper tools installed that should allow us to get this information.  We do not receive any errors when trying to make the query, but nothing is returned - when logging into the vcenter web client, we can see up-to-date performance data for these VMs.

 

    def get_test_data():

        global perf_counter_id_to_obj, perf_metrics_id_objects

 

 

        counter_ids = [2, 3, 4, 24, 25, 26, 125, 126, 127, 143, 144, 145]

 

 

        perf_metrics_id_objects = [factory.PerfMetricId(counterId=id,

                                                        instance="*")

                                   for id in counter_ids]

 

 

        start_time = datetime.now() - timedelta(minutes=5)

        end_time = datetime.now()

 

 

        logger.info("Finding vm by uuid")

        vm_found_with_uuid = client.service.FindByUuid(service_content.searchIndex,

                                                       datacenter=None,

                                                       uuid=<uuid>,

                                                       vmSearch=True,

                                                       instanceUuid=True)

        logger.info(f"VM found with uuid: {vm_found_with_uuid}")

 

 

 

 

 

        logger.info(f"Getting query spec for {vm_found_with_uuid}")

        perf_query_list = factory.PerfQuerySpec(maxSample=1,

                                                entity=vm_found_with_uuid,

                                                intervalId=300,

                                                startTime=start_time,

                                                endTime=end_time,

                                                format='csv',

                                                metricId=perf_metrics_id_objects)

        logger.info(f"Query spec for {vm_found_with_uuid}: {perf_query_list}")

 

 

        perf_query_props = client.service.QueryPerf(service_content.perfManager, [perf_query_list])

        logger.info(f"Perf query props (results) are: {perf_query_props}")

References to "factory" and "client" are how we interact with a SOAP API (given a wsdl file) using the python package `zeep`.

 

This code returns values in the variable perf_query_props for all of our other vcenters.  We have found that when only passing the "entity" parameter into QueryPerf, we receive daily performance data for each day over the past year (ending two days before the current date).  Furthermore, when we pass "entity" and "intervalId=20", we get up-to-date raw streaming data.  Why can't we get 5 minute intervals?

Adding a top-level tab to cluster object type (HTML5 based vSphere Client plugin)

$
0
0

Is it possible to add a top-level tab for my own plugin on object type like cluster, host etc.?

 

The Developer guide has reference to adding extension point under Configure and Monitor tab view, but I would like to know if there is a way for third party plugin(html5) to add its own tab at the top-level?

vSphere hybrid plugin collisions

$
0
0

Hi,

 

We have developed a hybrid (flex/html) plugin that has been working for use for some time when we deploy the plugin in vSphere Web Client (6.0 and 6.5) as well as the vSphere Client (6.5).  As we continue to migrate our functionality from Flex to HTML, we have some HTML dialogs that haven't quite reached parity with our Flex dialog and therefore would like to continue to use the Flex dialog for the Flex Web Client and start to use the HTML dialog in the HTML client. 

 

Looking at the documentation, it seems like some of the views may support an "html" suffix (<namespace>.summarySectionViews.html) which I assume means that it will only be displayed in the HTML client.

 

We are wondering if there is a way to control whether or not other UI elements are displayed in the Flex Web Client vs. the HTML Client?  Our current issue is with a global action for a custom object.  Is there any metadata condition to have actions only display in HTML?  We are defining an ActionSpec to open the Flex dialog and we've added a new ActionSpec for the HTML dialog however we're seeing collisions and/or duplicate actions rendered.

 

I'm sure that we'll be running into other collisions and may soon need to produce two different plugins, however we are hoping to get a little more mileage out of the single plugin approach.

 

Thank you,

Jesse

How to Externalize Grid Value Data in XML?

$
0
0

Hi,

Recently I am working on Globalization of Vmware Plugin where we need to externalize the strings(Getting the hard coded strings from the properties files.). Some Grid column values are called from plugin.xml file.

XML File.PNG

<com.vmware.ui.lists.ColumnContainer>

               <uid>com.xxx.mUI.Address.column.name</uid>

               <dataInfo>

                  <com.vmware.lists.ColumnDataSourceInfo>

                     <headerText>#{Address.name}</headerText>--- {Here i externalize the hard coded string from properties file,Like "Address.name" is the key name which is stored in                                                                                                   .properties files and based on the key name the string which is stored will call from the properties file}

                     <requestedProperties>

                        <String>applyaddressUpdate</String>--{ The column values get called from this tag where i am unable to externalize bzc of random values getting called from this tag}

                     </requestedProperties>

                     <sortProperty>applyaddressUpdate</sortProperty>

                     <exportProperty>applyaddressUpdate</exportProperty>

                  </com.vmware.ui.lists.ColumnDataSourceInfo>

               </dataInfo>

   </com.vmware.ui.lists.ColumnContainer>

 

 

I am able to externalize the column header strings but not able to externalize the column data rows.

 

Is there any way to externalize those strings?

ModuleNotFoundError: No module named 'vmware'

$
0
0

Hi,

i tested this code ;

 

import requests

import urllib3

 

from vmware.vapi.vsphere.client import create_vsphere_client

session = requests.session()

 

# Disable cert verification for demo purpose.
# This is not recommended in a production environment.
session.verify = False

# Disable the secure connection warning for demo purpose.
# This is not recommended in a production environment.
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)

 

# Connect to a vCenter Server using username and password
vsphere_client = create_vsphere_client(server='10.10.10.200', username='root', password='password', session=session)

 

# List all VMs inside the vCenter Server
vsphere_client.vcenter.VM.list()

 

error: ModuleNotFoundError: No module named 'vmware'

 

Please how fix this error ?

java.net.UnknownHostException: vcsa.vmware.com with a 6.7 deployment

$
0
0

We're attempting to migrate our vSphere client extension to run on version 6.7.  Today I noticed that our virgo log is full of this type of stacktrace and was wondering if anybody has a solution for this?

 

Thank you,

Jesse

 

 

[2018-09-14T20:01:50.222Z] [WARN ] aggregation-workerthread-2    com.vmware.ph.upload.service.UploadServiceImpl                    Failed to get upload details from VMware server during attempt 1 of 3; Reason: java.net.UnknownHostException: vcsa.vmware.com.

For now there are no consequences - I'll try again.

[2018-09-14T20:01:50.233Z] [WARN ] aggregation-workerthread-2    com.vmware.ph.upload.service.UploadServiceImpl                    Failed to get upload details from VMware server during attempt 2 of 3; Reason: java.net.UnknownHostException: vcsa.vmware.com.

For now there are no consequences - I'll try again.

[2018-09-14T20:01:50.244Z] [WARN ] aggregation-workerthread-2    com.vmware.ph.upload.service.UploadServiceImpl                    Failed to get upload details from VMware server during attempt 3 of 3; Reason: java.net.UnknownHostException: vcsa.vmware.com.

For now there are no consequences - I'll try again.

[2018-09-14T20:01:50.245Z] [ERROR] aggregation-workerthread-2    com.vmware.ph.upload.service.UploadServiceImpl                    Failed 3 of 3 attempts to get upload details from VMware server. The reason for the last failure was (enable 'debug' level logging to see the stack trace for every failed attempt): java.net.UnknownHostException: vcsa.vmware.com. com.vmware.ph.upload.exception.ConnectionException: java.net.UnknownHostException: vcsa.vmware.com

at com.vmware.ph.upload.rest.PhRestClientImpl.sendUploadRequest(PhRestClientImpl.java:212)

at com.vmware.ph.upload.service.UploadServiceImpl$4.call(UploadServiceImpl.java:239)

at com.vmware.ph.upload.service.UploadServiceImpl$4.call(UploadServiceImpl.java:235)

at com.vmware.ph.upload.service.UploadServiceImpl.executeWithRetry(UploadServiceImpl.java:261)

at com.vmware.ph.upload.service.UploadServiceImpl.getUploadDetails(UploadServiceImpl.java:235)

at com.vmware.ph.upload.service.UploadServiceImpl.upload(UploadServiceImpl.java:84)

at com.vmware.ph.upload.service.UploadServiceImpl.upload(UploadServiceImpl.java:77)

at com.vmware.ph.client.api.impl.aggregation.Aggregator$UploadRunner.doUpload(Aggregator.java:307)

at com.vmware.ph.client.api.impl.aggregation.Aggregator$UploadRunner.tryToUpload(Aggregator.java:269)

at com.vmware.ph.client.api.impl.aggregation.Aggregator.tryToUpload(Aggregator.java:130)

at com.vmware.ph.client.api.impl.aggregation.Aggregator.add(Aggregator.java:114)

at com.vmware.ph.client.api.impl.PhClientImpl$2.run(PhClientImpl.java:301)

at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)

at java.util.concurrent.FutureTask.run(FutureTask.java:266)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

at java.lang.Thread.run(Thread.java:748)

Caused by: java.net.UnknownHostException: vcsa.vmware.com

at java.net.InetAddress.getAllByName0(InetAddress.java:1280)

at java.net.InetAddress.getAllByName(InetAddress.java:1192)

at java.net.InetAddress.getAllByName(InetAddress.java:1126)

at org.apache.http.impl.conn.SystemDefaultDnsResolver.resolve(SystemDefaultDnsResolver.java:45)

at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:111)

at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353)

at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380)

at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)

at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)

at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)

at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)

at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)

at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)

at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107)

at com.vmware.ph.upload.rest.PhRestClientImpl.sendUploadRequest(PhRestClientImpl.java:188)

... 16 common frames omitted

 

 

[2018-09-14T20:01:50.245Z] [ERROR] aggregation-workerthread-2    c.vmware.ph.client.api.impl.aggregation.Aggregator$UploadRunner   There was an error during the upload and the aggregated data is not uploaded.There will be other attemts to upload the same data.If however this data is not uploaded for such a period that a lot of new data is aggregated, then the old data will be discarded.If this error persists, it may mean that the PhoneHome upload server is not working,or that there is no outbound connectivity to the PhoneHome upload server.Please contact the PhoneHome team for assistance. com.vmware.ph.upload.exception.ConnectionException: java.net.UnknownHostException: vcsa.vmware.com

at com.vmware.ph.upload.rest.PhRestClientImpl.sendUploadRequest(PhRestClientImpl.java:212)

at com.vmware.ph.upload.service.UploadServiceImpl$4.call(UploadServiceImpl.java:239)

at com.vmware.ph.upload.service.UploadServiceImpl$4.call(UploadServiceImpl.java:235)

at com.vmware.ph.upload.service.UploadServiceImpl.executeWithRetry(UploadServiceImpl.java:261)

at com.vmware.ph.upload.service.UploadServiceImpl.getUploadDetails(UploadServiceImpl.java:235)

at com.vmware.ph.upload.service.UploadServiceImpl.upload(UploadServiceImpl.java:84)

at com.vmware.ph.upload.service.UploadServiceImpl.upload(UploadServiceImpl.java:77)

at com.vmware.ph.client.api.impl.aggregation.Aggregator$UploadRunner.doUpload(Aggregator.java:307)

at com.vmware.ph.client.api.impl.aggregation.Aggregator$UploadRunner.tryToUpload(Aggregator.java:269)

at com.vmware.ph.client.api.impl.aggregation.Aggregator.tryToUpload(Aggregator.java:130)

at com.vmware.ph.client.api.impl.aggregation.Aggregator.add(Aggregator.java:114)

at com.vmware.ph.client.api.impl.PhClientImpl$2.run(PhClientImpl.java:301)

at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)

at java.util.concurrent.FutureTask.run(FutureTask.java:266)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

at java.lang.Thread.run(Thread.java:748)

Caused by: java.net.UnknownHostException: vcsa.vmware.com

at java.net.InetAddress.getAllByName0(InetAddress.java:1280)

at java.net.InetAddress.getAllByName(InetAddress.java:1192)

at java.net.InetAddress.getAllByName(InetAddress.java:1126)

at org.apache.http.impl.conn.SystemDefaultDnsResolver.resolve(SystemDefaultDnsResolver.java:45)

at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:111)

at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353)

at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380)

at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)

at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)

at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)

at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)

at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)

at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)

at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107)

at com.vmware.ph.upload.rest.PhRestClientImpl.sendUploadRequest(PhRestClientImpl.java:188)

... 16 common frames omitted

HTML client - limit on number of targets

$
0
0

Hi,

 

We've hit what seems like a limitation in the HTML client and I was wondering if there is a way around what we're hitting.

We have an ActionSpec that accepts multiple targets.  When we're testing in MSIE or MS Edge, we hit a limit on the queryString when the user select many targets (any more than 180) and attempts to launch our action.  Other browser may also have issues, but it seems like their queryString max length must be much higher.

I can't think of one, but is there perhaps a workaround for this issue?

 

Thank you,

Jesse


Conditional property filter on vmware view is not working

$
0
0
Hi,
 
We are trying to add related host objects tab for clusters. For this we are trying to filter the host on the sphere host view to display our hosts.
For this we tried using the ConditionalProperty tag using our property in plugin.xml and noticed that it is not filtering based on this property. After debugging we realized its not hitting our property provider adapter. The snippet of our plugin.xml looks like this:
 
<com.vmware.ui.relateditems.model.RelationSpec>
        <id>com.xxx.cluster.related.hosts</id>
         <icon>#{hostNavigatorIcon}</icon>
          <label>#{xyz}</label>
          <relation>host</relation>
          <conditionalProperty>xxx:isXXX</conditionalProperty>
          <targetType>HostSystem</targetType>
          <listViewId>vsphere.core.host.list</listViewId>
  </com.vmware.ui.relateditems.model.RelationSpec>
 
Can you please provide some insight to this. Are we missing something here? 
Thanks in advance for any help on this.
 
Prachi 

Deprecated vSphere Client extension points (vise.relateditems.specs)

$
0
0

I was wondering what the plan is for the deprecated extension points.  Is there an release that will no longer support these extension points?   Most relevant to our current Flex->HTML migration is the vise.relateditems.specs extension point.  We have added the extension to our plugin.xml and it seems to be working fine on 6.5 and 6.7, however since we haven't migrated all of our deprecated extensions over to HTML yet, I wanted to check if these would still work in the next release.

 

Thank you,

Jesse

Unexpected list of propertySpecs in QuerySpec from HTML client

$
0
0

Hi,

 

We've extended the HTML client via the vise.relateditems.specs extension point and the data that is rendered in the view/columns displays correctly as long as we don't apply a filter using the filter box in the UI.  If we attempt to apply the filter, then we start to see some unexpected results and the result are a little different in 6.5 vs. 6.7.

Looking at the HTTP request that's sent to /ui/list/ex, I see the following JSON payload:

   "constraintObjectId":"urn:vmomi:ClusterComputeResource:domain-c978:91164109-1fa2-4368-80cb-fe0cf4e1926f",

   "queryFilterId":"relatedItemsListFilterId",

   "filterParams":[ 

      "com.simplivity.cluster.related.hosts"

   ],

   "requestedProperties":[ 

      "id",

      "primaryIconId",

      "name",

      "labelIds",

      "simplivity:virtualControllerName",

      "simplivity:state",

      "simplivity:clusterName",

      "simplivity:datacenterName",

      "simplivity:currentVersion",

      "simplivity:managementIp",

      "simplivity:storageIp",

      "simplivity:federationIp",

      "simplivity:virtualControllerShutdownStatusString",

      "simplivity:upgradeStatus"

   ],

   "dataModels":[ 

      "simplivity:HostSystem"

   ],

   "searchTerm":"jesse",

   "searchableProperties":[ 

      "name",

      "simplivity:virtualControllerName",

      "simplivity:state",

      "simplivity:clusterName",

      "simplivity:datacenterName",

      "simplivity:currentVersion",

      "simplivity:managementIp",

      "simplivity:storageIp",

      "simplivity:federationIp"

   ],

   "take":100,

   "skip":0,

   "page":1,

   "pageSize":100,

   "sort":[ 

      { 

         "field":"simplivity:datacenterName",

         "dir":"asc"

      }

   ],

   "group":[ 

 

 

   ],

   "listViewId":"com.simplivity.host.list",

   "isLiveRefreshRequest":false

}

 

which looks as I would expected since it includes the necessary data, including the requestedProperties.  However, if I set a breakpoint in my DataProviderAdapter, it looks like the QuerySpec.ResourceSpec.PropertySpec list isn't populated from the requestedProperties that are in the payload.  In 6.5, the list is empty.  In 6.7, it seems like the list of propertySpecs is always a single entry and the entry seems to be the property that we're sorting on.  Again, this only happens when we attempt to apply a filter. 

Is this behavior expected or is there something wrong with the way in which the QuerySpec is being generated from the HTTP request?

Thank you,

Jesse

Let's meet at VMworld Europe!

$
0
0

Hi folks,

Members of the SDK team will be present at VMworld Europe which is going to take place on 5-8 November in Barcelona.

If you are attending I would happy to see you at my session on plugins: UI integration in vSphere Client and VMware Cloud [VMTN5535E]

 

Aside from this session it would be great to also meet and discuss the SDK & plugins present, future, compatibility and any other topics you might be interested in. If desired we might even look at some code.

Based on the number of people joining we might organize an ad-hoc round table or 1:1 meetings.

 

Please drop me a personal message via the Forum or send a mail to plugin@vmware.com if interested. Do mention your preferences and some points you want to discuss so that this is as helpful to our community as possible.

You can also reach me via Twitter @vladi_velikov but make sure you keep technical questions for the Forum (as my personal Twitter account is not representative for VMware).

Can't wait for meeting you at VMworld Europe! :)

 

Cheers,

Vladi

Navigator panel doesnt refresh on task completion

$
0
0

Hi,

On submit a dialog we do the following:

1. Make http request to perform the action. If the user input is invalid then keep the dialog up and allow the input to be corrected.

2. Get returned taskId from step 1.

3. Call WEB_PLATFORM.callActionsController("/tasks/" + taskId, jsonString);

4. Call WEB_PLATFORM.closeDialog().

The objects view for our object refreshes after the call is made, but the navigator panel does not refresh. This behavior is not reproducing on the virgo server but is happening only when we deploy it as a plugin on our server.

The request url for this refresh looks like this:

Request URL:https://<vcenterIP>/ui/data/properties/undefined?properties=primaryIconId,name,labelIds

Status Code: 500 Internal Server Error.

Can you please provide an insight on how this can be resolved.

Thanks.

vSphere Client SDK 6.7 Update 1 is GA !!!

$
0
0

Hi all,

vSphere 6.7U1 is out and is super exciting for the vSphere Client, the SDK and the plugins (see here). :)

 

1. vSphere Client is now at full parity with vSphere Web Client (Flex).

2. NEW PLUGIN ARCHITECTURE: Remote plugins

Remote plugin architecture integrates the UI of a plugin solution served by external plugin servers.
No executable plugin bits on the vCenter appliance as the plugin is no longer deployed on the vSphere Client application server.
Predictable stability, security, performance and upgrade of both vSphere and the plugin solution.
Business logic from the service layer is running on the plugin server and can be based on any technology of choice (not necessarily Java & OSGi).
New simplified JSON-based extensibility format.
Ability to hide the Object Navigator and take over the majority of vSphere Client's real estate.

  - Ability to integrate the UI of a plugin solution served by external plugin servers: no plugin bundles deployed in Virgo, no OSGi, easier to integrate existing standalone UI talking to existing backend server. The vSphere Client is downloading a single plugin.json file instead of a whole plugin .zip.
  - Use any technology for the backend (not necessarily Java).
  - New simplified JSON-based extensibility format (plugin.json).
  - Ability to hide the Object Navigator and take over the majority of vSphere Client's real estate (implementing custom navigation if required).

Note: The current local plugin architecture is still supported and also improved in this release.

3. Tool for helping out with migration from Bridge API to new JS API.

4. Improvements to the HTML Sample.

5. Stability and bug fixes (listed in the Release notes which will be available soon).

 

Go ahead and try it out. As always all questions, issue reports and feedback are welcome.

Cheers,

Vladi

Supporting third party web client plugin in Enhanced Linked Mode vCenter Server setup

$
0
0

As per VMware document we are supposed to install the same plugin(our custom plugin) instance to all vCenter Servers in Enhanced Linked Mode vCenter Server setup, but we have a situation where our external plugin web server can handle only one vCenter Server at a time and so we want to install same plugin exposed by different external plugin web server to different vCenter Servers in linked mode. This is not going to work as the plugin id is the same and vSphere Web Client service will only load the one which was registered first.

 

How can we work-around in this situation?

Is changing the plugin id for each instance of external plugin web server a good solution?

 

Thank you!


Unregistering plugin for requires restart in 6.7

$
0
0

I've seen multiple discussions regarding the fact that unregistering an extension requires a restart of the Virgo server.  Most of those were older and we haven't experienced this issue with 6.0 or 6.5, however it looks like we're starting to hit this issue with 6.7.  Is there some issue that was reintroduced or have we just been lucky on 6.0 and 6.5?

Error displayed in browser's console when using 6.7u1 HTML client

$
0
0

We recently upgraded our 6.7 system to 6.7u1 and are now seeing this error in the browser's console log:

 

Refused to apply style from 'https://10.1.176.143/ui/plugins/css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.

 

Browser is Chrome v69.

Our automation suite is failing because one of the things that it does is that it'll check the console to ensure that it doesn't contain any errors. 

 

After digging into it a little, I see that the index.jsp in the h5ngc.war contains this line:

   <link href="plugins/css" rel="stylesheet" type="text/css"/>

which seems to be causing the issue.

 

Is this a known problem?

Can i use datacenter api with Node JS?

$
0
0

We want to achive below functionality in Node JS :-

  1. Use user name and password to login to VCenter
  2. Identify and Validate the cluster name and data center name as provided by user.
  3. It also checks whether it is embedded mode or not.

Our legacy app was build in JAVA & we use "vim25.jar" to csame functionlity.

Issue cloning VM across linked-mode vCenter Server using SAML token

$
0
0

Hi,

 

I have a vSphere Web Client HTML plugin with custom java service. The custom java service communicates with my external server that exposes all the services.

 

I am trying to clone a VM from one vCenter Server to another vCenter Server in linked mode using the vSphere API's VirtualMachine.cloneVM_Task() method. Since the destination vCenter Server is different from source, I am specifying ServiceLocator with ServiceLocatorSAMLCredential as the destination vCenter Server credential.

I have a SAML xml token string that I got from UserSession object inside my custom java service and I am using it to create ServiceLocatorSAMLCredential object, but when I run clone task, I get error saying "Cannot complete login due to an incorrect user name or password

 

Isn't this SAML token suppose to works for accessing all vCenter Servers in linked mode?

I am passing this SAML token string from my plugin custom java service to my external server where I am trying to perform this clone operation.

 

Any help with his issue or sample code to clone VM across vCenter will be appreciated. Thanks!!

 

 

 

 

How to saving/export VM's configuration?

$
0
0

I have a requirement to create a new VM(different location) using exactly the same configurations as of existing VM. I have copy of its virtual disks and so I am only interested in VM's configurations. If possible I want to store the existing VM's configurations information in my database and later use it for re-creating new VM.

I can use VirtualMachineConfigInfo data object to get all VM's configurations, but there are too many properties.

 

I have following questions:

  1. What are the minimum set of VM's configuration that is needed to re-create a VM ? Or do I need all the properties?

  2. Is a there way to export VM's configuration which I can use to re-create the VM later?

 

Thanks.

Viewing all 2218 articles
Browse latest View live


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