Find the name of ref vm data center

Hello

When I get VmCreatedEvent I get new vm REF. During the recovery of new VMs property, I would find the 'name of the Datacenter". I'm not able to cross over from the VM to the data center. Can someone help me with this?

I'm more trying traversal (vSphere SDK for Java):

PropertySpec dcSpec = new PropertySpec();

dcSpec.setType ("data center");

dcSpec.setPathSet (new String() {"name"});

hostPropSpec.setAll (false);

SelectionSpec recurseParents = new SelectionSpec();
recurseParents.setName ("parent2parent");
TraversalSpec dcTraversalSpec = new TraversalSpec();
dcTraversalSpec.setType ("VirtualMachine");
dcTraversalSpec.setPath ("parent");
dcTraversalSpec.setName (recurseParents.getName ());
dcTraversalSpec.setSelectSet (new SelectionSpec [] {recurseParents});

PropertyFilterSpec pfSpec = new PropertyFilterSpec();

pfSpec.setPropSet (new [] {dcSpec} PropertySpec);

pfSpec.setObjectSet (new [] {oSpec} ObjectSpec);

return getService () .retrieveProperties (getContent () .getPropertyCollector (new PropertyFilterSpec [] {pfSpec}));

It does not work.

Thanks in advance.

Hello

I have the c# code for obtaining the name of ref. vm datacenter Here, I have explained how I got data center using vm ref in c#. I think it may useful allows you to get an equivalent in java.

steps to follow:

(1) download ref vm using the findbyip method by sending name datacenter as null.

ManagedObjectReference VMObject is _service. FindByIp (_sic.searchIndex, null, clientIp, true);

(2) get the vmparent as moref using getdynamicprop

ManagedObjectReference vmParent is GetDynamicProp (ManagedObjectReference) (VMObject, 'parent');.

(3) get the name of Datacenter as moref using getdynamicprop

Data Center ManagedObjectReference = (ManagedObjectReference) GetDynamicProp (vmParent, 'parent');

Let me know if you need an explanation of function getdynamicprop. I think it will be vijava CBC.

Thank you

Vijaya

Tags: VMware

