Consult VAPP name UUID

Hello

I am trying to solve some of the content of a message that we receive for a failure of AMQP event. The names of some events are more useful than the UUID. I haven particular, I'm looking to retrieve the name of vApp (among other data) using the provided uuid. Here is a sample of the XML that is generated from the AMQP message:

<?xml version="1.0" encoding="UTF-8"?>
<vmext:Notification xmlns:vmext="http://www.vmware.com/vcloud/extension/v1.5" type="com/vmware/vcloud/event/task/complete" eventId="dfa10892-e93a-4b7d-8201-cbac0713fee3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.vmware.com/vcloud/extension/v1.5 http://172.16.254.25/api/v1.5/schema/vmwextensions.xsd">
    <vmext:Link rel="entityResolver" href="https://172.16.254.25/api/entity/"/>
    <vmext:EntityLink rel="entity" type="vcloud:task" name="vappDeploy" id="urn:vcloud:task:338bfbfa-09ee-49c3-8b49-883251099f5d"/>
    <vmext:EntityLink rel="down" type="vcloud:user" name="system" id="urn:vcloud:user:ac696d01-12d9-4763-9fd6-26a06b6a3778"/>
    <vmext:EntityLink rel="up" type="vcloud:org" name="ORG" id="urn:vcloud:org:3cde66f6-a81e-47a0-ace0-80725d158604"/>
    <vmext:EntityLink rel="task:owner" type="vcloud:vapp" id="urn:vcloud:vapp:94144a90-04f4-41c3-87a5-722d7b219634"/>
    <vmext:Timestamp>2013-07-31T16:36:28.170-04:00</vmext:Timestamp>
    <vmext:OperationSuccess>false</vmext:OperationSuccess>
</vmext:Notification>

And here's a message JSON is also generated with the same event.

{"eventId":"dfa10892-e93a-4b7d-8201-cbac0713fee3","type":"com/vmware/vcloud/event/task/complete","operationSuccess":false,"timestamp":"2013-07-31 16:36:28.170","user":"urn:vcloud:user:ac696d01-12d9-4763-9fd6-26a06b6a3778","org":"urn:vcloud:org:3cde66f6-a81e-47a0-ace0-80725d158604","entity":"urn:vcloud:task:338bfbfa-09ee-49c3-8b49-883251099f5d","taskOwner":"urn:vcloud:vapp:94144a90-04f4-41c3-87a5-722d7b219634"}

I currently have a vCO code that can extract the UUID. However, I can't seem to figure out how the query VCloud to the properties of the object using the UUID.

Examples on how to proceed is appreciated.

Why not try something like obtaining an object by ID... Once you have the object, you can obtain some properties you like...

var vApp = Server.findForType("vCloud:VApp","urn:vcloud:vapp:94144a90-04f4-41c3-87a5-722d7b219634");
System.log("vApp Name: "+vApp.name);

I used the VAPP id you have demonstrated in your post here... try this code and see if it works...

Tags: VMware

