Create Resource Pool c# Web Services SDK

Hello

I then starting in this area and I seriously need help.

Can anyone help/provide code me by creating a resourcepool? and by creating a new folder under a resourcepool?...

Thank you... Thank you

Shim

Check out this script: createResourcepool.pl

You can certainly add the logic required to even create the folder before the list of resources, etc... but this should give you an example on how to create a resource pool.

=========================================================================

William Lam

VMware vExpert 2009

Scripts for VMware ESX/ESXi and resources at: http://engineering.ucsb.edu/~duonglt/vmware/

Twitter: @lamw

repository scripts vGhetto

Introduction to the vMA (tips/tricks)

Getting started with vSphere SDK for Perl

VMware Code Central - Scripts/code samples for developers and administrators

150 VMware developer

If you find this information useful, please give points to "correct" or "useful".

Tags: VMware

Similar Questions

  • Which server to connect to with Web Services SDK?

    Is there a way to know which server to connect to when using Web Services SDK?  It must be the ESX Server virtual machine is on, I guess.  But a customer pretends that we are connect to its server vCenter Server, which I do not think that was possible. I tried to call one of the SDK sample and connect to my vCenter server, but it didn't connect. I had to connect to my server ESX or vSphere.

    We use them vSphere 4.0

    The only api vSphere is available on (i) ESX and vCenter, some things will be available on one or the other, for example, cloning is a feature of vCenter and there will be APIs that is available only when connecting to vCenter. Depending on what you're trying to run, you can be able to obtain the information by using two systems, such as the search for a virtual machine. If you manage only a single host, it is pretty trivial, but if you manage more than 20 + guests and you have vCenter, then you probably want to use vCenter.

    I don't think you understand clearly the operation of the vSphere API and what is worrying, it is that you meet your customers to run a script unknown in which they or you understand. I think that I have answered some of your questions in the past, to reiterate that if you are new to the VMware/SDK API, I would recommend that you completely cross the following document - Getting Started with vSphere SDK - Update for SDK 4.1 release

    =========================================================================

    William Lam

    VMware vExpert 2009,2010

    VMware VCP3, 4

    VMware VCAP4-DCA

    VMware scripts and resources at: http://www.virtuallyghetto.com/

    Twitter: @lamw

    repository scripts vGhetto

    Introduction to the vMA (tips/tricks)

    Getting started with vSphere SDK for Perl

    VMware Code Central - Scripts/code samples for developers and administrators

    VMware developer community

    If you find this information useful, please give points to "correct" or "useful".

  • What is the difference between "vShpere SDK ro Perl"and "vSphere Web Services SDK (for Java or c#)"?

    Hello world! I'm new to "VMware vSphere API", and I have a question to ask you to help:

    What is the difference between "vShpere SDK ro Perl"and "vSphere Web Services SDK (for Java or c#)"?

    -What are the different programming language? Is there another difference?

    I'm looking forward to your reply.

    Thank you!

    If you are new on the VMware API/SDK, highly recommend you take a look at the following: Getting Started with vSphere SDK - Update for SDK 4.1 release

    vSphere SDK for Perl is just one of the many client SDK for vSphere API that is flush with vcenter times and ESX (i) as a standard Web service.

    vSphere SDK for Java - SDK Java to vSphere API for Java developers

    vSphere SDK for Perl - Perl SDK for vSphere API for Perl developers

    vSphere SDK for c# - c# SDK for vSphere API for c# developers

    PowerCLI - PowerShell SDK for vSphere API for developers of Powershell

    I hope that makes a bit more sense

    =========================================================================

    William Lam

    VMware vExpert 2009,2010

    VMware VCP3, 4

    VMware VCAP4-DCA

    VMware scripts and resources at: http://www.virtuallyghetto.com/

    Twitter: @lamw

    repository scripts vGhetto

    Introduction to the vMA (tips/tricks)

    Getting started with vSphere SDK for Perl

    VMware Code Central - Scripts/code samples for developers and administrators

    VMware developer community

    If you find this information useful, please give points to "correct" or "useful".

  • With regard to the use of the web service sdk web client SDK

    Hello

    I could run the java program of the Web SDK service, independently, but how what I call web client SDK.

    Because it requires changes in environmental variables (AXIS, WBEM vars etc.) and what are all the eclipse changes required to do this?

    Help, please. Also, if you could suggest any web client sdk sample, call web service sdk, it would be a great help.

    Thank you!

    It's covered in the SDK samples, see docs/samples-doc/vsphereviews.html#vsphere-ui and samples/vsphereviews/vsphere-wssdk-provider

  • The implementation of RunProgramInGuest of VIX using the vSphere Web Services SDK?

    Hello

    A few months ago I developed a python API for VIX, but as I needed to extend the functionality of this API (performance monitoring, host management, etc.) I moved the vSphere Web Services SDK.

    However, I did find a way to implement some comments VIX as LoginInGuest or RunProgramInGuest functions using only the Web Services SDK.

    Is there a way to do this? I thought that each function VIX has been translated internally to a soap request, but now I think that is not the case for these functions of comments, if so, how VIX inwardly does them?

    Thanks for your help!

    Sebastian Tello

    Currently, if you must implement specific comments operations running a specific script/application or by connecting to a guest, you must use the VIX API. This feature is not currently exposed in the vSphere API, you will need to use a combination of both, until VMware them integrates in the vSphere API core. For more details on the future of VIX, take a look at this blog post - http://www.virtuallyghetto.com/2010/11/what-is-vmware-vix-api-and-its-future.html

  • Specific VirtualMachine counters through the Web Services SDK

    Hello

    I'm developing a monitorapp in c# with the web services SDK.

    I am able to get a list of all the performance with the PerformanceManager counters.

    ObjectContent [oCont] is getPropertyContent ("PerformanceManager", "perfCounter", _serviceContent.perfManager);.

    I ask this directly to an ESX 4.

    The answer I'll be of return contains all of the available counters, but there is no division between the host and the virtual-counter Machine.

    For example, cpu.utilization is available for the host and not a VM.

    Is it possible to know somehow what counters are specific to vm?

    I am able to get object references managed virtual machines if that's any help...

    Thanks in advance!

    Glenn

    Hi Glenn,.

    The property "perfCounter" PerformanceManager fetch all of the counters that are available in the host or vCenter. It provides no mechanism to filter counters. In order to obtain the available counters specific to a managed entity (VM, host, etc.) you must use the QueryAvailablePerfMetric method. Calling this method against MOR of the virtual machine, you will get all the ID counter for this virtual machine.

    http://www.VMware.com/support/developer/VC-SDK/visdk41pubs/ApiReference/Vim.PerformanceManager.html#queryAvailableMetric

    I hope this helps!

    Neha

  • vSphere: VI vs Web Services SDK Toolkit

    I'm looking in the development of some tools to automate my vSphere infrastructure. I intend to write code using c# and the code could potentially be placed in Windows forms, web services, etc..

    I downloaded the .NET SDK for vSphere web service and it seems to be rather too complicated to perform simple tasks like comments to restart. I also found the kit of development .NET for the VI (VMware.vim) Toolkit, which looks much simpler to use.

    Y at - there a lot of difference between the two software development kits? There that all define the reasons for choosing one over the other?

    Any help would be greatly appreciated.

    VI Toolkit 1.5: target platform: vSphere 4.0 and above, VMware Infrastructure 3.x and higher.

    Web Services SDK: target platform: 4.0 and VMware Infrastructure 3.X vSphere

    ---

    iSCSI SAN software

    http://www.starwindsoftware.com

  • Create new folder (CreateFolder method) Web Services SDK c#

    Hello

    Having problems in my code below. Someone help me, I really am lost, do not know what to do do.just a newbie... Here is the error.

    Thank you thank you

    Shim

    __________________________________________

    Stack trace:

    [SoapException]
       System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) +431678
       System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +204
       Vim25Api.VimService.CreateFolder(ManagedObjectReference _this, String name) +123
       Nimbus.VirtualCenter.Folder.Create(String url, String usid, String pwd) in D:\projects\nimbus\sourcecode\v1\Nimbus\Nimbus.VirtualCenter\Folder.cs:40
       Nimbus.UserPage.Elementpage.TreeView.btnCreateFolder_Click(Object sender, EventArgs e) in D:\projects\nimbus\sourcecode\v1\Nimbus\Nimbus\TreeView.aspx.cs:143
       System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111
       System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110
       System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
       System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
       System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565
    

    ____________________________________________

    public class folder

    {

    public static VimService _service;

    protected ManagedObjectReference _svcRef;

    protected ServiceContent _sic;

    private UserSession _session;

    Public Sub Create (string url, string usid, string pwd) / /, string dcName)

    {

    String datacenterName = dcName; name of the data center

    System.Net.ServicePointManager.CertificatePolicy = new CertPolicy();

    Vim25Api.ManagedObjectReference _svcRef = new ManagedObjectReference();

    Gets the content of the service

    _svcRef.Type = "ServiceInstance."

    _svcRef.value = "ServiceInstance."

    _Service = new VimService();

    _Service. URL = url;

    _Service. CookieContainer = new CookieContainer();

    Console.WriteLine ("before call:" + System.DateTime.Now.ToString ());

    _Sic = service . RetrieveServiceContent (svcRef);

    Console.WriteLine ("after call:" + System.DateTime.Now.ToString ());

    _SESSION = service. Login (sic.sessionManager, usid, pwd, null);

    service. CreateFolder (svcRef, "sample");

    }

    }

    The CreateFolder() method must be called from the vmFolder (VM/model display) or hostFolder (cluster host/view). You must first get a reference to the specific data center, you want to create the folder and then from there, you can get access to vmFolder or hostFolder as seen from managed object data center: http://www.vmware.com/support/developer/vc-sdk/visdk400pubs/ReferenceGuide/vim.Datacenter.html

    =========================================================================

    William Lam

    VMware vExpert 2009

    Scripts for VMware ESX/ESXi and resources at: http://engineering.ucsb.edu/~duonglt/vmware/

    Twitter: @lamw

    repository scripts vGhetto

    Introduction to the vMA (tips/tricks)

    Getting started with vSphere SDK for Perl

    VMware Code Central - Scripts/code samples for developers and administrators

    150 VMware developer

    If you find this information useful, please give points to "correct" or "useful".

  • Tips for creating an application with web services please?

    I created a simple application for a client who interacts / monitors a device VISA with LV 2009.  The architecture is essentially a state machine with a timeout for VISA calls that retrieve the current state.

    The client asked that the app will also be controlled via the web and asked me to set up a demo with one or two simple functions.  I have the experience to bring charges against the Server Web LV7 model, but not with web services.

    So here's what I did...

    (1) added a line to my application that would inject actions in the state machine.

    (2) created a simple VI pushes these actions in the queue and plans to use it as the Web Service.

    And then I followed the examples for Web Services, thinking that the Web server is running in the same program as the development environment, such as the version LV7.  This doesn't seem to work.

    Could someone give me a quick overview on how best to do that, or to report an article?  I have simple working WS, but here are a few questions...

    @ Jed Davidow:

    We met this difficulty with our web app (LV 2009) as well.  Because now we feel the solution the easiest way is to activate the VI server in your main application (EXE) VI and place calls to its hierarchy of web services in the open Application > VI Open > call by Ref > close VI > structure to close the Application.

    Although we try to minimize the use of the present in web services, it makes sense for some resources shared and accessible throughout the world as references to database, configuration globals, etc.

    I also note that there seems to be an instability that we have not been able to identify which may (or not) be attributed to the use of this technique.  The symptom is LabVIEW from memory immediately at some point.

    I am currently looking into migration towards 2010 LV, and it seems that the same constraints between instances of the application are in place.  I expect that, but I was expecting some more simplified with the next version of LV interprocess communication methods.

    --

    James

  • Is it possible to set configuration options VMsafe via vSphere Web Service SDK?

    Is it possible to define VMsafe configuration options via the web service of vSphere SDK?

    I noticed that the options in question are 'OptionValue's contained in the property config.extraConfig of the virtual machine, so I tried to edit them using the method ReconfigVM_Task of the SOAP API.

    This fails however, even if the SOAP request appears to be valid:

    & lt;? XML version = "1.0"? & gt;

    " & lt; env:Envelope xmlns:env = ' http://schemas.xmlsoap.org/SOAP/envelope/ "& gt; .

    & lt; env:header / & gt;

    & lt; env:body & gt;

    & lt; N1:ReconfigVM_Task xmlns:n1 = "urn: vim25" & gt;

    & lt; N1:_this type = 'VirtualMachine' & gt; VM - 448 & lt; / n1:_this & gt;

    & lt; N1:spec xsi: type = "VirtualMachineConfigSpec" & gt;

    & lt; N1:extraConfig xsi: type = "n1:OptionValue" & gt;

    & lt; N1:key & gt; vmsafe.enable & lt; / n1:key & gt;

    & lt; N1: value & gt; FAKE & lt; / n1: value & gt;

    & lt; / n1:extraConfig & gt;

    & lt; / n1:spec & gt;

    & lt; / n1:ReconfigVM_Task & gt;

    & lt; / env:Body & gt;

    & lt; / env:Envelope & gt;

    This query generates the following error:

    & lt;? XML version = "1.0" encoding = "UTF-8"? & gt;

    " & lt; soapenv:Envelope xmlns:soapenc = ' http://schemas.xmlsoap.org/SOAP/encoding/ "xmlns:soapenv =" " http://schemas.xmlsoap.org/SOAP/envelope/ "container =" " http://www.w3.org/2001/XMLSchema "" xmlns: xsi = " " http://www.w3.org/2001/XMLSchema-instance "& gt; .

    & lt; soapenv:body & gt;

    & lt; soapenv:fault & gt; & lt; faultcode & gt; ServerFaultCode & lt; / faultcode & gt; & lt; faultstring & gt; invalid argument: value & lt; / faultstring & gt; & lt; retail & gt; & lt; InvalidRequestFault xmlns = "urn: vim25" xsi: type = "InvalidRequest" / & gt; & lt; / detail & gt; & lt; / soapenv:Fault & gt;

    & lt; / soapenv:Body & gt;

    & lt; / soapenv:Envelope & gt;

    For help in resolving this issue will be greatly appreciated.

    I'm glad it worked! Don't forget awareness useful or correct points

    =========================================================================

    William Lam

    VMware vExpert 2009

    Scripts for VMware ESX/ESXi and resources at: http://engineering.ucsb.edu/~duonglt/vmware/

    repository scripts vGhetto

    VMware Code Central - Scripts/code samples for developers and administrators

    http://Twitter.com/lamw

    If you find this information useful, please give points to "correct" or "useful".

  • Creating new XML Db Web Service

    Hi all

    I need to create a new webservice XML DB. I followed below the oracle documentation and could create the service. But when I tired to run the XQuery, to get information about the service, I just added.
    (1) I could see only a part of the production.
    (2) I must add this output to 'xdbconfig.xml '. But I don't see this file on my database server.

    I'm sure the XDB is configured on this database. I don't see by following the lines in the alertlog, when we bounced the database recently, which confirms that the XDB is configured.

    Mar 29 17:53:17 Nov 2011
    XDB installed.
    XDB initialized.
    Mar 29 17:53:43 Nov 2011

    Not sure what happened to the xdbconfig.xml. Please find below the command I used to create the Web Service and XQUERY.

    DECLARE
    SERVLET_NAME VARCHAR2 (32): = "WDD_XML";
    BEGIN
    DBMS_XDB.deleteServletMapping (SERVLET_NAME);
    DBMS_XDB.deleteServlet (SERVLET_NAME);
    DBMS_XDB.addServlet (NAME = > SERVLET_NAME,)
    LANGUAGE = > 'C ',.
    DISPNAME = > 'Oracle query Web Service.
    DESCRIPT = > 'Servlet to make queries as a Web Service. "
    SCHEMA = > "XDB");
    DBMS_XDB.addServletSecRole (SERVNAME = > SERVLET_NAME,)
    ROLENAME = > "XDB_WEBSERVICES"
    ROLELINK = > 'XDB_WEBSERVICES');
    DBMS_XDB.addServletMapping (TEMPLATE = > ' / WDD_XML / *',)
    NAME = > SERVLET_NAME);
    END;
    /

    XQUERY declare default element namespace "http://xmlns.oracle.com/xdb/xdbconfig.xsd";
    for $doc in fn:doc("/xdbconfig.xml")/xdbconfig/sysconfig/protocolconfig/httpconfig.
    webappconfig/servletconfig/servlet-list/servlet [servlet-name = "WDD_XML"]
    return $doc
    /


    http://docs.Oracle.com/CD/B28359_01/AppDev.111/b28369/xdb_web_services.htm


    Thank you
    WIYI.

    Sorry, I'm a newbie to the concept of XML DB

    Then read the documentation from the beginning, at least:
    -l'intro: http://docs.oracle.com/cd/B28359_01/appdev.111/b28369/xdb01int.htm#i1047170
    -the part about the repository: http://docs.oracle.com/cd/B28359_01/appdev.111/b28369/xdb03usg.htm#BABEDIHI

    the docs that I'm making reference to said just edit the file xdbconfig.xml

    You just made.
    Procedure calls in the PL/SQL block that you ran changed the configuration file to enable native webservices.

  • Find / create / update using the Web service data command.

    Hello

    I'm working on PS2 (JDEV 11.1.1.3). One of the requirements is to build Web services from ADF pages. Initially the user connection is looking for items. The results would then be displayed as a read-only table. The user will select line clicks on the button "edit / update" then I need see the second page with the details of record selected as a form. Then he can add / edit the page. The same page is also used to 'create '. I am facing issue while the user selects the record in the table Details the research and passing the Id on the second page of the update of the. Can someone help / guide me.

    I went through the blog of Shay. http://blogs.Oracle.com/Shay/2010/05/updateinsert_with_adf_web_serv.html
    But it's different compared to my needs.

    Enjoy your entries.

    Thank you
    Mahesh

    I don't see exactly how have more fields influence the approach.
    If you are looking for a shortcut, you can try to drag the operation of fusion, as a form of parameter ADF - this will create all the fields for you. And then you will need to go in and change their value to point to the pageFlowScope object.

  • How to use two different versions of the stub of Web Services SDK files in a single project (5.5 and 6.0)

    Hello

    I have a project that uses the vSphere 5.5 management SDK (I built the stub files according to the documentation) and have these in my c# Solution. Everything works beautifully. My class files that interact with vSphere all have a use statement as follows:

    using Vim25Api;

    All fine so far.

    Now, I want to be able to provide support for a user to connect to vSphere 5.5 and 6.0 vSphere environments. I built the stub files for vSphere Management 6.0 SDK and those in my solution presented in a separate project. Each project is based on a different class library and I have each set of files for each version of vSphere stub in different NuGet packages. However, when I select to use a vSphere 5.5 connection, it seems that internally the 6.0 files stub are used, or vice versa.

    I tried to separate things out by giving the Vim25Service.dll and Vim25Service.XmlSerializers.dll files for each version of alias names (alias by default for all assemblies is "global", but I changed it to vSphere5 and vSphere6 for each version. Then at the top of each class file before all with what I'm doing:

    extern alias vSphere5;

    or

    extern alias vSphere6

    (According to what project I'm in). Then, use the using statement for each class file that interacts with vSphere using vSphere5::Vim25Api; or using vSphere6::Vim25Api; to use the files to correct/stub namespace for each version I support.

    However this still doesn't seem to work, and things seem to be getting confused upwards somehow. I take a guess that internal files make calls and somehow have crossed.

    Is it possible to use two stub version of vSphere together different files in the same project? How should I handle my script? I thought of just upgrading to use the version of vSphere 6 (I can always connect to vCenter 5.5 using these, but some of the properties on the object have changed, (for example some dynamic properties on AlarmObjects and other items have been removed and code breaks if I delete the references to the stub vSphere 5.5 files.) So, I want to keep two different versions and use each of them separately in the same solution, so I support vSphere 5.5 and vSphere 6.

    Solved - this using wsdl.exe and just by specifying a different namespace to use in the proxy class that is generated by using the /n switch.

    for example using PowerShell to build automatically, the value $VimApi and do:

    WSDL.exe/n:$ VimApi...

  • Using PL/SQL to create a Web Service?

    Hello world:

    I have a question, I have not found in the research of wire. The light went off in my head on SOA and weakly couples services... Perl farm there, c# shut up and PL/SQL Ranch right here and so on... all the outputs of product in XML format for common use. I know that we can query results PL/SQL in XML format with some effort, but I want to know is how completely (Stepwise A - Z) create a PL/SQL web service and SOA standard. So this piece of the pie I'm missing?

    Thank you

    Preston
    See you soon!

    You are looking for something like this?

    Web Services using native Oracle XML DB

  • Where to start with Web Services

    We run an ESXi 5 environment with a server for vSphere and are eager to develop a system to be able to create virtual machines.

    I came across the site of the developers of VMware and was very happy to find the vSphere Web Services SDK and wanted to know where to start?

    Y at - it software or settings that must be enabled on the vSphere server or ESXi hosts to allow the use of the SDK?  I downloaded the SDK and trying to connect and have had no success yet, and here the possibility that something is not missing on the server.

    Will there be sites level introduction, articles or tutorials on how to start using the SDK?

    I'd appreciate any help that anyone can provide.

    Thank you

    Matt

    Hi Matt,

    Everything you need to start is available here: http://www.vmware.com/support/developer/vc-sdk/

    It has links to:

    1. the developer's Guide

    2. the Program Guide

    3. the online API reference

    4. the download of the software development kit (if you have not already had it)

    The configuration guide for developers gives you all the steps to configure your system, and how to compile the examples. I suggest you review this first and get to the point where you can run the basic example of program that connects to the ESXi host and gets a few values.

    The configuration guide for developers is divided into separate sections for Java and c#. I'm using c# and the guide was in all on-site.

    The following document to read is the vSphere Web Services SDK Programming Guide - it will help you understand all of the concepts you need for programming with the SDK. The information is presented in a generic way, but samples lean towards Java. But not to worry because the SDK c# samples are many and it is easy to cross things between the Programming Guide and a reference sampling program. This guide is very large ~ 250 pages, but you don't need to read all this, chapters 2 to 5 are what I'm focused on - they are the absolute must know things for relying on web services SDK. What follows I'd say depends on what you need to do with the SDK. A very useful reference when reading the chapters 2 to 5 is the managed object (MOB) on your ESXi host browser. It is accessible at https://your-host-url/mob. You can search the managed objects and explore their hierarchy here.

    Once you understand, I dare say that you are able to start your own program with the help of the API reference of course. In fact you may have already tried poking around with a few lines of code by reading the guide just because it is useful to understand the concepts by testing them with code.

    Also nothing should be done on the server to start to use web services SDK.

Maybe you are looking for