Similar Questions

  • How can I find out who created a new data center or virtual?

    Is there a specific log file?  I'm trying to find out who created a new data center and some VM.

    The events are not stored in a file, but are stored in the database of vCenter in the VPX_EVENT table. The creation of a data center is a vim.event.DatacenterCreatedEvent in the EVENT_TYPE column. The user who has created are in the USERNAME column. The name of the data center is in the DATACENTER_NAME column. Time of creation is in the CREATE_TIME column.

    I tried to create and delete a data center and after removing it, I could always find events in the database.

  • Can I hold ThisContext go a step and use it in a later step to find the name of the current stage? Error 1 when retrieving the name of the step.

    I am trying to create a generic message using LVOOP logging class.  The recorder would include information on stage during execution (name, sequence, etc.).  I would like to create the message object log and then move it into another object (communication, controller of oven, etc.).  Everyone should get its own copy.  None of this is a problem to date.

    I found ways to gather the necessary information to ThisContext.  However, this only seems to work if ThisContext is spent in running step.  If I want ThisContext in LVOOP, the next step to try to use causes an error 1 "an input parameter is incorrect."  Is it possible to get this kind of information (name, sequence, etc.) without ThisContext in at each stage?  It would be inappropriate to do so, but if necessary I will.  It does not go against LVOOP.

    Summary: Can I hold ThisContext go a step and use it in a later step to find the name of the current stage?  If not, is there an effective way to do this?

    My solution was to store the reference to thread.  At each step, I can retrieve the current context.  This is valid only in a thread, but meets my needs.  I could also move something to a higher level, but it would need to know the thread that interests me in any case.

  • Find the name of the column in all tables

    How to find the name of the column in all tables in the database for any column to reveal the name of the person?


    We have over 1000 tables looking for.and in some places, the name column FNAME LNAME, First_NAME, DNAME

    For example we have Customer table, Table EMPLOYEE and the ORDER Table

    --------------------------------

    Customer table
    --------------------------------

    LNMAE

    EMPLOYEE table

    EMP_ID
    DEPT_NAME (we don't want this column as it is not a name column)
    Last_name (he must propose this column because it is named)

    ----------------------------

    CONTROL Panel

    -----------------------------

    ORDER_ID
    ORDER_NAME (we don't want this column as it is not a name column)
    Last_name (he must propose this column because it is named)

    -------------------------

    Dept table

    -------------------------

    Dept_ID
    DEPT_NAME (we don't want this column as it is not a name column)

    Please advise...

    Thank you.

    Hello

    What exactly do you do?

    If you want to display the tables containing these columns, you can query the view data dictionary USER_TAB_COLS (or ALL_TAB_COLS, or, if you have privileges, DBA_TAB_COLS).

    For example:

    SELECT table_name, column_name

    Of user_tab_cols

    WHERE nom_de_colonne IN ('DNAME', 'FNAME', 'FIRST_NAME', 'LAST_NAME', 'LNAME') - or else

    ORDER BY table_name, column_name

    ;

  • Query to find the name of the partition

    Hi all

    I'm a little surprised to see that it is not a column I can use to query the name of the partition for a table, in the case of partition of Internval per day...

    I'm looking for a simple query find the name of the partition for the word partition of today ' today... Am I missing something?

    Ask something like...

    Select nom_partition from dba_Tab_partitions where table_name = 'XYZ' and TO_DATE(HIGH_VALUE,'DD-MON-YYYY') = April 2, 2014"

    High value being a long column, lets you convert CHAR or DATE?

    Thanks in advance

    Then, you create a copy of dba_tab_partitions, since you can only convert the LONG data during an insertion type or create the table.

    From Dan article: «just...» If you have a LONG, and you want to appear more than it, you must use TO_LOB to convert it during either an INSERT INTO

    or a CREATE TABLE As . Everything else is just wasting time. "

  • Find the name and the table constraint type based on the name of the field

    I have a field name or a column with me... I want to find the name of the table is a primary key... Any request to make this work so that the running costs are low...

    Currently, I mix dba_constraints and ALL_TAB_COLUMNS to get this... is possible to extract the data of a process cost effective single table/any other is appreciated

    You must include the USER/ALL_CONSTRAINTS with USER/ALL_CONS_COLUMNS to achieve your desired results. For your specific condition, you can try this query.

    Select constraint_name

    column_name

    de)

    Select c.constraint_name

    cc.column_name

    count on column_count (c.constraint_name score) (cc.column_name)

    from user_constraints c

    Join user_cons_columns cc

    on c.constraint_name = cc.constraint_name

    where constraint_type = 'P '.

    )

    where column_name = 'EMPNO '.

    and column_count = 1;

    I used USER_CONSTRAINTS and USER_CONS_COLUMNS. If you use ALL or DBA dictionary table add join OWNER condition as well.

  • How to find the name of a column in a table

    Hi all

    I have a Table that contains approximately 100 columns.


    I need to find the column name, to find in specific columns containing data like 'abc '.

    Ex: I have a table like temp_table_name
    the columns are col1, col2, col3, col4, col5, col6, col7, col8,.... col99
    I'm looking for with data specific like 'abc '.

    Need to find the name of the table column that contains data of 'abc '.

    Please suggest me. How to find in a single query... :-)

    Actually I'm looking through a column of the table as below
    Select count (*) in the temp_table_name where col1 = 'abc '.

    FOR I IN 1.20 LOOP
    ln_num_of_rows: = 0;
    lv_column_name_search: = "col" | I have;

    lv_sql: = ' select count (*) in the temp_table_name where ' | lv_column_name_search | "= abc";

    EXECUTE IMMEDIATE lv_sql INTO ln_num_of_rows;

    IF ln_num_of_rows > 0
    -column found in lv_column_name_search
    EXIT;
    END IF;
    END LOOP;

    But I'm gettig performance problem.

    How can I do this in any other alternative way? could you suggest any way possible as soon as POSSIBLE.

    It's probably never going to be effective - realistic, you have to scan completes the picture.

    You could probably improve a little things by doing something like

    SELECT DISTINCT column_name
      FROM (
        SELECT (CASE WHEN col1 = 'abc' THEN 'col1'
                    WHEN col2 = 'abc' THEN 'col2'
                    WHEN col3 = 'abc' THEN 'col3'
                    ...
                    WHEN col20 = 'abc' THEN 'col20'
                    ELSE NULL
                    END) column_name
          FROM table_name
        WHERE col1 = 'abc'
            OR col2 = 'abc'
            ...
            OR col20 = 'abc'
      )
    

    but it's never going to be incredibly fast.

    Justin

  • DeskJet All in One 2540 series. How can I find the name and address of the fax server?

    I'm working on my Windows 7 64 bit computer laptop and I try to send a fax with Microsoft Fax and Scan and HP Deskjet 2542 all-in - one network.

    When it comes to the name and the address of the fax server, I can't find it.

    Can someone tell me please know how to find it please?

    Thank you very much for this information.

    You use a server on your network, and that is why you do not connect to a fax modem? If so, then please follow this entire document to Microsoft Fax Server Guide for step by stepwhich explains how to find the name of Sever.

    Please post your results again!

  • How do you find the name of the Group and channel your TDMS file name?

    How do you find the name of the Group and channel your TDMS file name?

    Nevermind, I've used the file viewer.

  • Sometimes the jobs XP in workgroup cannot find the names of the other computers. No idea why?

    There are about 10 workstations XP XP3 in a working group. A computer has a network share and sometimes some workstations cannot access this network share because it cannot find the name of the computer not not because connections reached to the maximum.

    It's because of blocked by switch network ARP requests because the Working Group is big?

    Hi dragos2,

    You can read the following article that should help you to question.

    You can't see the other computers in the workgroup on the network on a Windows XP-based computer

  • Windows Mail Contacts: How can I find the names in alphabetical order A - Z?

    original title: Windows Messaging Contacts

    I use Windows Mail in Vista. If I open my Contacts icon, all my names are listed in order alphabetical by last name, except they start from the Z - A instead of A to Z. However, if I click on "New Message", click the "To" box, all names are blurred; that is, they are not in alphabetical order, and I can't get a person with the same name as another. How can I a) find the names in alphabetical order, from A to Z when I click on the box 'To', and b) retrieve my contacts displayed A - Z?

    Thank you.

    By clicking on the header above the names of contacts line, they should be used in the other direction. Brian Tillman [MVP-Outlook]
    ------------------------------
    If a response may help, please vote it as useful. If a response to the problem, please mark it as an answer.

  • I can't use windwo Defender, my pc show if you use another application to find the unwanted malicious software, use action center to cheack app status

    "I can't use winddow Defender, my pc show' If you use another application to find the unwanted malicious software, use action center to cheack app status."
    Please help me solve. Thank you

    Hello

    If you use Norton, AVG, Avira, Microsoft Security Essentials, McAfee, etc. the default action is for Windows Defender must be disabled, that these AntiVirus programs have their own Antispyware Applications.

    There is nothing to worry.

    Using both programs at the same time can cause system conflicts, etc.

    If you are using one of the above AntiVirus programs, this Information from David O - Support Engineer shows you how to manually enable Windows Defender (disregard information from uninstalling; not possible in Vista):

    http://answers.Microsoft.com/en-us/Windows/Forum/windows_vista-security/how-do-i-manually-start-Windows-Defender-in-Vista/dab845b2-9ba5-47F3-9518-c4c6781e7d5b

    "Go to start, Control Panel, Administrative Tools, Services. Look for Windows Defender.

    Right click and select Properties , ensure that Startup Type is automatic.

    Once modified, click apply and OK.

    Quit and restart your computer. Check the back take the same path to confirm that Windows Defender has started"

    .

    If you want to have additional protection against malware using the version FREE of Malwarebytes AntiMalware:

    http://www.Malwarebytes.org/products/malwarebytes_free

    And for now, change startup Vista programs without using Defender, use one of these methods:

    "How to use MSCONFIG in Windows Vista"

    http://netsquirrel.com/Msconfig/msconfig_vista.html

    Or the program Autoruns for FREE:

    "V11.21 Autoruns for Windows"

    http://TechNet.Microsoft.com/en-us/sysinternals/bb963902

    See you soon.

  • How can I find the name of the photographer? How can I know the location of a photo when it's just a general title...

    How can I find the name of the photographer? How can I know the location of a photo when it's just a general title...

    Hello

    If you expand the keywords, this could give you a little more in detail.  You can click on the username of the photographer to see their portfolio and you can search within their portfolio.

    Thank you

    Bev

  • What is the query to find the name of all applications for all EBS R12.1.3 modules?

    What is the query to find the name of all applications for all EBS R12.1.3 modules?

    With regard to:

    Mr. Shahzad Saleem

    Try:

    SELECT * FROM fnd_concurrent_programs_vl;

  • How to find the name of the image in E10?

    Hi all

    This may be a simple question, but the question in the moment: is there a way to tell what image name is E10? I have an email with two images that I can't find the names. I tried hover, right-click, looking for a possible name, etc, nothing works! I believe in E9, you could just look at the details of the image, or open the HTML, y at - it something like this in E10? HTML is not an option, as this was built using the e-mail writer.

    Thank you very much!

    Hi Hayley,

    The best way to find the name of an image that was inserted in an email is to send a test e-mail. Upon receipt of the email, use the "Open web version" link to open the email in your browser. Once opened in your browser, right click on the email address and select the "View Page Source" option, this will display the HTML for email. If you follow the natural progression of the email from top to bottom, in among all the content text and code, you should be able to find the names of the image. They will look something like this http://images.response. "/ EloquaImages/clients***/{b823ae52-fb21-4532-882f-b1f4e9cb423b}_facebook.png" width = "27" height = "26" alt = "Facebook" > where facebook.png is the name of the image.

    I hope this helps.

    Tim

    LBDGA

Maybe you are looking for