How to find the age of a child and snapshot number snapshot for a virtual machine.

Hi all

How to find the age of a snapshot for a virtual machine child count and snapshot.

This code snippet should help... Assuming that you have the following entries:

VM (VC:VirtualMachine)

snapshot (VC:VirtualMachineSnapshot)

System.log("====== Snapshot details for VM: "+snapshot.config.name+" ======");
var snapshotTrees = vm.snapshot.rootSnapshotList;
System.log("Snapshot Tree Count: "+snapshotTrees.length);
for each (snapshotTree in snapshotTrees){
    showSnapshotInfo(snapshotTree, snapshot);
}

function showSnapshotInfo(snapshotTree, selectedSnapshot){
    if(selectedSnapshot == snapshotTree.snapshot){
        System.log("====================");
        System.log("Name: "+snapshotTree.name);
        System.log("Id: "+snapshotTree.id);
        System.log("Description: "+snapshotTree.description);
        System.log("createTime: "+snapshotTree.createTime);
        System.log("quiesced: "+snapshotTree.quiesced);
        System.log("replaySupported: "+snapshotTree.replaySupported);
        System.log("backupManifest: "+snapshotTree.backupManifest);
        System.log("snapshot id: "+snapshotTree.snapshot.id);
        System.log("state: "+snapshotTree.state.value);
        var childSnapshotList = snapshotTree.childSnapshotList;
        if(childSnapshotList != null){
            System.log("childSnapshotList length: "+snapshotTree.childSnapshotList.length);
        }
        System.log("");
    }
    if(snapshotTree.childSnapshotList != null){
        System.log("Children found: "+snapshotTree.childSnapshotList.length);
        for each (childSnapshotTree in snapshotTree.childSnapshotList){
            showSnapshotInfo(childSnapshotTree, selectedSnapshot);
        }
    }
}

During the passage of one of my virtual machines, here is an example of output I get:

[2014-06-12 15:19:21.493] [I] Snapshot Tree Count: 1
[2014-06-12 15:19:21.493] [I] ====================
[2014-06-12 15:19:21.494] [I] Name: before upgrade to 5.0.1
[2014-06-12 15:19:21.494] [I] Id: 31
[2014-06-12 15:19:21.494] [I] Description:
[2014-06-12 15:19:21.495] [I] createTime: Mon Mar 19 2012 13:48:57 GMT-0400 (EDT)
[2014-06-12 15:19:21.495] [I] quiesced: false
[2014-06-12 15:19:21.495] [I] replaySupported: null
[2014-06-12 15:19:21.495] [I] backupManifest: null
[2014-06-12 15:19:21.496] [I] snapshot id: snapshot-83
[2014-06-12 15:19:21.496] [I] state: poweredOff
[2014-06-12 15:19:21.496] [I] childSnapshotList length: 1
[2014-06-12 15:19:21.496] [I]
[2014-06-12 15:19:21.497] [I] ====================
[2014-06-12 15:19:21.497] [I] Name: Before 5.1 upgrade
[2014-06-12 15:19:21.497] [I] Id: 36
[2014-06-12 15:19:21.497] [I] Description:
[2014-06-12 15:19:21.498] [I] createTime: Fri Sep 21 2012 21:59:58 GMT-0400 (EDT)
[2014-06-12 15:19:21.498] [I] quiesced: false
[2014-06-12 15:19:21.498] [I] replaySupported: null
[2014-06-12 15:19:21.498] [I] backupManifest: null
[2014-06-12 15:19:21.499] [I] snapshot id: snapshot-84
[2014-06-12 15:19:21.499] [I] state: poweredOff
[2014-06-12 15:19:21.499] [I] childSnapshotList length: 1
[2014-06-12 15:19:21.499] [I]
[2014-06-12 15:19:21.500] [I] ====================
[2014-06-12 15:19:21.500] [I] Name: Before Named Instance
[2014-06-12 15:19:21.500] [I] Id: 37
[2014-06-12 15:19:21.501] [I] Description:
[2014-06-12 15:19:21.501] [I] createTime: Mon Nov 11 2013 13:40:46 GMT-0500 (EST)
[2014-06-12 15:19:21.501] [I] quiesced: false
[2014-06-12 15:19:21.501] [I] replaySupported: null
[2014-06-12 15:19:21.502] [I] backupManifest: null
[2014-06-12 15:19:21.502] [I] snapshot id: snapshot-236
[2014-06-12 15:19:21.502] [I] state: poweredOff
[2014-06-12 15:19:21.502] [I]

