SE VC:VirtualMachine CatalogResource

Hi all

I need to get VC:VirtualMachine instance from a resource catalog. I need VM to unmount the ISO.  This is discussed here 'get vCenter vCAC VM VM'.

I wasn't able to get the virtual machine with the following code. Any help appreciated.

var catalogResource = vCACCAFEEntitiesFinder.getCatalogResource (vcacCafeHost, "4be75047-f5fd-4b0e-bdb6-27c775d8a923"); satish121

var providerBinding = catalogResource.getProviderBinding ();

var bindingId = providerBinding.getBindingId ();

var VM = Server.findForType ("vCAC:VirtualMachine", bindingId);

If (vm! = null) {}

System.log ('VM Found!');

System.log("vmUniqueID:"+VM.vmUniqueID);

}

var vCenterVm;

var sdkConnections = VcPlugin.allSdkConnections;

System.log (sdkConnections.length + "sdk connections" detected...);

for each {(var sdkConnection in sdkConnections)

try {}

vCenterVm = sdkConnection.searchIndex.findByUuid (vm.vmUniqueID, true, null, false);

} catch (e) {System.log ("Connection SDK error" + sdkConnection.name + ":" + e) ;}}

If (vCenterVm! = null) {}

System.log ("Solved vCenter VM" + vCenterVm.name);

break;

}

}

You're close, Paul... I just did a config (very, very, very) quick and dirty for this... and I was able to solve all three overall. It is in a small environment, so it only took a few seconds, but I imagine that on a more great inventory, it won't be as fast. You'll probably want to add a few additional comments / registration / etc... It's just a skeleton for the basic functionality:

var bindingId = catResource.getProviderBinding().getBindingId();
var iaas = Server.findForType("vCAC:VirtualMachine", bindingId);
var sdkConnections = VcPlugin.allSdkConnections;
for each (sdk in sdkConnections) {
  var vm = sdk.searchIndex.findByUuid(null, iaas.vmUniqueID, true, true);
  if (vm) { break; }
}

System.log(vm);

The big problem is that the bindingId value, I found this vRA uses between COFFEE and IaaS is not the same value as the Uuid as vCenter Instance has... and COFFEE does not store anything on the side IaaS (as the value of uuid instance...), you don't have to go COFFEE-> IaaS-> vCenter... which is annoying. There should be an easier way to do this... but that's neither here nor there.

Tested on vRA 6.2.1 against vRO 6.0.1 + plugin vRA 6.2.1.

Tags: VMware

