How to rename the file and delete the invalid virtual machine in vSphere 6.5
Menu items not showing up for custom objects
Hi,
I created a list view that is similar to the the chassisA/chassisB html example. The list is correctly showing our custom objects. However, edit/delete options that were also added in the same fashion as in the chassisA/chassisB example are not showing up. I can see that my browser is making a request to "actionsService/menu/?menuType=vise.menus.context,vise.menus.context.solutionMenus", when right-clicking on the object.
In the body of this request my browser is sending the uuid of the object which is of the form my_scheme:my_company:my_object_type:object_uuid . This request is returning an empty list and in the logs I can see a "Warning: com.vmware.vise.mvc.controllers.ActionsServiceController: Object my_scheme:my_company:my_object_type:object_uuid could not be found."
After a long time of experimentation, I noticed that when I manually replace my_scheme in this request with "urn:vri" it is giving me the correct menu items and no warning is logged.
Any idea why the service doesn't find the menu items?
From my experiments, I can see that there are services which have a "ObjectReferenceService" (such as the ActionsController of the chassisB sample) which CAN'T find my objects with the my_scheme prefix but CAN find the objects if I use the "urn:vri" prefix.
Thanks for the help!
Upgrade to 6.7: Cannot find class [org.springframework.web.servlet.view.json.MappingJackson2JsonView]
Hi,
I've read the FAQs after trying to run my plugin against the 6.7 server (running in my local development environment). I have a problem that I believe is identified in the FAQs, but don't know how to solve it. There is some advice how to solve it, but I really need it to be spelt out so I can apply the fix.
The problem is as follows (from the FAQs):
Issue: MappingJacksonJsonView removed from Spring Framework Symptom: java.lang.ClassNotFoundException: org.springframework.web.servlet.view.json.MappingJacksonJsonView
Explanation: MappingJacksonJsonView has been replaced with a newer class.
Solution: Use org.springframework.web.servlet.view.json.MappingJackson2JsonView in bundle-context.xml file. Note: MappingJackson2JsonView imposes dependencies on additional Spring packages.
I need to know exactly what to add to the bundle-context.xml file please?
I've tried this:
<beanclass="org.springframework.web.servlet.view.json.MappingJackson2JsonView"><propertyname="contentType"value="application/json"/></bean>
but I still get the same error... Could you please state exactly what code needs to be added?
Many thanks,
Warren
plugin seed 1.0.0 released
The latest version of plugin seed is available in the download area of the fling site vSphere HTML5 Web Client
Version 1.0.0 is now based on SDK 6.7, using the new Javascript APIs. It allows to build plugins for vSphere Client 6.5u2 and 6.7 but it is no longer compatible with the vSphere Flex Client.
It also uses Angular 6 and Angular-CLI 6. There are many other changes, please see the change log if you were already using an older version.
Unable to get serverGuid in vsphere-ui plugin 6.7
I have plugin deployed on vsphere 6.7 on both Flex and HTML version.
Plugin is developed using html-client sdk . Now post-deployment vsphere-client[Flex] web-platform.js gives proper serverGuid but same fails on html client i.e vsphere-ui.
Flex client return proper serverGuid = xxxx xxx xxx xxx
whereas in html client we are getting serverGuid as null.
/ Get the info provided in a global view using a vCenter selector
WEB_PLATFORM.getVcSelectorInfo = function() {
var info = {serviceGuid: getURLParameter("serviceGuid"),
sessionId: getURLParameter("sessionId"),
serviceUrl: getURLParameter("serviceUrl")};
return info;
};
Thanks
HTML plugin: sampleB breaks when replacing urn:cr with abc:xyz
I had a problem for a few days, where I was not able to add options to custom objects and I managed to reproduce it on one of the samples:
If you replace "urn:cr" with "abc:xyz" in the bundle-context.xml of the service as well as in the ModelObjectUriResolver (replace SCHEME with "abc" and NAMESPACE with "xyz"), then a right click on a Chassis in the view won't show any menu items.
This looks like a bug on the vSphere SDK side.
Two versions of same VMware package in vsphere_client_serenity folder
Hi,
We have two versions of same path in vsphere_client_serenity folder.
com.vmware.vsan.health - 6.5 and 6.5-1300
When we try to register our plugin, we were facing issues, however after removing the older version of the above, our plugin works fine.
Can you please let us know what is the impact of having two versions of same pacakage and is it alright to remove one of the packages.
Plugin seed 1.0.0 - How do we continue supporting our current Customers?
Hi,
We currently publish a plugin from the 0.9.8 seed, which has been great to work with. We have been able to develop the plugin so that it can be used by the vast majority of our Customer base.
We would like to start using 1.0.0, but there is a major problem for us, as it only supports plugins running in 6.5u2 and 6.7... Furthermore, it is only supporting the H5 client and not Flex.
Many of our Customers are running vSphere v6.0 and therefore need support for this version, together with the Flex implementation because this is the only client they can use. It would be very costly for us to start maintaining two distinct codebases, one from seed 0.9.8 and the other from seed 1.0.0., with little benefit.
As our current plugin (built from 0.9.8) already supports all versions of vSphere from 6.0 to 6.7 and includes support for the Flex client, we will just continue developing from this seed.
Could you please let us know if there are any plans to make the seed code in 1.0.0 backward compatible to all versions of vSphere 6.x, and also so that it provides continued support for the Flex client? Otherwise, could you please give advice about how we should continue to support our existing Customers within a single codebase going forward?
Many thanks,
Warren
How to get "urn:vmomi" ObjectId of an object by using QuerySpec/PropertySpec
I'm currently building a HTML plugin for a custom object. I built a global view for my custom object using Angular, similar to the html-sample. My custom object has related Datastore objects. Now I want to create links to the Summary View of the related Datastores for each custom object, using the 'app.navigateTo' method of the vSphere Client JavaScript API. I'm able to get a lot of information about the Datastores that my custom object is related to using QuerySpec/PropertySpec and the DataService. What I can't get is the "urn:vmomi" ObjectId, that is expected by the 'app.navigateTo' method (in the 'app.NavigationOptions' parameter).
Is there a way to get the "urn:vmomi" ObjectId of VMware objects (possibly, by using a different method than the DataService)?
In HTML web client plugin, How to get authentication parameters (such as objectId and sessionid) to talk to backend server?
Plugin content not showing when using IE against VC Version 6.0.0 Build 4514981, though working for other 6.x builds
Hi,
We have developed a plugin from the 0.9.8. seed code. We have noticed a bug when using IE and attempting to use plugin screens when specifically using VC Version 6.0.0 Build 4514981. When attempting to view a plugin screen the frame shows "Loading..." And remains there indefinitely. Both Chrome and Firefox work as expected.
In the Developer tools console, the following error is reported:
SCRIPT5011: Can't execute code from a freed script
However, when running against VC Version 6.0.0. Build 5318172 IE works as expected with the same plugin code.
We have also tested against builds of 6.5 and 6.7 which work as expected for H5 and Flex, for IE / Chrome / Firefox.
I strongly suspect that this issue is related to: https://communities.vmware.com/thread/548749, however, I don't know how to apply the fixes suggested here against our plugin seed code, as they refer to the web-platform.js code, which isn't included within the seed codebase (to my knowledge).
Could you please advise if this is related, and how we could carry out a fix to remedy this please?
Information vmware
Hi!
I have an HP 250 G3 Notebook with I5 4210U intel core processor socket 1, cores 2, logical processes 4 RAM 4GB, HDD SSD 120GB.
To create a virtual pc that I have to install another windows 10 operating system or windows server depends on my needs how many vCPU can I create is how many cores can I create 8 cores? or 10 cores ,? can I create them ?, then how much RAM memory can I create at 8GB or 16Gb or 32Gb or 64Gb ?, how much virtual hard disk can I create 1TB can I create? or 500GB? or less? I would like a vHD a bit more space; can I create a vGPU of nvidia GRID or does this work for a fee ?.
Thanks to those who will answer me.
Group level roles not propagating to user
We are implementing RBAC in our plugin where,
I am having a user group with an admin role assigned to it in my vCenter.
I have added a user to this user-group, however, the admin role is not getting propagated to the user, instead,
it requires to assign the admin role to this user individually in order to reflect the admin role.
Query:-
Does this behavior is expected or am I missing any step here in between.?
Restricting Flex w/ HTML Bridge content to Flex Server
Hi,
I was looking into how we might restrict our Flex plugin (with HTML bridge content) to deploy only to the Flex server instance. Removing the type="HTML" also seems to disable the bridge content. I could find any documentation or forum post on this.
We would like to restrict a separte Flex/HTML plugin to the 6.0 and 6.5 Flex server instance while allowing a HTML only plugin to deploy to the HTML server instance. Our Java and HTML content are currently shared between the two, but we where hoping to accomplish this separation of plugins such that we could "deprecate" our Flex plugin and move the Java/HTML beyond the Flex server.
We have stopped development on the Flex client side, but need to provide both instances until our HTML plugin has feature parity.
Any help would appreciated.
-Bryant Martin
HTML plugin version is also available in flex serenity
Hi,
When we register our HTML plugin, we are having the same plugin version in flex vsphere-client-serenity folder .Path is given below:
/etc/vmware/vsphere-client/vc-packages/vsphere-client-serenity
We would like to know how to prevent this and let the plugin work only in HTML and the plugin shouldn;t appear in Flex.
Implement callback function from modal dialog
Hello,
I am implementing a feature on vSphere client 6.7.which requires me to open a modal dialog which takes an input as html page and displays it. I use a function available in WEB_PLATFORM called WEB_PLATFORM.openModalDialog(). It works perfectly fine. When the user closes the window ,I want a callback function in the main window to be called. How to go about doing it? I also want to send few parameters to the modal dialog while opening it. How do I achieve it. ? I referred the vSphere client sdk documentation for 6.7 and found it can be done using latest js api available. But was not able to successfully implement it .I tried modal.open() but the browser was unable to recognize it and gave null reference.Where can I find the sample code or way to implement?
HTML plugin: htmlClientSdk.app.getContextObjects is not a function in vSphere 6.7
I'm looking at the HTML sample that is using Angular:
When opening the edit dialog, it's passing the Chassis-to-be-edited as a ContextObject:
config.contextObjects = this.selectedChassis.map((value) => {
return Object.assign(new Chassis(), value);
});this.chassisService.htmlClientSdk.modal.open(config);
In the create-edit component the sample is then setting this Chassis object via:
if (this.isEditAction()) {
(<any>Object).assign(this.chassis,
this.chassisService.htmlClientSdk.app.getContextObjects()[0]);
}
We're trying to follow the exact same workflow, however it looks like the htmlClientSdk has changed in 6.7. When opening the modal, I'm seeing the following error in the console:
core.es5.js:1020 ERROR Error: Uncaught (in promise): TypeError: this.htmlClientSdkService.htmlClientSdk.app.getContextObjects is not a function
TypeError: this.htmlClientSdkService.htmlClientSdk.app.getContextObjects is not a function
When looking at the sources of htmlClientSdk.app, in I can see that the JavaScript API (the methods available under htmlClientSdk.app) has changed. These are the available methods I see in h5SdkApplicationService.ts:
public navigateTo: (options: NavigationOptions) => void;
/**
* returns the user session data
* provided by the user session service
* @see {@link UserSessionService}
* @returns {IPromise<any>}
*/
public getUserSession: () => IPromise<any>;
/**
* Returns specific information about the client
* @returns {{type: string, version: string}}
*/
public getClientInfo: () => ClientInfo;
/**
* Returns the context object id of the current object
* @returns string representing the current context object
*/
public getContextObjectId: () => string | null;
/** Returns the current vSphere Client locale
* @returns string the client locale
*/
public getClientLocale:() => string;
Where is getContextObjects?
NPE in starting up a plugin
I can see the following exceptions in the vsphere_client_virgo.log, but failed to reproduce it in my local virgo server...
java.lang.Exception: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ClusterPropertyProvider': Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ClusterPropertyProvider': FactoryBean threw exception on object creation; nested exception is java.lang.NullPointerException
at com.vmware.vise.extensionfw.impl.BundleLifeCycleListenerImpl.onStartFailed(BundleLifeCycleListenerImpl.java:92)
at org.eclipse.virgo.kernel.install.artifact.internal.StandardArtifactStateMonitor.onStartFailed(StandardArtifactStateMonitor.java:242)
at org.eclipse.virgo.kernel.install.artifact.internal.AbstractInstallArtifact.asyncStartFailed(AbstractInstallArtifact.java:329)
at org.eclipse.virgo.kernel.install.artifact.internal.AbstractInstallArtifact.access$1(AbstractInstallArtifact.java:325)
at org.eclipse.virgo.kernel.install.artifact.internal.AbstractInstallArtifact$StateMonitorSignal.signalFailure(AbstractInstallArtifact.java:264)
at org.eclipse.virgo.kernel.deployer.core.internal.AbortableSignalJunction.subSignalFailed(AbortableSignalJunction.java:103)
at org.eclipse.virgo.kernel.deployer.core.internal.AbortableSignalJunction.access$1(AbortableSignalJunction.java:89)
at org.eclipse.virgo.kernel.deployer.core.internal.AbortableSignalJunction$SubSignal.signalFailure(AbortableSignalJunction.java:155)
at org.eclipse.virgo.kernel.install.artifact.internal.AbstractInstallArtifact.signalFailure(AbstractInstallArtifact.java:297)
at org.eclipse.virgo.kernel.install.artifact.internal.AbstractInstallArtifact$StateMonitorSignal.signalFailure(AbstractInstallArtifact.java:270)
at org.eclipse.virgo.nano.core.internal.BundleStartTracker$1.run(BundleStartTracker.java:142)
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: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ClusterPropertyProvider': Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ClusterPropertyProvider': FactoryBean threw exception on object creation; nested exception is java.lang.NullPointerException
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1634)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:742)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867)
at org.eclipse.gemini.blueprint.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:57)
at org.eclipse.gemini.blueprint.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:322)
at org.eclipse.gemini.blueprint.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
at org.eclipse.gemini.blueprint.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:287)
at org.eclipse.gemini.blueprint.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:137)
at org.eclipse.virgo.kernel.agent.dm.ContextPropagatingTaskExecutor$2.run(ContextPropagatingTaskExecutor.java:95)
... 3 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ClusterPropertyProvider': FactoryBean threw exception on object creation; nested exception is java.lang.NullPointerException
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:185)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:137)
at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1640)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:254)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
at org.eclipse.gemini.blueprint.service.exporter.support.OsgiServiceFactoryBean.afterPropertiesSet(OsgiServiceFactoryBean.java:185)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1692)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1630)
... 17 common frames omitted
Caused by: java.lang.NullPointerException: null
at org.eclipse.gemini.blueprint.service.exporter.support.OsgiServiceFactoryBean.getObject(OsgiServiceFactoryBean.java:406)
at org.eclipse.gemini.blueprint.service.exporter.support.OsgiServiceFactoryBean.getObject(OsgiServiceFactoryBean.java:72)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:178)
... 24 common frames omitted
After spending several hours to figure out what could be the root cause, I gave up finally...
Can anyone help here? any insights?
the remote VCSA is at 6.7.0.200, the spring bundles are at version 4.3.17
My local client SDK is at a different version, the spring bundles are version 4.3.9 instead... could this be the problem?
Thanks!
Is there a limit of how many objects can be selected in order for propertyConditions to function properly
When using the propertyConditions, my actions are not be shown in the menu as expected when ~290 objects are selected. In this particular case, the objects are virtual machines. If I selected a subset of them (first half) then the menus are displayed.
VimService51.XmlSerilization could not load one of its assemblies
Hi, I was wondering if someone can help me please.
I have two workstation - DEV, with PowerCLI 5.1 installed and PROD, with clean Windows installation, .NET 3.5 installed and no PowerCLI.
I have built a class library in C# (let's call it MyV.dll) using Visual Studio 2017. Methods of MyV.dll process data from vSphere, through 'using Vim.VimClient' directive. Idea behind MyV.dll is so that it is possible to connect to vSphere datacentre on computer without PowerCLI installed. I have referenced Vim.VimClient.dll, VimService -25, -40, -45, -50, -51 and VimService{xx}.XmlSerilization.dll in my solution and compiled DLL file.
I then moved MyV.DLL to PROD computer, copied across all mentioned above VmWare DLL files in the same folder as MyV.dll and tried to load MyV.dll in PowerShell using [system.reflection.assembly]::LoadFrom().
I get an error when calling Connect() method after creating Vim.VimClient object:
unable to load VimService51.XmlSerilization or one of its dependencies...
I am puzlled because mentioned file is in the folder, where Vim.VimClient.dll is.
I have decompiled VimService51.XmlSerilization to see what libraries does it reference and can see that it references some .NET 2.0 classes. .NET 2.0 is installed on PROD machine.
How do I track which dependencies does it fail to load?
Or what is minimum set of DLLs from VmWare to be included so I can make calls to vCenter without having PowerCLI installed? All I am doing is Connect(), GetVM(), Disconnect().
Regards,
Alex