Similar Questions

  • Rename a vCloud VAPP name VM

    I am trying to automate the deployment of VAPP templates provided a custom name for the paralytic and name personalized for the confined VM. I can quite easily deploy the model with Instantiate a VAPP model, but I can't find a feature/workflow to rename the virtual machine in this paralytic. Node that I don't mean to rename the computer virtual via comments customization, I want the name VM vCloud to customize.

    Any ideas?

    If I remember correctly to do.

    VM. Name = 'new name ';

    VM. Update();

  • How to get the customer name, UUID, and cluster comments

    Hello

    I was wondering if somone could show me how to tie somethings together. I can get a VM UUID, I can get the names of the virtual machines and the cluster on which they sit, but I'm having a hard time getting all 3 into a single csv report. All the world is that who could share? Thank you!

    Try this

    Get - VM | Select Name,@{N="UUID; E={$_. ExtensionData.Config.Uuid}},@{N="Cluster '; E={($_ | Get - Cluster). Name}}

  • Create a vApp-based service

    I am creating a service that contains the servers within a vCloud vApp.

    We have a large vCloud environment where we use several servers with the same IP/servername and which confronts us with the challenge that the only real identifier is the VM UUID.

    Today, we are building the Service by manually adding the servers one by one by searching the UUID but it s your time and as soon as a virtual computer is redeployed or deleted the change reflected in the service isn´t.

    The goal would be to create a rules-based group that could automatically update the service instead.

    Any ideas on how this might be accomplished?

    For future reference if someone else will never need the same solution, here is a solution provided by Dell support.

    Run this in the script console will create a dynamic service a vApp defined in the script.

    vAppName = "insert your name of VAPP here."             VAPP name

    serviceName = "VCD_vApp_" + vAppName;                         This is the name of service creation

    pourfusionner = [];

    TS = server.get("TopologyService");

    Create category

    categoryType = ts.getType ("FSMCategory"); vCat = ts.getObjectShell (categoryType); vCat.setName ("Cloud"); pourfusionner<>

    Create services

    serviceType = ts.getType ("FSMService"); vServ = ts.getObjectShell (serviceType); vServ.setName (serviceName); def domainsProperty = vServ.getType () .getProperty ("domainAssociationIDs");

    vServ.markOverridingProperty (domainsProperty);

    def domainsList = vServ.get("domainAssociationIDs") as set; domainsList< "vcloud";="" vserv.setlist("domainassociationids",="">

    Add the category service

    catDefintion = categoryType.getProperty ('definition');

    vCat.getList (catDefintion) .add (vServ);

    pourfusionner<>

    dmcType = ts.getType ("FSMDynamicManagedComponent");

    Add all virtual machines

    vmDMC = ts.getObjectShell (dmcType);

    vmDMC.setName ("VMs");

    vmDMC.set ('container', vServ);

    vmDMC.set ("componentQuery", .virtualMachines""(VMVCloudVApp where name ='"+vAppName+"') ");

    Here to get all the pourfusionner specified VAPP virtualMachines<>

    vServ.set ('definition', [vmDMC]);

    ts.mergeData (toMerge);

    return;

  • Snapshot of VAPP section returned with no data

    Hello

    I created a snapshot via vapp.createSnapshot ("name", "description", false, false). But when I try to retrieve the details, no data is returned.

    Snapshot of SnapshotSectionType = Vapp.getSnapshotSection (vcloudClient, vdc.getVappRefByName("vapp-name"));

    The log shows the following:

    " < SnapshotSection xmlns =" http://www.VMware.com/vCloud/v1.5 "" xmlns: xsi = " http://www.w3.org/2001/XMLSchema-instance " xsi: Nil = "true" xsi: schemaLocation = " http://www.VMware.com/vCloud/v1.5 http://XXXXXXXXXX/api/v1.5/schema/master.xsd" > < / SnapshotSection > ""

    How to get the detail of a snapshot as of size and the snapshot creation date? Any help would be appreciated.

    Thank you

    Jean Claude

    Hello

    I'm trying with the jar of 5.1 but connect with version V1_5. When I changed this to the V5_1 version, I got the details I wanted.

    Thank you.

  • Blocking task - add a virtual machine to VAPP

    Which block task will begin when I add a virtual machine to a Palsy of a catlog. The "add, move or delete virtual machines of VAPP" seems to send a job blocking, but the xml of the blocking task does not include the vcloud:vm, only the vcloud:vapp

    I want to send a notification when the new VM is complete provisioning and include details on the new virtual machine.

    If you duplicated one of the workflow approval of all notifications, try to paste the following in the Get scaffolding Scriptable this workflow task... He will certainly need a cleaning according to your needs. It is a part of my test code for extraction of information of this type of operation...

    var vcdHost = vApp.getHost();
    
    //User info
    var username = user.name;
    var userDescription = user.description;
    var userFullName = user.fullName;
    var userEmailAddress = user.emailAddress;
    var userTelephone = user.telephone;
    var userIm = user.im;
    
    var userDeployedVmQuota = user.deployedVmQuota;
    if (userDeployedVmQuota == 0) userDeployedVmQuota = "Unlimited";
    var userStoredVmQuota = user.storedVmQuota;
    if (userStoredVmQuota == 0) userStoredVmQuota = "Unlimited";
    var userRole = vcdHost.getEntityByReference(VclEntityType.ROLE, user.role).name;
    
    System.sleep(5000);
    
    if (blockingTask != null) {
        var task = vcdHost.getEntityByReference(VclEntityType.TASK, blockingTask.getTask());
        task.updateInternalState();
        var XMLstring = task.toXml();
        System.log("Task XML: \n"+XMLstring);
    
        // Now begin typical XML Processing for this set of action types:
        // These come from the "Add, Move or Delete Virtual Machines from vApp" blocking task being enabled
        // This workflow requires a single input - a string containing the XML to be processed.
        // It generates the following outputs:
        // operationType - this is a string that is either "create" "delete" or "move"
        // the other output is a Array/Properties object with the following possible properties:
        // vmName - string
        // hostName - string
        // osName - string
        // hwVersion - string
        // cpuCount - string
        // memoryMB - string
        var doc = new XML(XMLstring);
        default xml namespace = doc.namespace();
        // initialize the outputs:
        var operationType = null;
        var vmPropsArray = new Array();
    
        // Determine action type from XML:
        if (doc.Params.DeleteItem != null && doc.Params.DeleteItem.length() > 0){
            System.log("This is a Delete operation");
            operationType = "delete";
            //    DELETE ITEM Processing
            System.log("DeleteItem Count: "+doc.Params.DeleteItem.length());
            for each (c in doc.Params.DeleteItem){
                var vmProps = new Properties();
                System.log("VM to Delete: "[email protected]());
                vmProps.put("vmName",[email protected]());
                vmPropsArray.push(vmProps);
            }
        }
        if(doc.Params.CreateItem != null && doc.Params.CreateItem.length() > 0){
            System.log("A blank VM is being added to the vApp");
            operationType = "create";
            System.log("CreateItem Count: "+doc.Params.CreateItem.length());
            for each (c in doc.Params.CreateItem){
                var vmProps = new Properties();
                System.log("VM to Add: "[email protected]());
                System.log("Description: "+c.Description.toString());
                vmProps.put("vmName",[email protected]());
                vmProps.put("description",c.Description.toString());
                vmProps.put("hostName","n/a");
                vmProps.put("osName","n/a");
                vmProps.put("cpuCount","n/a");
                vmProps.put("memoryMB","n/a");
                vmPropsArray.push(vmProps);
            }
        }
        // ADD/MOVE Testing:
        if(doc.Params.SourcedItem != null){
            System.log("SourcedItem Count: "+doc.Params.SourcedItem.length());
            for each (c in doc.Params.SourcedItem){
                var vmProps = new Properties();
                System.log("=============================");
                if(c.@sourceDelete == "true"){
                    operationType = "move";
                }else{
                    operationType = "create";
                }
                System.log("This is an "+operationType+" operation");
                //System.log("sourceDelete: "+c.@sourceDelete);
                var instantiationParams = c.InstantiationParams;
                vmProps.put("vmName",instantiationParams.GuestCustomizationSection.ComputerName.toString());
                System.log("VM Name: "+instantiationParams.GuestCustomizationSection.ComputerName.toString());
    
                vmProps.put("hostName",instantiationParams.*::VirtualHardwareSection.*::System.*::VirtualSystemIdentifier.toString());
                System.log("Host Name: "+instantiationParams.*::VirtualHardwareSection.*::System.*::VirtualSystemIdentifier.toString());
    
                vmProps.put("osName", instantiationParams.*::OperatingSystemSection.*::Description.toString());
                System.log("Operating System: "+instantiationParams.*::OperatingSystemSection.*::Description.toString());
    
                vmProps.put("hwVersion",instantiationParams.*::VirtualHardwareSection.*::System.*::VirtualSystemType.toString());
                System.log("Hardware Version: "+instantiationParams.*::VirtualHardwareSection.*::System.*::VirtualSystemType.toString());
    
                var n2 = new Namespace("http://schemas.dmtf.org/ovf/envelope/1");
                var n3 = new Namespace("http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData");
                var items = instantiationParams.*::VirtualHardwareSection.n2::Item;
                for each (i in items){
                    if(i.n3::Description.toString() == "Number of Virtual CPUs"){
                        vmProps.put("cpuCount",i.n3::VirtualQuantity.toString());
                        System.log("CPU Count: "+i.n3::VirtualQuantity.toString());
                    }
                    if(i.n3::Description.toString() == "Memory Size"){
                        vmProps.put("memoryMB",i.n3::VirtualQuantity.toString());
                        System.log("Memory (MB): "+i.n3::VirtualQuantity.toString());
                    }
                }
                vmProps.put("description","n/a");
                vmPropsArray.push(vmProps);
            }
        }
    }
    
    //vApp Info
    var vAppName = vApp.name;
    var vAppDescription = vApp.description;
    var vAppVdc = vApp.parent.name;
    var org = vApp.parent.parent;
    
    //Using query service to get further information on the to be deployed vApp
    var queryService = vcdHost.toAdminObject().toAdminExtensionObject().getExtensionQueryService();
    var expression = new VclExpression(VclQueryVAppField.NAME, vApp.name, VclExpressionType.EQUALS);
    var filter = new VclFilter(expression);
    var params = new VclQueryParams();
    params.setFilter(filter);
    
    var resultSet = queryService.queryAllVappRecords(params);
    while (resultSet != null) {
        var records = resultSet.getRecords();
        for each (var record in records) {
            //Since we got the vApp by its name we want to check it is the right one
            if (record.href == vApp.getReference().href) {
                var vAppCreationDate = VclMiscObjectFactory.convertToGregorianCalendar(record.creationDate).toString();
                var vAppNumberOfVMs = record.numberOfVMs;
                var vAppStorageMB = record.storageKB / 1024;
                var map = record.otherAttributes;
                var vAppAutoDeleteDate = "Unlimited";
                for each (k in map.keys) {
                    if (k.getLocalPart() == "autoDeleteDate") {
                        var vAppAutoDeleteDateString = map.get(k);
                        if  (vAppAutoDeleteDateString != null && vAppAutoDeleteDateString != undefined) {
                            var vAppAutoDeleteDateXmlGregorianCalendar = VclMiscObjectFactory.xmlGregorianCalendarFromString(vAppAutoDeleteDateString);
                            var vAppAutoDeleteDate = VclMiscObjectFactory.convertToGregorianCalendar(vAppAutoDeleteDateXmlGregorianCalendar).toString();
                        }
                        System.log(k.getLocalPart() + " : " + map.get(k));
                    }
                }
            }
        }
        resultSet = resultSet.getNextPage();
    }
    
    var vmsProperties = new Array();
    
    var queryService = vcdHost.getQueryService();
    expression = new VclExpression(VclQueryVMField.CONTAINER, vApp.getReference().href, VclExpressionType.EQUALS);
    filter = new VclFilter(expression);
    params = new VclQueryParams();
    params.setFilter(filter);
    
    var resultSet = queryService.queryRecords(VclQueryRecordType.ADMINVM, params);
    while (resultSet != null) {
        var records = resultSet.getRecords(new VclQueryResultAdminVMRecord());
        System.log(records.length + " VM records found");
        for each (var record in records) {
            var vmProp = new Properties();
            vmProp.put("guestOs", record.guestOs);
            vmProp.put("memoryMB", record.memoryMB);
            vmProp.put("numberOfCpus", record.numberOfCpus);
            if (record.networkName != null) {
                vmProp.put("networkName", record.networkName);
                }
            else {
                vmProp.put("networkName", "");
            }
            vmProp.put("name", record.name);
            vmProp.put("description","n/a");
            vmsProperties.push(vmProp);
        }
        resultSet = resultSet.getNextPage();
    }
    
    function addInfoTitle(info, title) {
        info += "" + title + "
    \n"; return info; } function addInfoEntry(info, label, entry) { info += "
  • " + label + " : " + entry + "\n"; return info; } function addInfoSeparation(info) { info += "

\n"; return info; } content = ""; content = addInfoTitle(content, "Requestor"); content = addInfoEntry(content, "Username", username); content = addInfoEntry(content, "Description", userDescription); content = addInfoEntry(content, "Full Name", userFullName); content = addInfoEntry(content, "Email Address", userEmailAddress); content = addInfoEntry(content, "Telephone Number", userTelephone); content = addInfoEntry(content, "Instant Messenger ID", userIm); content = addInfoEntry(content, "Deployed VM Quota", userDeployedVmQuota); content = addInfoEntry(content, "Stored VM Quota", userStoredVmQuota); content = addInfoEntry(content, "Role", userRole); content = addInfoSeparation(content); content = addInfoTitle(content, "vApp"); content = addInfoEntry(content, "Name", vAppName); content = addInfoEntry(content, "Description", vAppDescription); content = addInfoEntry(content, "VDC", vAppVdc); content = addInfoEntry(content, "Creation Date", vAppCreationDate); content = addInfoEntry(content, "Number of VMs", vAppNumberOfVMs); content = addInfoEntry(content, "Disk Size", System.formatNumber((vAppStorageMB / 1024), "0")+ " GB"); content = addInfoEntry(content, "Storage Lease", vAppAutoDeleteDate); System.log("=================================================\n"); System.log("Operation Type: "+operationType); // Process the vmPropsArray: // vmName - string // hostName - string // osName - string // hwVersion - string // cpuCount - string // memoryMB - string if (vmPropsArray != null){ for each (vmProps in vmPropsArray){ System.log("vmName: "+vmProps.get("vmName")); System.log("hostName: "+vmProps.get("hostName")); System.log("osName: "+vmProps.get("osName")); System.log("cpuCount: "+vmProps.get("cpuCount")); System.log("memoryMB: "+vmProps.get("memoryMB")); content = addInfoSeparation(content); content = addInfoTitle(content, "VM"+" ("+operationType+")"); content = addInfoEntry(content, "\tName", vmProps.get("vmName")); // This is the "Full Name" or "Display Name" if(vmProps.get("description")!="n/a"){ content = addInfoEntry(content,"\tDescription", vmProps.get("description")); } if(vmProps.get("hostName")!="n/a"){ content = addInfoEntry(content, "\tHost Name", vmProps.get("hostName")); // This is the hostname or Computer Name } if(vmProps.get("osName")!="n/a"){ content = addInfoEntry(content, "\tGuest OS name", vmProps.get("osName")); } if(vmProps.get("cpuCount")!="n/a"){ content = addInfoEntry(content, "\tvCPUs", vmProps.get("cpuCount")); } if(vmProps.get("memoryMB")!="n/a"){ content = addInfoEntry(content, "\tRAM (MB)", vmProps.get("memoryMB")); } // content = addInfoEntry(content, "\tNetwork name", vmProp.get("networkName")); } } var displayContent = content; // Retrieve the full webview url here: should be like http://your.vco.server:8280/vmo/approvals var webViewUrl = configurationElement.getAttributeWithKey("webViewUrl").value; // Extract the host from the url var vcoHost = webViewUrl.match(/^(ftp:\/\/|https?:\/\/)?(.+@)?([a-zA-Z0-9\.\-]+).*$/)[3]; // Now build the answer URL to be placed in e-mail var urlAnswer = "here" ; content = addInfoSeparation(content); content += "Click "+urlAnswer +" to approve or reject this request."; content = addInfoSeparation(content); content += "** This is an automated workflow email. Do not reply. **";
  • Get data of tasks/events of vApps

    I'm fairly new to vCloud API and using the Java SDK for now. I was wondering what would be the best approach for all vApps information (recording) tasks in an organization. I want to do some kind of oversight to separate from here and its something very simple for now as:

    VAPP name/ID creation Date last power on last Power Off

    .........                      .........                      ..........                      ..........

    Is it possible to do this with each virtual machine inside a vApp? . I noticed he gives ways to get there, but I'm not sure what could be better.

    Thanks for the help,

    David.

    Hello

    // Event query
    
    RecordResult eventResult = client
    .getQueryService().queryRecords(QueryRecordType.EVENT);
    for (QueryResultEventRecordType eventRecord : eventResult.getRecords()) {
    System.out.println(eventRecord.getEventType());
    }
    
    // Task query
    RecordResult adminTaskResult = client
    .getQueryService().queryRecords(QueryRecordType.ADMINTASK);
    for (QueryResultAdminTaskRecordType adminTaskRecord : adminTaskResult
    .getRecords()) {
    System.out.println(adminTaskRecord.getName());
    }
    

    Kind regards

    Rajesh Kamal.

  • PPID different BBM for the same user

    Hello! I found that my app is having a weird behavior when I get the ppid of the user. I try to use the ppid as a key into a table of users in a database for my application, and I noticed that I have two different ppid, even thoug I am the only one using my app (it is still in development).

    What I find weird is that I have 2 versions of my application, I can dounload the store (it is in draft mode) and one I directly load on my camera on my development machine. These 2 apps get the ppid 2 different to the same user BBM.

    PPID does has something to do with my application being downloaded from the store or loaded directly? Has anyone dealt a similar problem?

    Thanks in advance!

    Reedd.

    What is expected.  PPID is unique user ID of BBM in the context of the application, which means same user PPID will be different for each application stored on the device.

    The identifiers used to register with BBM are different depending on whether you load the application or install the application for the BlackBerry World.  When you side load application name UUID / provider are used.  When you install BlackBerry World the application ID and SKUS are used.  This will give you two groups of users (two sets of PPID), one for testing and one for production.

    Also, if you change an item as your UUID or SKU you will also cause a new PPID to create.

  • Sigma 50mm 1.4 objective art is a milvus Zeiss 50 1.4 ZE in Lightroom CC?

    Hello, why Lightroom CC think my art of Sigma 50 mm 1.4 lens is a Zeiss 50 1.4 ZE milvus? Thanx

    Hi BramKP,

    Please update to the latest version of Lightroom.This problem has been fixed in Lightroom 6.4/CC 2015.4.

    Consult the name conflict of lens with SIGMA and Zeiss Milvus on cameras Canon lenses

    Kind regards

    Assani

  • How to retrieve information about the network (NIC) for each computer virtual (vim, perl)

    Hello

    I have this simple code to retrieve the name of the VirtualMachines in my infrastructure (filtered for data center)

    [.. .other code...]

    use VMware::VILib;
    OPTS::add_options (%OPTS);
    OPTS::parse();
    OPTS::Validate();
    Util::Connect();

    My $datacenter = $DCFILTER;

    My $clusterFilter = $CLFILTER;

    My $datacenter_view = Vim::find_entity_view (view_type = > 'Data center', filter = > {name = > $datacenter});

    my @values = split (/ \ | /, $clusterFilter);

    foreach my {$val (@values)

    My $cluster_view = Vim::find_entity_view (view_type = > 'ClusterComputeResource', filter = > {name = > qr / $val /});

    My $vm_views = Vim::find_entity_views (view_type = > 'VirtualMachine', begin_entity = > $cluster_view);

    {foreach (@$vm_views)}

    Print $_-> name. "\n";
    $vm = $_-> name;

    }

    }

    Util::Disconnect();

    This code runs, but now I need to recover some information about each virtual computer network, specifically:

    (1) the labels of each card network to NETWORK interface (for each virtual computer)

    (2) the adapter Type (optional)

    (3) the device status: connected to the power (yes/no) (option).

    I have seen that there are being managed - network, property of the VirtualMachine managed - object, but I don't know how to use it in my code and if contains the information I need (maybe "Summary")

    Example here is one:

    network-examples.jpg

    in this case, I would like to know for this virtual machine

    (1) LANBACKUP...; dvPP_LABO...; dvp_LABO...

    and if it is possible information 2) and 3) for each NIC... in this case for NIC LANBAKUP...

    Flexible 2)

    (3) connected to the power supply: Yes

    Can you help me to integrate my code to retrieve the information above?

    Thank you very much, for your help.

    Sergio

    I realized prior extraction DVS elements:

    My $dv_switches = Vim::find_entity_views (view_type-online 'DistributedVirtualSwitch', properties-online ['name', 'uuid']);

    Then, you can search by UUID:

    ($this_dvs) = grep {$_-> eq {'uuid'} $the_uuid} @$dv_switches;

    This will give you the best performance as well, since you don't have to hit the API for each request (just the first effective request DVS).  You can add additional DVSwitch object data if you need it in your logic.

  • Folder path as a VM property - for virtual machines in a paralytic

    Hello

    I used the new-viproperty of LucD script to create a folder for each virtual computer property in my inventory. It works perfectly well for virtual machines, but not for virtual machines in a paralytic as these do not have a 'record' in powercli property. they report a $null value.

    Would be much appreciated if someone can help me to modify this script so it creates a VM property for the VMS and VMs in a paralytic?

    http://www.lucd.info/2012/05/18/folder-by-path/

    01

    02

    03

    04

    05

    06

    07

    08

    09

    10

    11

    12

    13

    14

    15

    16

    17

    18

    19

    20

    21

    22

    23

    24

    25

    26

    27

    28

    New-VIProperty-Name'BlueFolderPath' -ObjectType 'VirtualMachine'-Value{

        param($vm)

        functionGet-ParentName{

            param($object)

            if($object.Folder){

                $blue= Get-ParentName$object.Folder

                $name= $object.Folder.Name

            }

            elseif($object.Parent -and$object.Parent.GetType().Name -like"Folder*"){

                $blue= Get-ParentName$object.Parent

                $name= $object.Parent.Name

            }

            elseif($object.ParentFolder){

                $blue= Get-ParentName$object.ParentFolder

                $name= $object.ParentFolder.Name

            }

            if("vm","Datacenters"-notcontains$name){

                $blue+ "/"+ $name

            }

            else{

                $blue

            }

        }

        (Get-ParentName$vm).Remove(0,1)

    }-Force| Out-Null

    Check if the new version works for you.

    New-VIProperty-name 'BlueFolderPath' - 'VirtualMachine' - value {ObjectType

    Param ($VM)

    Function Get-ParentName}

    Param ($Object)

    if($Object.) {Folder)

    $blue = get-ParentName $object. Folder

    $name = $object. Folder.Name

    }

    ElseIf($Object.) VApp) {}

    $blue = get-ParentName $object. VApp.ExtensionData.ParentFolder

    $name = $object. VApp.Name

    }

    ElseIf ($object - is [VMware.Vim.ManagedObjectReference]) {}

    $folder = get-VIObjectByVIView - MORef $object

    $blue = get-ParentName $folder. Parent

    $name = $folder. Name

    }

    ElseIf($Object.) Parent - and $object. Parent.GetType (). Name - as a ' file * ') {}

    $blue = get-ParentName $object. Parent

    $name = $object. Parent.Name

    }

    ElseIf($Object.) ParentFolder) {}

    $blue = get-ParentName $object. ParentFolder

    $name = $object. ParentFolder.Name

    }

    If ("vm", "Data centers" - notcontains $name) {}

    $blue + "/" + $name

    }

    else {}

    $blue

    }

    }

    (Get-ParentName $vm). Remove (0.1)

    } - Force | Out-Null

  • 10 workstation does support multi vm ovf (VirtualSystemCollection)?

    I try to open an ovf that contains multiple VMs using the < VirtualSystemCollection > element rather than just a single virtual machine using the < VirutalSystem > element. 10 Workstation supports the eggs/ovf virtual appliances that contain several virtual machines? I'm element unsupported "VirtualSystemCollection."

    Hi all thanks for the suggestions. I had read all the documentation. I was faced with an appliance (vApp) virtual multi-vm with servers in 3 windows containing my solution stack, wrapped in egg. I tried open/import directly the eggs in 10 workstation, but he complained about the and didn't like the multi-vm aspect.

    I installed vapprun v1.0 and ovftool v3.5.0 and used the following for my eggs multi-vm imported into the vapprun workspace and process visible with 10 workstation:

    1 vapprun init - initialized the vapprun workspace

    2 ovftool "c:\path to my egg file" c:\path_to_my_vapprun_workspace--deployes egg multi-vm in my workspace

    3 edition *.cfg files since I've customized vcenter properties associated with the TIME as well as for each virtual machine.

    4 vapprun start - gui 'VAPP name' - without the flag - gui the vapp/vm do not start. I had to use the flag - gui and that automatically launch the workstation and the console for the virtual machine have become active.

    Once startup is launched, virtual machine is seen in my computer until I have delete.

  • Get NFS via PowerCLI performance counters

    Hello

    I hope someone can help me or perhaps shed some light on my problem and I hope to propose a solution or a path to a solution.

    I need to be able to monitor the performance of e/s NFS (mainly the latency to read/write, but also the flow). I tried with the PowerCli using Get-Stat on ie. disk.deviceWriteLatency.average, but I get only for my stores of data non - NFS. I read in several places that there are some measures NFS deleted in an earlier version of vSphere, but also that some of them may actually be available again.

    I found that the statistics are available through the vSphere Client (go to an ESX host specific, Performance, advanced and click on build a graph with only my NFS data stores and only read/write latency counters.) This will produce a graph with also live-data and historical data. So I recon the ESX (or vSphere) actually knows NFS performance.

    I tried on 5.0.0 ESXi and ESXi 5.1.0 and with PowerCLI 5.1 Release 2.

    I've seen some proposals we should probe the VMs (and not the ESXi) for this information, but this seems an exaggeration of the probe of hundreds of virtual machines for more information the vSphere/ESXi server is apparently already?

    Does anyone have any suggestions or pointers to how I can get this information?

    Concerning

    Thomas

    If you want to use my Get-Stat2 function, you can do something like this

    $stat = "datastore.totalWriteLatency.average"$start = (Get-Date).AddDays(-5)
    
    Get-Datastore | where {$_.Type -eq "NFS"} | %{  $dsName = $_.Name  $uuid = $_.ExtensionData.Info.Url.Split('/')[-2]  $_.ExtensionData.Host | %{Get-View $_.Key |     Get-Stat2 -Stat $stat -Instance $uuid -Start $start -Interval HI2 |    Select Timestamp,CounterName,Interval,Instance,Value,Entity,@{N="Datastore";E={$dsName}}  }}
    

    You can do this with the ordinary Get-Stat

    $stat = "datastore.totalWriteLatency.average"$start = (Get-Date).AddDays(-5)
    
    Get-Datastore | where {$_.Type -eq "NFS"} | %{  $dsName = $_.Name  $uuid = $_.ExtensionData.Info.Url.Split('/')[-2]  Get-VMHost -Datastore $_ |    where {$_.Instance -eq $uuid} |     Select Timestamp,MetricId,IntervalSecs,Instance,Value,@{N="Entity";E={$_.Entity.Name}},@{N="Datastore";E={$dsName}}}
    
  • Intermittent failure of workflows

    Our workflow of VAPP provision works 90% of the time, but the other 10 percent the intilization script fails with an error "TypeError: null (Module of Script dynamic name: getAllOrgvAppNames #7), the error only seems to occur when you access a tempalte VAPP from another agency cannot read property 'name" ".

    The initialization of the is script block attached

    Many thanks in advance, also, if there is a better place to find the answers I would be interested to know

    The error occurs in the action of getAllOrgvAppNames.

    var orgVdcs = org.getVdcs();
    var allvAppNames = new Array();
    // For each datacenter, get all vApps within
    for each (vdc in orgVdcs){
        var allvApps = vdc.getVApps();
        for each (vApp in allvApps){
            allvAppNames.push(vApp.name);
        }
    }
    

    For some reason any () vdc.getvApps return one or more null VAPP.

    Please try the action updated the:

    var orgVdcs = org.getVdcs();
    var allvAppNames = new Array();
    // For each datacenter, get all vApps within
    for each (vdc in orgVdcs){
        var allvApps = vdc.getVApps();
        for each (vApp in allvApps){
            if (vApp != null) allvAppNames.push(vApp.name);
            else System.warn("Got null vApp in VDC " + vdc.name);
        }
    }
    

    Once you get all the names of VAPP Please compare what is in the inventory of vCO and the vCloud Director UI to see if you are missing one. If to verify if they have a bad condition (could not be created or other).

    Christophe.

  • Error creating of custom workflow

    Hello

    I'm new learning tool and that I was going through the technical guide of the vSM and task after provisioning where I am setting Power ON simple Workflow.

    It's like task of start-> Action out of Power On VAPP - > special closure.

    According to tutorial

    Cofig.JPG

    Where as during execution of the workflow is to return HTTP error response "or a VAPP nor a virtual computer have been specified as an argument."

    I would really appriciate if someone can let me know how can I provide VAPP / name of the virtual machine as an arrgument?

    Thanks in advance and wait for a response on this query.

    Kind regards

    Mohit!

    Hi MG,.

    Have users copy and paste a URL is not a feasible process - as you say.

    Gary is right about the need to specify what TIME the outbound action should be performed on. The system cannot guess for you, or make assumptions.

    The details are there in the relevant documents - although I think that they are not very easy to read. Check Service user's Guide catalog v9.1 and commissioning of Cloud v9.1 - Technical Guide that should help you.

    What I did customize the RSF for include a drop down of available vApps (there is a particular type of drop customized down to the provision of the clouds - details are in the manaul somewhere - I don't have the handy page number). The customer chooses the VAPP in the list when you fill in the Service Action form, and then you pass this value to the workflow via the task field mappings outgoing actions.

    Another thing to watch: do not use the power in the form of action coming out. Use Deploy/undeploy. I'm not sure of the reasoning why, but this is also noted in the documentation.

    I hope this helps.

    Holly.

  • Maybe you are looking for

    • Missing dashboard after the upgrade to el capitan

      I just upgraded to OS Capitan and now my dashboard is absent.  The hot corner doesn't work.  the other active corners work.  I have them turned off and reset them, all the correct things are made, but the dashboard with the weather, calculator, gizmo

    • Change local variable boolian Programaticaly

      Hi all I came across something today, that I have ever dealt with in Labview... I downloaded a driver of instrument for a power supply, and got it working OK (using VISA on the USB communication). The example program pilot itself works very well and

    • Dialog boxes

      Awhile back I ran a program called WinOptimizer clean my registry.  Since then, my system (mainly the print dialog box) dialog boxes are huge, to the point where I can't see my options to change the settings.  Has anyone else had a similar problem? W

    • The Start button is not visible on the taskbar and items on the computer display in large.

      PC screen too big... taskbar disappeared, but I came back... but the Start button did not return original title: too big screen - AutoScan not visible

    • How can I cancel the keys Fn on my Aspire

      How can I cancel the Fn blue only accidentally obtained keys lit? I tried the ctl + Fn + shift key twice the thing and it doesn't work.  Thank you