Tags: VMware

Similar Questions

  • How to find the difference between standard edition and standard edition one

    How to find the difference between oracle database standard edition and standard edition one 64 bit

    (a) using sql
    (b) using the configuration/installation files

    How to find the difference between oracle database standard edition and standard edition one 64 bit

    (a) using sql

    Select * the option of $ v;

    (b) using the configuration/installation files

    opatch lsinventory-details

  • How to find the last update date, time and user of the file field peoplecode

    How to find the last updated date time fields of peoplecode records?

    Thank you.

    We can check the update date-time using the following query

    SELECT LASTUPDDTTM IN THE PSPCMPROG WHERE OBJECTVALUE1 LIKE "RECNAME" AND OBJECTVALUE2 AS "FIELDNAME".

  • How to find the driver of modem of Toshiba Satellite U305-S7432 for Suse operating system?

    Hello friends! I have laptop Toshiba Satellite U305-S7432. I use the Suse operating system. But my OS couldn't find the modem driver. Where can I find the driver of modem for Suse OS? How can I solve this problem. Please help me. ?:|

    Best regards. ;)

    Hey Buddy

    Unfortunately, it seems that Linux is not supported by Toshiba and so there is no Linux drivers published on the page of the driver.

    If you need some drivers, I would recommend looking at the sites of chip manufacturing.

    But visit these Internet sites about Linux on Toshiba laptops:

    http://newsletter.toshiba-tro.de/main/index.html

    http://www.Linux-on-laptops.com/Toshiba.html

    Welcome them

  • Change the default location of the snapshot for a virtual machine

    Hello. I found this tutorial

    http://KB.VMware.com/selfservice/microsites/search.do?language=en_US & cmd = displayKC & externalId = 1002929

    on hos to move the default location for the snapshots of a virtual computer. How ever what I don't understand is where can I covering the line in the file *.mvx, "workingDir = "new_path_location" ? I just start typing at the end of the file? The file can be edited in Notepad of windows or I should connect to the host using putty and correct it in nano, for example?

    For example, in the same document, they used

    workingDir = "/vmfs/volumes/46f1225f-552b0069-e03b-00145e808070/vm-snapshots"

    I think that " 46f1225f-552b0069-e03b-00145e808070 " is an identifier for the volume. True or not? If yes how can I list all the volumes that are mapped to the host or vCenter Server identifiers?

    Thank you!

    alexiaesx wrote:

    Hello. I found this tutorial

    http://KB.VMware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalID=1002929

    on hos to move the default location for the snapshots of a virtual computer. How ever what I don't understand is where can I covering, in the file *.mvx, line "workingDir = "new_path_location" ? I just start typing at the end of the file? The file can be edited in Notepad of windows or I should connect to the host using putty and correct it in nano, for example? in any case around, either Notepad or vi or nano - both will be fine.

    For example, in the same document, they used

    workingDir = "/vmfs/volumes/46f1225f-552b0069-e03b-00145e808070/vm-snapshots"

    I think that " 46f1225f-552b0069-e03b-00145e808070 " is an identifier for the volume. True or not? Yes its unique identifier for your vmfs volumes, but its better if you provide your name of store data instead, as if your data store name is XYZ, provide/vmfs/volumes/xyz/vm-snapshot, you can do it using UUID as well but you need to type for long and its not easy to remember.

    If yes how can I list all the volumes that are mapped to the host or vCenter Server identifiers?

    using the cli

    list of esxcli storage vmfs

    using ssh console, this should provide you with all the information for the disks

    Fdisk-lu

    Another thing,

    CD vmfs/volumes /.

    LS - lah

    You can see your vmfs volumes

  • Disable the clichés for individual virtual machines?

    Hi all

    Is it possible to disable support for snapshot for individual virtual machines, perhaps via a parameter for it?  Or is the closest answer you to put all its virtual disks in independent mode?  Try to see how to better meet the requirements that certain suppliers impose that the VM/device does not catch instant and thought that the best solution is to disable the feature for the specific VM (s) only.  Thank you!

    You can watch the snapshot.maxSnapshots configuration setting. See KB 1031280 for more information.

  • How to find the child level for each table in a relational model?

    Earthlings,

    I need your help, and I know that, "Yes, we can change." Change this thread to a question answered.

    So: How to find the child level for each table in a relational model?

    I have a database of relacional (9.2), all right?
    .
         O /* This is a child who makes N references to each of the follow N parent tables (here: three), and so on. */
        /↑\ Fks
       O"O O" <-- level 2 for first table (circle)
      /↑\ Fks
    "o"o"o" <-- level 1 for middle table (circle)
       ↑ Fk
      "º"
    Tips:
    -Each circle represents a table;
    -Red no tables have foreign key
    -the picture on the front line of tree, for example, a level 3, but when 3 becomes N? How is N? That is the question.

    I started to think about the following:

    First of all, I need to know how to take the kids:
    select distinct child.table_name child
      from all_cons_columns father
      join all_cons_columns child
     using (owner, position)
      join (select child.owner,
                   child.constraint_name fk,
                   child.table_name child,
                   child.r_constraint_name pk,
                   father.table_name father
              from all_constraints father, all_constraints child
             where child.r_owner = father.owner
               and child.r_constraint_name = father.constraint_name
               and father.constraint_type in ('P', 'U')
               and child.constraint_type = 'R'
               and child.owner = 'OWNER') aux
     using (owner)
     where child.constraint_name = aux.fk
       and child.table_name = aux.child
       and father.constraint_name = aux.pk
       and father.table_name = aux.father;
    Thought...
    We will share!

    Thanks in advance,
    Philips

    Published by: BluShadow on April 1st, 2011 15:08
    formatting of code and hierarchy for readbility

    Have you looked to see if there is a cycle in the graph of dependence? Is there a table that has a foreign key to B and B has a back of A foreign key?

    SQL> create table my_emp (
      2    emp_id number primary key,
      3    emp_name varchar2(10),
      4    manager_id number
      5  );
    
    Table created.
    
    SQL> ed
    Wrote file afiedt.buf
    
      1  create table my_mgr (
      2    manager_id number primary key,
      3    employee_id number references my_emp( emp_id ),
      4    purchasing_authority number
      5* )
    SQL> /
    
    Table created.
    
    SQL> alter table my_emp
      2    add constraint fk_emp_mgr foreign key( manager_id )
      3         references my_mgr( manager_id );
    
    Table altered.
    
    SQL> ed
    Wrote file afiedt.buf
    
      1   select level lvl,
      2          child_table_name,
      3          sys_connect_by_path( child_table_name, '/' ) path
      4     from (select parent.table_name      parent_table_name,
      5                  parent.constraint_name parent_constraint_name,
      6                  child.table_name        child_table_name,
      7                  child.constraint_name   child_constraint_name
      8             from user_constraints parent,
      9                  user_constraints child
     10            where child.constraint_type = 'R'
     11              and parent.constraint_type = 'P'
     12              and child.r_constraint_name = parent.constraint_name
     13           union all
     14           select null,
     15                  null,
     16                  table_name,
     17                  constraint_name
     18             from user_constraints
     19            where constraint_type = 'P')
     20    start with child_table_name = 'MY_EMP'
     21*  connect by prior child_table_name = parent_table_name
    SQL> /
    ERROR:
    ORA-01436: CONNECT BY loop in user data
    

    If you have a cycle, you have some problems.

    (1) it is a NOCYCLE keyword does not cause the error, but that probably requires an Oracle version which is not so far off support. I don't think it was available at the time 9.2 but I don't have anything old enough to test on

    SQL> ed
    Wrote file afiedt.buf
    
      1   select level lvl,
      2          child_table_name,
      3          sys_connect_by_path( child_table_name, '/' ) path
      4     from (select parent.table_name      parent_table_name,
      5                  parent.constraint_name parent_constraint_name,
      6                  child.table_name        child_table_name,
      7                  child.constraint_name   child_constraint_name
      8             from user_constraints parent,
      9                  user_constraints child
     10            where child.constraint_type = 'R'
     11              and parent.constraint_type = 'P'
     12              and child.r_constraint_name = parent.constraint_name
     13           union all
     14           select null,
     15                  null,
     16                  table_name,
     17                  constraint_name
     18             from user_constraints
     19            where constraint_type = 'P')
     20    start with child_table_name = 'MY_EMP'
     21*  connect by nocycle prior child_table_name = parent_table_name
    SQL> /
    
           LVL CHILD_TABLE_NAME               PATH
    ---------- ------------------------------ --------------------
             1 MY_EMP                         /MY_EMP
             2 MY_MGR                         /MY_EMP/MY_MGR
             1 MY_EMP                         /MY_EMP
             2 MY_MGR                         /MY_EMP/MY_MGR
    

    (2) If you try to write on a table and all of its constraints in a file and do it in a valid order, the entire solution is probably wrong. It is impossible, for example, to generate the DDL for MY_EMP and MY_DEPT such as all instructions for a table come first, and all the instructions for the other are generated second. So even if NOCYCLE to avoid the error, you would end up with an invalid DDL script. If that's the problem, I would rethink the approach.

    -Generate the DDL for all tables without constraint
    -Can generate the DDL for all primary key constraints
    -Can generate the DDL for all unique key constraints
    -Can generate the DDL for all foreign key constraints

    This is not solidarity all the DOF for a given in the file object. But the SQL will be radically simpler writing - there will be no need to even look at the dependency graph.

    Justin

  • How to find the page contains the indesign sdk?

    PLS, someone help me, how to find the page contains the indesign sdk?

    Thank you

    screen410099

    Don't know, if you find a shorter way, but it works:

    UIDRef language = YOUR_TABLE;

    Error result code.

    do

    {

    InterfacePtr textModel;

    TextIndex beginning;

    Len Int32;

    result = table_get_text_model (read, 0, 0, textModel, start, len);

    If (result! = kSuccess) break;

    If (! textModel) break;

    UIDRef frameRef = text_query_frame (textModel, start);

    If (! frameRef) break;

    Int32 pnum = - 1;

    PageRef UIDRef = page_getref (frameRef, &pnum);)

    If (! pageRef) break;

    :

    :

    } While (false);

    //***************************************************************************

    Error code (Table_get_text_model)

    Language UIDRef,

    Int32 left,

    top of Int32,

    InterfacePtr & textModel,

    TextIndex & start,

    Int32 & len)

    {

    Result ErrorCode = kFailure;

    do

    {

    Inits

    textModel = InterfacePtr (Nile);

    Start = 0;

    Len = text::kTextLen;

    Make sure that we have a valid table model

    InterfacePtr tableModel (label, UseDefaultIID());

    if(!tableModel) break;

    convert the network to a network ID address

    GridAddress gridAddress (top, left);

    get the container text table so we could make the text template.

    InterfacePtr tableTextContainer (tableModel, UseDefaultIID());

    if(!tableTextContainer) break;

    textModel = InterfacePtr (tableTextContainer-> QueryTextModel());

    if(!textModel) break;

    InterfacePtr tableTextContent (tableModel, UseDefaultIID());

    if(!tableTextContent) break;

    GA GridArea (up, left, top + 1, left + 1);

    Len = tableTextContent-> GetTextChunk (ga, start);

    If (! len) break;

    result = kSuccess;

    } While (false);

    return the result;

    }

    //***************************************************************************

    #if (csversion_<>

    # define ITextFrameC_ ITextFrame

    #else

    # define ITextFrameC_ ITextFrameColumn

    #endif

    UIDRef text_query_frame (InterfacePtr txt, TextIndex istartPos)

    {

    UID uid = kInvalidUID;

    TextIndex startPos = istartPos;

    do

    {

    If (! txt) break;

    INNERE Textrahmen of the items

    InterfacePtr frameList (txt-> QueryFrameList ());

    If (! frameList | frameList-> GetFrameCount ())<= 0)="">

    First INNERER Textrahmen of the items

    InterfacePtr textFrame (frameList-> QueryNthFrame (0) / * QUF,: UseDefaultIID () * /);

    #ifndef (csversion_<>

    Location of RangeData (startPos, startPos);

    #else

    TextIndex location = startPos;

    #endif

    Int32 frameIndex = - 1;

    InterfacePtr tf = InterfacePtr (Nile);

    If (startPos < txt-=""> tf TotalLength ()) = InterfacePtr (frameList-> QueryFrameContaining (location, & frameIndex));

    of other tf = InterfacePtr (frameList-> QueryNthFrame (frameList-> GetFrameCount () - 1));

    If textFrame (tf) tf =;

    If (! textFrame) break;

    //

    Aus dem first inner Textrahmen bilden wir jetzt eine hierarchy.

    In der Ebene uber hierarchy suchen wir jetzt nach nach einem dieser

    Objekt, das ein Graphicrahmen ist. Dieses element ist der gesuchte

    ÄUßERE Rahmen.

    //

    InterfacePtr child (textFrame, UseDefaultIID());

    If (! child) break;

    do

    {

    InterfacePtr parent (child-> QueryParent());

    If (parent == nil) break;

    InterfacePtr graphicFrameData (parent, UseDefaultIID());

    If (graphicFrameData! = nil)

    {

    We have a regular text frame.

    UID =: GetUID (graphicFrameData);

    break;

    }

    child = parent;

    } While (child! = nil);

    } While (false);

    If (uid == kInvalidUID) return UIDRef (Nile, kInvalidUID);

    Return UIDRef (: GetDataBase (txt), uid);

    }

    //***************************************************************************

    #if (csversion_<>

    # define GLayout_:

    #else

    # define GLayout_ Utils ()->

    #endif

    UIDRef page_getref (const UIDRef & frameRef, int32 * pgNum)

    {

    UIDRef result = UIDRef::gNull;

    do

    {

    If (pgNum) * pgNum = 0;

    If (! frameRef) break;

    InterfacePtr itemHier (frameRef, IID_IHIERARCHY);

    If (! itemHier) break;

    If (! pause frameRef.ExistsInDB ());

    ES more like evil EIB GetOwnerPageUID AB. ICH denke badly, at least

    Ein muss ein Rahmen wohl schon haben Parent. Wenn wir da keinen find,.

    tschüss Dann.

    InterfacePtr parent (itemHier-> QueryParent());

    If (! parent) break;

    PageUID UID = GLayout_ GetOwnerPageUID (itemHier);

    If (pageUID == kInvalidUID) break;

    result = UIDRef (frameRef.GetDataBase (), pageUID);

    If (pgNum)

    {

    IDataBase * db = frameRef.GetDataBase ();

    If (! db) break;

    UIDRef docRef (db, db-> GetRootUID ());

    InterfacePtr PageList (docRef, IID_IPAGELIST);

    If (!.) (Break from PageList);

    Int32 pageIndex is PageList-> GetPageIndex (pageUID);.

    * pgNum = pageIndex;

    }

    } While (false);

    return the result;

    }

    //***************************************************************************

  • How to find the current MovieClip

    Hello

    I create a flash file to display the products.

    Images and Product Details are stored in the XML file.

    Is what I'm trying to create something similar to the banner on http://www.gainfeeds.com/home

    Add to this is that products are going to be right scroll to the left automatically if there is no user interaction, and produced at the Center will remain highlighted.

    I created a long strip of coverage of products with a mask, the long strip continues to move give a scroll effect.

    Now my question is how to find the product that is currently at the center of the mask?


    Thank you.

    Alok Jain

    No there is no default name assigned to them.

    If you take the parent video clip and with for you apply a getChildNum() method, do not exactly know the syntax, you can take the children of the parent in sales responsibilities. 0,1,2,3,4,... etc.

    But this isn't something that will help a lot because you don't know what this number is.

    For example, when you create the child movieclips, xml-based, I assume you are using a statement. So in this statement when creating each movieClip, fi do you something like "var m:MovieClip = new MovieClip();"also do the following"$m.name ="mc"+ i". ""

    You want to do this because the name "m" is valid only as long as the scope of the valid function is. Once the training starts again you loose any reference to the old "m" and a new one is created. So for future reference the movieClips outside the function that creates, you name them.

    After that you can call from anywhere (given that you set the path to access the parent corectly) like this: "parentMovieClip.getChildByName("m3")" If you want to target a third, or using any name you give in the creation of statement.

  • says that there is an update of firmware available for my 3 t time capsule. I get "an error occurred when downloading". How to find the problem?

    I said that there is an update of the firmware available for my 3 t time capsule. I get the message "an error occurred when downloading". How to find the problem? I have elcapitan 10.11.6 and capsule version 7.7.3

    Try temporarily, connect your MacBook Pro to your Time Capsule using an Ethernet connection... If not already, then try downloading the firmware again.

  • How to find the serial number of the processor in the MacBook pro s serial number? I have a dead MacBook that was given for service to a third party. I doubt that they have replaced the original parts. Help, please. Thank you

    How to find the serial number of the processor in the MacBook pro s serial number? I have a dead MacBook that was given for service to a third party. I doubt that they have replaced the original parts. Help, please. Thank you

    As far as I KNOW, the serial number of the MacBook does not have the serial number of the processor.

  • I make new the old id must paasward wen apple id I go passward, says your id or passward not at even I have received emails but get no email how to find the solution, I, m stuck wat to do

    I make new the old id must paasward wen apple id I go passward, says your id or passward not at even I have received emails but get no email how to find the solution, I, m stuck wat to do

    Have you tried to reset it in security issues? If you are not able to do so, contact Apple support so a security identifier Apple Advisor can help you. 800-275-2273.

  • How to find the date item was my favorites on Mozilla Firefox

    on system moot bookmark how to find the date of the bookmark?

    In bookmarks menu select organize bookmarks to open the bookmarks library. In the bookmarks library, click views, and then display the columns and then added. This will display a column showing when a bookmark has been added.

  • How to find the owners of icloud id?

    IM new to this thing from icloud, I bought 3 old ipads2 on a flea market, where unlocked 2 but we have icloud, the screen is not the old owner alone info [email protected], I don't have a problem, try contacting the owner, but how to find the id of owner? even if is a stolen ipad that I'll be more than returned gad, or ask the owner to remove icloud, but without the owner info is difficult, any advice will be apreciated, thanks

    You can not find it. Go back on the market and claim a refund for the iPad.

    (140442)

  • NB200 - how to find the 3G module for it?

    Hello

    Pls how I find the 3G module in my NB200 - PLL20E?

    Thank you

    Hello

    What do you mean exactly?
    You want to upgrade your NB200 with a card 3G?

    If yes then you must make sure that your NB200 could be improved using this card.
    I'm not sure if this is possible.

    But don t give up boyfriend Toshiba authorized service partner in your country could provide details.
    Guys might be able to tell if this is possible and could provide a good 3G module

    If you get more details please share with us!

    See you soon

Maybe you are looking for