Similar Questions

  • Looking for a vCAC:VirtualMachine of a vCACCAFE:CatalogResource

    I hope that I am watching this right in the face and have not only put together how to proceed.  I just want to get the vCAC:VirtualMachine or objects associated with a vCACCAFE:CatalogResource.  I don't see an easy way to do it.  I see some properties of the vCACCAFE:CatalogResource which I might well be the leader back to the vCAC:VirtualMachine uuid, but nothing seems to jive.  These things are obviously related.  Help!

    I hope this isn't too late... How to get the actual VM IaaS to a provisioned catalog vCAC resources VM?

  • VC:virtualmachine and vCAC:VirtualMachine not transmitted from vRA at vRO

    Hello

    I have a Setup with the more recent vRA and more recent vRO external device. The plans use the CloneWorkflow to clone templates in vRA. There is also a workflow assigned (not not using Event Broker yet, still ExternalWFStubs) that is executed when a machine is supplied. So far, this perferctly worked. Now the underlying vCenter was Version 6 upgrade. Cloning of the machines still works perfectly and also the vRO workflow runs, but there is a problem: the attributes VC:VirtualMachine and vCAC:VirtualMachine are not transmitted to vRA to the vRO triggered workflow if it fails (they are configured as the input of the main workflow parameters). Anyone have any idea what could be the reason and how can I fix it? I'm a little at a loss because I do not see any errors in the logs next to these parameters are not passed on more and I can't really identify why the update of the vCenter influence the parameters vRA passes on vRO. VRA Plugin is installed on the external vRO and is the most recent version.

    Best regards

    JensVM

    For more information, vRA passes a string containing the name of the VM at vRO vCAC. vRO then runs runner/worker plugin vRA workflows that get the vCAC:VirtualMachine and the objects of their respective plugins VC:VirtualMachine. You could look at workflows of rider and see if you get the objects there or if they get lost somewhere else in the process.

  • Get - VM to Get-View - viewtype VirtualMachine

    We want to replace our Get-VM with Get-View-viewtype VirtualMachine function, because it is a faster method.

    But for some reason, the output is not the same.

    You expect that they return both the same VirtualMachine object.

    Out with Get - VM:

    Name, PowerState, NUM CPUs, MemoryGB

    Out with Get-View - viewtype VirtualMachine:

    Capacity, Config, layout, LAyoutEx, storage,... all the VMware.Vim.VirtualMachine object.

    Our methods:

    $Hosts = get-VMsByLocation-site $Location

    $VMs = @)

    $Hosts | {ForEach}

    (A) $VMs += Get - VM $_

    (B) $VMs += Get-view -ViewType VirtualMachine - filter @{'Name' = $_}

    }

    https://www.VMware.com/support/developer/windowstoolkit/wintk40u1/HTML/get-VM.html

    https://communities.VMware.com/thread/474763

    https://www.VMware.com/support/developer/converter-SDK/conv50_apireference/Vim.virtualmachine.html

    https://pubs.VMware.com/vSphere-51/index.jsp#com.VMware.PowerCLI.cmdletref.doc/virtualmachine.html

    Hello, tendonsie-

    Yes, you are right: If you change the type of object that you are using, and then later call what's going used probably not work with .

    However, another part of the power of Get - view: you have direct access to a representation of the object "full" vSphere - the View .NET VirtualMachine object, in this case.  So, you do no need another call to get the CpuReservationMhz - you can get it directly from the object VirtualMachine who have already recovered you.  An example of include these goods in the output (based on the example I gave first):

    Get-View -ViewType VirtualMachine -Property Name,Runtime.PowerState,Config.Hardware,Config.CpuAllocation.Reservation | Select-Object Name,    @{n="PowerState"; e={$_.Runtime.PowerState}},    @{n="NumCPU"; e={$_.Config.Hardware.NumCPU}},    @{n="MemoryGB"; e={$_.Config.Hardware.MemoryMB / 1KB}},    @{n="CpuReservationMhz"; e={$_.Config.CpuAllocation.Reservation}}
    

    You see the additional calculated property, CpuReservationMhz, here.  Now you don't need even have call the Get-VMResourceConfiguration cmdlet.

    Thus, work comes to discover what are the properties of the View .NET object that you have recovered.  And this work is supported by the vSphere API documentation, a link that is available to VMware vSphere Web Services SDK Documentation.  How is that?

  • Create / update the property on entity - vCO using virtualMachine

    I am updating a custom property of a VM vCAC put into service using the Out-of-the-Box workflow object that is included in the Package Plugin extensibility vCAC. Manually by selecting a host vCAC in common settings window is not a problem. What I can't do is select / input anything in the virtualMachineEntity field. Nothing appears in the window of /popup switchand no data is displayed regardless of what I can get into the filter box vCAC:Entity. If this field automatically filled with a type of data or y at - it a specific string, I need to go to target my VM?

    I use the correct workflow? I would like to be able to replace the propertyValue to a custom property for a specific or existing VM.

    Ron thx.

    I think you will find that many of these workflows have a small InkWell to work if you want to run interactively.  You can copy this and instead to use the entity for the use of inputs vCACVm:VirtualMachine then you can use the getEntity() to set this value.

    Here's an excerpt from one of our actions affecting the cpu and ram for example.  We have just in the virtual machine.  I wrote another action to pick up the host, and as you can see, you can get the entity with the method of the scriptable object.

    var host is System.getModule ("com.qualcomm.basic"). QCgetvCACHostForvCACVm (vCACVm);

    var virtualMachineEntity = vCACVm.getEntity ();

    var propertyIsHidden = false;

    var propertyIsRuntime = false;

    var propertyIsEncrypted = false;

    var doNotUpdate = false;

    System.getModule("com.vmware.library.vcac").addUpdatePropertyFromVirtualMachineEntity(host,virtualMachineEntity,"VirtualMachine.CPU.Count",resize[0].toString(),propertyIsHidden,propertyIsRuntime,propertyIsEncrypted,doNotUpdate);

    System.getModule("com.vmware.library.vcac").addUpdatePropertyFromVirtualMachineEntity(host,virtualMachineEntity,"VirtualMachine.Memory.Size",resize[1].toString(),propertyIsHidden,propertyIsRuntime,propertyIsEncrypted,doNotUpdate);

  • Get all the vCAC:VirtualMachine

    Hello

    I will try to find all the VMS (vCAC:VirtualMachine) connected to a vCAC:vCAChost, put them in a table/loop, then use System.getModule("com.vmware.library.vcac").getPropertiesFromVirtualMachine (vCAChost, ARRAY), to get all the properties for all machines,

    I looked around and tried several actions but found no one that gets me what I want.

    There is a getAllVMsMatchingRegexp that works perfectly for com.vmware.library.vc.vm but not for com.vmware.library.vcac!


    I'm I missed something or there is a work around, Can someone help me understand this?

    Thank you

    Hello

    Hope the script below helps you.

    This will retrieve the entity VM VCAC by match the name of the computer, but you can customize and iterate with action "getPropertiesFromVirtualMachine" to get the properties.

    var vCACVirtualMachines = Server.findAllForType ("vCAC:VirtualMachine"); The machine used here vCAC ID is not the same as adopted by vCAC

    vCAC VM

    var vCACVM = null;

    for each {(var vCACVirtualMachine in vCACVirtualMachines)

    System.log("Name:"+vCACVirtualMachine.VirtualMachineName);

    If (vCACVirtualMachine.VirtualMachineName == virtualMachineName) {}

    vCACVM = vCACVirtualMachine;

    break;

    }

    }

    Kind regards

    Deepak

  • vCAC 6.0.0.29 Plugin fails to display all VirtualMachines

    Hello expert vCO.

    I had a few problems with the plugin of vCO for vCAC (6.0.0.29 version) running on vCO 5.5.0. More specifically, when I try to expand file VirtualMachines or perform the action of getManagedVirtualMachines() , I get an error of plugin:

    unknown-error.png

    Newspapers of vCO regarding the vCAC plugin show that it could be related to a problem of parsing XML from the server vCAC:

    2014-09-19 12:50:00.962 - content of 0400 [http-bio-142.42.194.85-8281-exec-4] ERROR {} [AbstractResourceElementConfigPersister] error loading the resource with the id: af0beeb8-9963-42e7-a5c1-46152b6688ea

    com.thoughtworks.xstream.io.StreamException: only content allowed before the start tag and not I (position: START_DOCUMENT view... @ 1:1)

    at com.thoughtworks.xstream.io.xml.XppReader.pullNextEvent(XppReader.java:124)

    at com.thoughtworks.xstream.io.xml.AbstractPullReader.readRealEvent(AbstractPullReader.java:148)

    at com.thoughtworks.xstream.io.xml.AbstractPullReader.readEvent(AbstractPullReader.java:141)

    at com.thoughtworks.xstream.io.xml.AbstractPullReader.move(AbstractPullReader.java:118)

    at com.thoughtworks.xstream.io.xml.AbstractPullReader.moveDown(AbstractPullReader.java:103)

    to com.thoughtworks.xstream.io.xml.XppReader. < init > (XppReader.java:63)

    at com.thoughtworks.xstream.io.xml.AbstractXppDriver.createReader(AbstractXppDriver.java:54)

    at com.thoughtworks.xstream.XStream.fromXML(XStream.java:913)

    at com.vmware.o11n.plugin.dynamicops.configuration.VcacConfigPersister.bytes2Config(VcacConfigPersister.java:52)

    at com.vmware.o11n.plugin.dynamicops.configuration.VcacConfigPersister.bytes2Config(VcacConfigPersister.java:21)

    at com.vmware.o11n.plugin.sdk.spring.platform.AbstractResourceElementConfigPersister.getAll(AbstractResourceElementConfigPersister.java:37)

    at com.vmware.o11n.plugin.dynamicops.configuration.XStreamConfigurationServiceImpl.reload(XStreamConfigurationServiceImpl.java:165)

    at com.vmware.o11n.plugin.dynamicops.configuration.XStreamConfigurationServiceImpl.load(XStreamConfigurationServiceImpl.java:141)

    to com.vmware.o11n.plugin.dynamicops.VcacPluginFactory$ 2.call(VcacPluginFactory.java:227)

    to com.vmware.o11n.plugin.dynamicops.VcacPluginFactory$ 2.call(VcacPluginFactory.java:224)

    at com.vmware.o11n.plugin.sdk.spring.AbstractSpringPluginFactory.doInCurrent(AbstractSpringPluginFactory.java:193)

    at com.vmware.o11n.plugin.dynamicops.VcacPluginFactory.afterInitialized(VcacPluginFactory.java:224)

    at com.vmware.o11n.plugin.sdk.spring.AbstractSpringPluginAdaptor.createPluginFactory(AbstractSpringPluginAdaptor.java:74)

    at com.vmware.o11n.plugin.sdk.spring.AbstractSpringPluginAdaptor.createPluginFactory(AbstractSpringPluginAdaptor.java:30)

    to ch.dunes.vso.sdk.SDKDatasource$ 1.create(SDKDatasource.java:206)

    at ch.dunes.vso.sdk.PluginFactoryCreator.getPluginFactory(PluginFactoryCreator.java:30)

    at ch.dunes.vso.sdk.SDKDatasourceInvoker.getPluginFactory(SDKDatasourceInvoker.java:181)

    at ch.dunes.vso.sdk.SDKDatasourceInvoker.fetchRelation(SDKDatasourceInvoker.java:62)

    at ch.dunes.vso.sdk.SDKFinder.fetchRelation(SDKFinder.java:324)

    at ch.dunes.vso.sdk.SDKFinder._findRelation(SDKFinder.java:298)

    at ch.dunes.vso.sdk.SDKFinder.findRelation(SDKFinder.java:219)

    at ch.dunes.vso.sdk.ModulesFactory.findRelation(ModulesFactory.java:520)

    at com.vmware.o11n.sdk.EnhancedScriptingSDK.findRelation(EnhancedScriptingSDK.java:99)

    at com.vmware.o11n.service.sdk.SdkModuleServiceImpl.findRelation(SdkModuleServiceImpl.java:57)

    at com.vmware.o11n.service.factory.VcoFactoryFacade.findRelation(VcoFactoryFacade.java:1602)

    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke (unknown Source)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke (unknown Source)

    at java.lang.reflect.Method.invoke (unknown Source)

    at com.vmware.o11n.service.security.AccessRightsInterceptor.invoke(AccessRightsInterceptor.java:92)

    at com.vmware.o11n.service.security.AccessRightsInterceptor.invoke(AccessRightsInterceptor.java:83)

    at com.vmware.o11n.service.webremoting.VcoDelegatingWebFacade.invokeOperation(VcoDelegatingWebFacade.java:106)

    at com.vmware.o11n.integration.initialization.VcoFactoryServiceFacadeProxy.invokeOperation(VcoFactoryServiceFacadeProxy.java:86)

    at sun.reflect.GeneratedMethodAccessor110.invoke (unknown Source)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke (unknown Source)

    at java.lang.reflect.Method.invoke (unknown Source)

    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:319)

    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:196)

    to com.sun.proxy. $Proxy104.invokeOperation (unknown Source)

    at sun.reflect.GeneratedMethodAccessor109.invoke (unknown Source)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke (unknown Source)

    at java.lang.reflect.Method.invoke (unknown Source)

    at org.springframework.remoting.support.RemoteInvocation.invoke(RemoteInvocation.java:205)

    at org.springframework.remoting.support.DefaultRemoteInvocationExecutor.invoke(DefaultRemoteInvocationExecutor.java:38)

    at org.springframework.remoting.support.RemoteInvocationBasedExporter.invoke(RemoteInvocationBasedExporter.java:78)

    at org.springframework.remoting.support.RemoteInvocationBasedExporter.invokeAndCreateResult(RemoteInvocationBasedExporter.java:114)

    at org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter.handleRequest(HttpInvokerServiceExporter.java:73)

    at org.springframework.web.context.support.HttpRequestHandlerServlet.service(HttpRequestHandlerServlet.java:67)

    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)

    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)

    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

    at net.sf.ehcache.constructs.web.filter.GzipFilter.doFilter(GzipFilter.java:95)

    at net.sf.ehcache.constructs.web.filter.Filter.doFilter(Filter.java:86)

    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)

    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)

    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)

    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:581)

    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)

    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)

    at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:680)

    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)

    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)

    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)

    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)

    to org.apache.coyote.AbstractProtocol$ AbstractConnectionHandler.process (AbstractProtocol.java:585)

    to org.apache.tomcat.util.net.JIoEndpoint$ SocketProcessor.run (JIoEndpoint.java:312)

    at java.util.concurrent.ThreadPoolExecutor.runWorker (unknown Source)

    to java.util.concurrent.ThreadPoolExecutor$ Worker.run (unknown Source)

    at java.lang.Thread.run (unknown Source)

    Caused by: org.xmlpull.v1.XmlPullParserException: only content allowed before the start tag and not I (position: START_DOCUMENT view... @ 1:1)

    at org.xmlpull.mxp1.MXParser.parseProlog(MXParser.java:1519)

    at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1395)

    at org.xmlpull.mxp1.MXParser.next(MXParser.java:1093)

    at com.thoughtworks.xstream.io.xml.XppReader.pullNextEvent(XppReader.java:109)

    ... more than 74

    2014-09-19 12:50:00.978 - 0400 [http-bio-142.42.194.85-8281-exec-4] DEBUG {} [VSOFactoryClient] disconnect from the server

    2014-09-19 12:50:00.991 - 0400 [http-bio-142.42.194.85-8281-exec-4] DEBUG {} [SDKDatasource] try to delete a SDK session that does not exist

    2014 09-19 12:51:04.757 - 0400 [http-bio-142.42.194.85-8281-exec-3] {} [VcoDelegatingWebFacade] Server error ERROR...

    ch.dunes.model.sdk.SDKFinderException: cannot run 'fetchRelation' to type: virtualFolder_VirtualMachines: java.lang.RuntimeException:

    at ch.dunes.vso.sdk.SDKFinder.fetchRelation(SDKFinder.java:334)

    at ch.dunes.vso.sdk.SDKFinder._findRelation(SDKFinder.java:298)

    at ch.dunes.vso.sdk.SDKFinder.findRelation(SDKFinder.java:219)

    at ch.dunes.vso.sdk.ModulesFactory.findRelation(ModulesFactory.java:520)

    at com.vmware.o11n.sdk.EnhancedScriptingSDK.findRelation(EnhancedScriptingSDK.java:99)

    at com.vmware.o11n.service.sdk.SdkModuleServiceImpl.findRelation(SdkModuleServiceImpl.java:57)

    at com.vmware.o11n.service.factory.VcoFactoryFacade.findRelation(VcoFactoryFacade.java:1602)

    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke (unknown Source)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke (unknown Source)

    at java.lang.reflect.Method.invoke (unknown Source)

    at com.vmware.o11n.service.security.AccessRightsInterceptor.invoke(AccessRightsInterceptor.java:92)

    at com.vmware.o11n.service.security.AccessRightsInterceptor.invoke(AccessRightsInterceptor.java:83)

    at com.vmware.o11n.service.webremoting.VcoDelegatingWebFacade.invokeOperation(VcoDelegatingWebFacade.java:106)

    at com.vmware.o11n.integration.initialization.VcoFactoryServiceFacadeProxy.invokeOperation(VcoFactoryServiceFacadeProxy.java:86)

    at sun.reflect.GeneratedMethodAccessor110.invoke (unknown Source)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke (unknown Source)

    at java.lang.reflect.Method.invoke (unknown Source)

    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:319)

    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:196)

    to com.sun.proxy. $Proxy104.invokeOperation (unknown Source)

    at sun.reflect.GeneratedMethodAccessor109.invoke (unknown Source)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke (unknown Source)

    at java.lang.reflect.Method.invoke (unknown Source)

    at org.springframework.remoting.support.RemoteInvocation.invoke(RemoteInvocation.java:205)

    at org.springframework.remoting.support.DefaultRemoteInvocationExecutor.invoke(DefaultRemoteInvocationExecutor.java:38)

    at org.springframework.remoting.support.RemoteInvocationBasedExporter.invoke(RemoteInvocationBasedExporter.java:78)

    at org.springframework.remoting.support.RemoteInvocationBasedExporter.invokeAndCreateResult(RemoteInvocationBasedExporter.java:114)

    at org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter.handleRequest(HttpInvokerServiceExporter.java:73)

    at org.springframework.web.context.support.HttpRequestHandlerServlet.service(HttpRequestHandlerServlet.java:67)

    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)

    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)

    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

    at net.sf.ehcache.constructs.web.filter.GzipFilter.doFilter(GzipFilter.java:95)

    at net.sf.ehcache.constructs.web.filter.Filter.doFilter(Filter.java:86)

    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)

    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)

    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)

    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:581)

    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)

    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)

    at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:680)

    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)

    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)

    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)

    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)

    to org.apache.coyote.AbstractProtocol$ AbstractConnectionHandler.process (AbstractProtocol.java:585)

    to org.apache.tomcat.util.net.JIoEndpoint$ SocketProcessor.run (JIoEndpoint.java:312)

    at java.util.concurrent.ThreadPoolExecutor.runWorker (unknown Source)

    to java.util.concurrent.ThreadPoolExecutor$ Worker.run (unknown Source)

    at java.lang.Thread.run (unknown Source)

    2014 09-19 12:51:04.759 - 0400 [http-bio-142.42.194.85-8281-exec-3] {} [VcoFactoryServiceFacadeProxy] ch.dunes.util.DunesServerException ERROR: cannot run 'fetchRelation' to type: virtualFolder_VirtualMachines: java.lang.RuntimeException:

    You have an idea why this might happen? Thanks for your help!

    This is resolved. If the IaaS vCAC server is unresponsive or hangs, it is the trace of the stack as we. Maybe some better "timeout" messages can be sent from the plug-in?

  • VirtualMachine.Admin.Name and asking the user for the name of the server

    I need to allow end users to designate the name of their server requested when you submit a request through VCAC. I do this using VirtualMachine.Admin.Name in the custom of my blueprint properties and it prompts the user to set.  I have also some scripts that run with the heel of building put into operation once the server is built which require me to enter the VC:VirtualMachine object for the server with the name of the server.  It does this in a loop in a table of all the VC:VirtualMachines met my VCenter server and find a match on the name with an xpath expression.  The name of the server is collected inside the cutting-edge designer using the getVirtualMachineName activity.  This activity is integrated into the designer and aims to do exactly what he says.  He then handed the name in the VCO workflow.  Not much, really.  I have used this method a lot in the past with VCAC.

    Problem:


    Recently, I started running this script on a new installation of VCO (5.5.1) and the new instance VCAC (version 6.0 - 1720522) and I see a very strange behavior.  When I get the name in the tip with the activity of getVirtualMachineName Designer, the name is that name WOULD have been affected had I pressed VCAC to automatically generate name for me using a prefix of machine profile.  Remember that you must associate a prefix of the default machine on your group of companies.  This is the prefix that is used to generate the name and associate it to the server in VCAC despite the fact that I am more precisely the substitution of this name automatically generated with the VirtualMachine.Admin.Name custom property in the custom of my blueprint properties.

    The strange thing is that the server is correctly named in the VSphere console and inside the guest OS.  In other words, the name that the user places in the VirtualMachine.Admin.Name field is what you get in the console VSphere and BONES.  So that part works.  Then why is he not being correctly named in the VCAC VirtualMachine object?

    EC which claimant misnamed is originally my workflow to fail.  I can work around this problem in the workflow, but I fear that there is still problems on the road if the alias is associated with the server inside VCAC himself.

    Once again, I did this with earlier versions of VCAC and VCO and not had this problem.  Anyone else seeing this?  I'm doing something wrong here?

    The custom property to use to allow a user to enter name themselves is the host name (just hostname, nothing else)... That's what I put to prompt the user to our forms.

  • Call virtualmachine. ShutdownGuest for "SLACK-14" on ESXi object ' ' failed

    I need to install a vm with 14 Slack, install vmware tools with standard of the functions vmsync, mercurihectopascalometer and other procedures.

    But when I try to do a guest virtual machine soft stop, the following message is displayed:

    Call virtualmachine. ShutdownGuest for "SLACK-14" on ESXi '192.168.0.1' object failed

    The request to reset the virtual machine failed because the script corresponding VMware Tools have not run successfully.

    If you have configured a custom script reset this virtual machine, make sure that it contains no errors.

    Try again the operation will ignore the script to fail. You can also submit a support request to report this problem.

    But if you try again, the closing is done

    Could someone help

    Hi rubensinfo,

    It seems that the poweroff on your VM Slack script does not work correctly. Whenever a VM engine is requested from the user interface, a corresponding script is executed inside the guest OS. These scripts can be found in /etc/vmware-tools /. The transaction for example would use the shutdown script poweroff-vm-default. If this command is unable to run properly, the operation will fail. You should have something similar to the following in the vmware.log of your SLACK-14 virtual machine.

    "[msg.tools.rebootFailed] the request to reset this virtual machine failed because the corresponding VMware Tools script did not run successfully. If you have configured a custom script reset this virtual machine, make sure that it contains no errors. Try again the operation will ignore the script to fail. You can also submit submit a support request to report this problem. »

    A quick check on my configuration reveals that the script cannot run because he complains that "ifup" command is not available. Indeed, the command is not available in my VM. See below:

    root @: / etc/vmware-tools #. / poweroff-vm-default
    Thu Sep 4 22:35:01 IST 2014: execution '. "/ poweroff-vm-default"
    Thu Sep 4 22:35:01 IST 2014: execution '. "/ scripts/vmware/network"

    Sep 04 22:35:01 network: ifup not in the search path.

    I think that your problem will be solved if you can run the script successfully in an autonomous way (from the bash prompt).

  • vCAC vCO plugin - get vCACCAFECsResourceType for resource type internal 'IaaS VC VirtualMachine' in the workflow?

    HI -.

    I'm in vCO using the 6.0.1 plugin vCO for vCAC, trying to create a resource vCAC action ADS face a VC:VirtualMachine. When I manually register my process of action in the UI vCAC, he finds the parameter of VC:VirtualMachine and maps to a resource type 'IaaS VC VirtualMachine', and action shows and works against the VMS selected in the user interface elements vCAC.

    Now, in a workflow to create the action for the resource, I try to use createResourceActionFromWorkflow() from the package com.vmware.library.vcaccafe.asd.resourceaction , which requires a vCACCAFECsResourceType (i.e. VCACCAFE:CustomResource) object. I would like to point to the same resource type "Infrastructure.Virtual" that uses the vCAC UI, but I can't seem to find in a safe way.

    If I get a VCACCAFE:ResourceAction created previously and look at his getInputParameter () .getResourceType () in a workflow, I can see an object that looks like:

    [2014-08-11 16:14:50.094] [I] type.id = eaba1f37-6154-4 ch. 17-94ae-ea419cb9e14e

    [2014-08-11 16:14:50.095] [I] type.name = IaaS VC VirtualMachine

    [2014-08-11 16:14:50.095] [I] type.externalTypeId = Infrastructure.Virtual

    [2014-08-11 16:14:50.095] [I] type.vcoType = VC:VirtualMachine

    [2014-08-11 16:14:50.095] [I] type.vcoId = null

    [2014-08-11 16:14:50.095] [I] type.providerId = asd.external

    [2014-08-11 16:14:50.096] [I] type.tenantId = _internal

    and if I make a new vCACCAFECsResourceType() and manually set the values (especially the id) in this object and use it in createResourceActionFromWorkflow(), it works. But he feels unsure and hardcode the type.id in my workflow - is that work on the other vCAC installs?

    Also, I was to get the corresponding vCACCAFEResourceType via:


    vCACCAFEHost.createAdvancedDesignerClient () .getAdvancedDesignerCsResourceTypeService () .getResourceType ('_internal', 'Infrastructure.Virtual');

    but it's a different object class and I do not see how to get the vCACCAFECsResourceTypecorrespondent.

    I also tried to do a com.vmware.library.vcaccafe.asd.customresources.createCustomResourceFromInventoryType ("VC:VirtualMachine"), then using this vCACCAFECsResourceType to create the resource action. It creates and publishes very well, but the action never shows in the vCAC UI (using the same rights as when using Infrastructure.Virtual).

    Any ideas? Thank you

    Greg

    This turns out to be just a question in 6.0.

    When I switched to 6.1, the entries in the 'Resources mappings' tab in the show of the interface user upward into the folder "ASD Custom Resources" in the inventory of the vCACCAFEHost and vCACCAFEEntitiesFinder.findCustomResources (host), returns with the mapped to 'VC:VirtualMachine' have good guid. This same method in 6.0 returns an empty array.

  • vCAC 6 WFStubBuildingMachine not find vCAC:VirtualMachine?

    When WFStubBuildingMAchine workflows or available to the vCAC kickoff, in the 'variables' tab on the right pane, it indicates that the type 'vCAC:VirtualMachine' is "not found." It lists the vCAC:Entity and the vcac:vcachost. I need this to be found so I can pull properties directly from the virtual machine such as OS type... This is shown/found during these workflows?

    I thought about it. It is not "hostname". That's what you would put in the field of the custom property in vcac, but this isn't what you put the JS code... go figure?

    The code to get the name of the machine during destroy/dcommissioning is:

    vmName var = vcacEntity.getProperty ("VirtualMachineName");

    See you soon

  • Getting the data center of VirtualMachine with Get-View information

    Hello

    Y at - it a faster way to get the name of data using Get-View and the viewtype VirtualMachine Center.

    I found the following:

    Get-View -ViewType VirtualMachine -filter @{ "name" = "mtl1fsit02" } | Select-Object -Property Name,

    @{ Label = "GuestOSName"; Expression = { $_.summary.guest.guestfullname } },

    @{ Label = "Datacenter"; Expression = { (Get-view (Get-View (Get-view $_.parent).parent).Parent).name } }

    Thank you guys

    I think that the property calculated for the data center does not work in all situations.

    It assumes that your virtual machines are 3 levels down from the data center, which is not always the case.

    I personally use a loop, passing up through the parents, until he finds an object data center.

    something like that

    @{N = 'Center'; E = {}

    $parentObj = get-view $_. Parent

    While ($parentObj - isnot [VMware.Vim.Datacenter]({))

    $parentObj = get-view $parentObj.Parent

    }

    $parentObj.Name

    }

  • Get the vCAC:VCACHost of the vCAC:VirtualMachine

    I don't know if I'm just being dense and missing something obvious, but it doesn't seem like the vCAC:VirtualMachine object has no way to enter the vCAC:VCACHost delegate.  I created an action that I think should work for most objects.  In a similar way to vCD, I had assumed that most of the objects would have a .parent attribute or a function to get the host.  At the moment I can't imagine we ever have more than one vCACHost in a vCO to be honest, but you know how it goes.  I wrote this action to return to the vCAC:VCACHost, but if there is a way more easy/better please let me know.

    If (vCACVm! = null) {}

    var vmParentId = vCACVm.getEntity () .hostId;

    var host = Server.findAllForType ("vCAC:VCACHost");

    System.log ("number of vCACHosts found:" + hosts.length);

    {if (hosts)}

    for each {(host var in hosts)

    System.log ("Comparing hostId:" + host.id + "-VM managed by id:" + vmParentId);

    If (host.id == vmParentId) {}

    System.log ("looks at" + host.displayName + "is a game!");

    Back home;

    }

    }

    }

    }

    Hi Paul,.

    Your action works. It could be reduced to:

    host = Server.findForType("vCAC:VCACHost", vCACVm.getEntity().hostId);
    

    Christophe.

  • VCO 5.5 - How can I sort a table / VC:VirtualMachine resource pool?

    Hello

    I want to sort a VM of their resource pool table.

    I tried a few things from various research but none of them does not seem to work, but I can't find a lot of reference material.

    where WindowsVMs is an array / VC:VirtualMachine

    WindowsVMs = WindowsVMs.sort (sortVMs);

    I tried these two functions, I also tried the same thing with the name of the virtual machine as a sorting criterion. Doesn't seem to work and the System.log does not create an entry.


    function sortVMs(a,b) {}
    return (a.resourcePool.name > b.resourcePool.name);
    System.log ("0");
    }

    function sortVMs(a,b) {}
    var vmA = a.resourcePool.name.toLowerCase ();
    var vmB = a.resourcePool.name.toLowerCase ();

    If (vmA < vmB) {string ascending //sort
    Returns - 1
    System.log ("1a < B");
    }
    If (vmA > vmB) {}
    Returns 1
    System.log ("1a > B ');
    }

    Returns the return value 0 //default (no sorting)
    System.log ("0");
    }


    Any thoughts?

    Concerning

    Mark

    I have managed to get this to work using this function

    function sortVMs(a,b) {}

    If (a.resourcePool.name == b.resourcePool.name) {}

    return 0;

    } ElseIf (a.resourcePool.name > b.resourcePool.name) {}

    Return 1;

    }

    Returns - 1;

    }

  • ESXi host object VirtualMachine information draft

    Hi all

    You do not know if this is the right forum or not, but I'm going to pull all the host information for a VM instance selected in c#.

    For example, I have the following code:

    IList<VMware.Vim.EntityViewBase> vms = vmwareClient.FindEntityViews(typeof(VMware.Vim.VirtualMachine), null, null, null);

    foreach (VMware.Vim.EntityViewBase tmp in vms) {
    VMware.Vim.VirtualMachine vm = (VMware.Vim.VirtualMachine)tmp;
    }

    I understand that the vm is a VirtualMachine type, but I'm also keen to refer to values provided in HostSystem object type.

    How to enumerate an object of HostSystem making reference to my VirtualMachine object?  The reasoning in the research the host of the object information VirtualMachine is that if I pull the list of virtual machines from one instance of vCenter, the virtual machine may refer to another host.

    Thanks in advance!

    -ToTheCloud

    Hi ToTheCloud,

    In order to solve the HostSystem who is responsible to perform a VirtualMachine I suggest property path: VM.runtime.host

    Hope this is what you are looking for.

    --

    Thomas G.

Maybe you are looking for