Error recover attribute customized for Virtual Machine

Hello

I created a custom attribute TestAtt for the virtual machines by using the vSphere client. The screenshot of the configuration is attached.

Now, I need to retrieve this value programmatically in my plugin, I'm developing using c#. Here is the snippet of the same thing. For some reason any below appeal fails by saying that the attribute is not found. Even when I used the DoesCustomizationSpecExists, I'm wrong. I am not getting any exception.

I'm doing this in the right way?

CustomProperty CustomizationSpecItem = new CustomizationSpecItem();

customProperty = VIM_SERVICE. GetCustomizationSpec (SERVICE_CONTENT.customizationSpecManager, "TestAtt");

Kind regards

Sudhir

You use the bad managed object to retrieve the custom fields. The customizationManager is used to deal with the customization of the guestOS using Linux quick Prep or Windows Sysprep.

You want to use is customFieldManager - this is a vSphere SDK for Perl script that shows you how - addVMCustomField.pl

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

William Lam

VMware vExpert 2009,2010

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".

Tags: VMware

Similar Questions

  • Java with Minecraft error "error: could not create the Virtual Machine Java.»

    When I try to open Minecraft SP, it won't let me open and there is a message saying:

    "Error: could not create the Virtual Machine Java.".
    Error: A fatal error has occurred. Program will exit. »
    How can I solve this problem?

    Hello

    What is the operating system installed on your computer?
     
    You can ask your question on the Minecraft forums for assistance. Check out the following link.
    http://www.minecraftforum.NET/viewforum.php?f=1002
  • Oracle Jdeveloper error on Oracle Bigdata Lite Virtual Machine

    Hi all

    I use large data Oracle lite virtual machine from the following link: Oracle Big Data VM Lite.

    I'm trying to practice the tutorial on the following link: http://www.oracle.com/technetwork/topics/bigdata/articles/intro-to-oracle-nosql-db-hol-1937059.pdf.

    When I try to run the MoviePlex project in Oracle Jdeveloper, who in turn calls Weblogic server and triggers the following error during the creation of the Weblogic domain:

    [Waiting for the field to complete the construction...]

    [08: 41:11] Creation of integrated Weblogic domain...

    [08: 41:39] integrated Weblogic domain completed successfully.

    Using the 7101 port *.

    / Home/Oracle /. JDeveloper/system11.1.1.6.38.61.92/defaultdomain/bin/startWebLogic.sh

    [waiting for the server to complete its initialization...]

    .

    .

    Arguments of memory in JAVA:-Xms512m-Xmx512m

    .

    Start mode of WLS = development

    .

    CLASSPATH=/u01/Middleware/patch_wls1035/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/u01/Middleware/patch_jdev1111/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/usr/java/latest/lib/tools.jar:/u01/Middleware/wlserver_10.3/server/lib/weblogic_sp.jar:/u01/Middleware/wlserver_10.3/server/lib/weblogic.jar:/u01/Middleware/modules/features/weblogic.server.modules_10.3.5.0.jar:/u01/Middleware/wlserver_10.3/server/lib/webservices.jar:/u01/Middleware/modules/org.apache.ant_1.7.1/lib/ant-all.jar:/u01/Middleware/modules/net.sf.antcontrib_1.1.0.0_1-0b2/lib/ant-contrib.jar:/u01/Middleware/wlserver_10.3/common/derby/lib/derbyclient.jar:/ U01/middleware/wlserver_10.3/server/lib/XQRL.jar::/U01/connectors/OLH/jlib/*:/usr/lib/Hadoop/*:/usr/lib/Hadoop/client/*:/U01/NoSQL/kV-EE/lib/kvstore.jar:.

    .

    Unrecognized option:-jrockit

    PATH=/u01/Middleware/wlserver_10.3/server/bin:/u01/Middleware/modules/org.apache.ant_1.7.1/bin:/usr/java/latest/jre/bin:/usr/java/latest/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/lib64/R/bin:/u01/Middleware/jdeveloper/jdev/bin:/usr/java/latest/bin:/home/oracle/bin:/u01/app/oracle/product/12.1.0/dbhome_1/bin:/home/oracle/scripts:/opt/bin:/home/oracle/bin

    .

    ***************************************************

    * To start WebLogic Server, use a username and *.

    * password assigned to an administrator-level user.  For *.

    * server administration, using the WebLogic Server *.

    * console in http://hostname/ReportServer: port/console         *

    ***************************************************

    from weblogic with the Java version:

    WLS starting with line:

    jrockit - /usr/java/latest/bin/Java-Xms512m-Xmx512m-Dweblogic.Name=DefaultServer-Djava.security.policy=/u01/Middleware/wlserver_10.3/server/lib/weblogic.policy-Djavax.net.ssl.trustStore=/u01/Middleware/wlserver_10.3/server/lib/DemoTrust.jks-Dweblogic.nodemanager.ServiceEnabled=true - Xverify : aucun-da-Dplatform.home=/u01/Middleware/wlserver_10.3-Dwls.home=/u01/Middleware/wlserver_10.3/server-Dweblogic.home=/u01/Middleware/wlserver_10.3/server-Djps.app.credential.overwrite.allowed=true-Dweblogic.management.discover=true-Dwlw.iterativeDev=-Dwlw.testConsole=-Dwlw.logErrorsToConsole=-Dweblogic.ext.dirs=/u01/Middleware/patch_wls1035/profiles/default/sysext_manifest_classpath:/u01/Middleware/patch_jdev1111/profiles/default/sysext_manifest_classpath weblogic. Server

    Error: Could not create the Virtual Machine Java.

    Error: A fatal error has occurred. Program ends.

    Unrecognized option:-jrockit

    Error: Could not create the Virtual Machine Java.

    Error: A fatal error has occurred. Program ends.

    Process is complete.

    The version of JRE installed on the virtual computer is as below:

    [oracle@bigdatalite ~] java $-version

    Java version "1.7.0_51".

    Java (TM) SE Runtime Environment (build 1.7.0_51 - b13)

    Java for 64-bit Server VM (build 24.51 - b03, mixed mode)

    [oracle@bigdatalite ~] $

    I searched on Google but also OTN but found no solution.

    Can anyone already encountered the same problem or can help, it will be highly appreciated.

    Thank you

    Bilal

    Hi Bilal,

    You can try to change the folder to remove the parameter Jrocket below...

    concerning

    Keith

    File: /home/oracle/.jdeveloper/system11.1.1.6.38.61.92/DefaultDomain/bin/setDomainEnv.sh

    Add:

    # Clearing JAVA_VM - Difficulty to remove the setting of jrockit
    JAVA_VM =""

    just before:

    If ["${JAVA_VENDOR}"! = "BEA"]; then
    JAVA_VM = "${JAVA_VM} ${JAVA_DEBUG} ${JAVA_PROFILE}".
    export JAVA_VM
    on the other
    JAVA_VM = "${JAVA_VM} ${JAVA_DEBUG} ${JAVA_PROFILE}".
    export JAVA_VM
    FI

  • Wonder average CPU for virtual machines

    I have a supermetric that gives me the average demand of CPU for virtual machines.

    It works as set below:

    avgN($R40:A2055,3) / avg($R40:A2030)

    R40 is the data center - A2055 is the attribute of MHz CPU demand.

    A2030 is powered on virtual machines in the data center.

    Is it possible for me to write this formula without having to divide it by the total number of virtual machines in the data center?

    Is 'average' looks should do.

    vCenter.jpg

    Fix.

  • Stage of JavaFX Builder 1.0 error: could not create the Virtual Machine Java.

    Hello
    I have installed JavaFX scene Builder under Windows 7 x 32. The installation process is OK, but when I try to launch the app it crashes and displays an error that says:
    "Error: could not create the Virtual Machine Java.".
    Error: A fatal error has occurred. Program will exit. »

    I installed JVM 7u5, JDK 7u5, JavaFX SDK 2.1.1 JavaFX 2.1.1 (Java EE JDK + Glassfish) I would be grateful if someone could tell me if there is something missing. I reinstalled almost all software java several times, but without success.

    Kind regards!

    Published by: 942925 on June 26, 2012 10:23

    Hello

    This message appears usually when the JVM cannot allocate sufficient memory. It may be the consequence of the stage Builder set - Xmx1024m command line: this is currently followed by default TLD-4515 and will be fixed in the next few weeks.
    For the time being you can give a try on a system with more memory. Moreover, what is your current hardware configuration?
    Concerning

  • 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

  • Use the diskette of esxi for virtual machines

    Hello
    I would like to set up a lab and I have hp g6 server but just with a single 600 GB sas disk
    is it possible to install esxi on it and also use it as a storage device for virtual machines on?
    I know that I can install esxi on a cool drive but if what I've said, it's possible I prefer to use that
    Thank you very much

    It's true.

  • 1 or 2 processors? 32 or 64 bit? for virtual machines

    I had a discussion with the network administrator about using 2 processors and OS 64-bit for virtual machines.

    It uses 1 proc and 32-bit on Proliant G5 servers for virtual servers ordinary.

    When it will be beneficial to use 2 procs and 64 bit?

    THX.

    Hello.

    When it will be beneficial to use 2 procs and 64 bit?

    It will be useful to use 64-bit when you have an application that you want to run 64 - bit, and it will be useful to add a second processor when you discover that a vCPU is not enough.  If by 'regular' virtual servers, you're talking low-end Windows servers, then the 32-bit single vCPU approach will be generally better.  Without knowing more about your applications or operating systems, it is difficult to give a more precise answer.

    Why do you think that you might need for 64-bit or 2 vCPUs?  Can you elaborate on what you put on foot?

  • Restore for virtual machines recovered steps

    Hello

    I just read the Administrator's guide and some documents of advantage seller 3rd on the reconfiguration of the SRM of the restoration for use in a production design.

    I noticed that there are steps in the Administrator's guide to close all virtual machines that have been recovered to recovery as part of a failover of completed site (see attachment).  The steps will guide you to delete files in VM reserved space on the table and delete files/directories in vCenter on the recovering site that contains the configuration files of virtual machine created during the creation of a protection group.

    That means that if you were running a 'assisted restoration' you need a system failure to recover all the virtual machines for the time to complete all the tasks of reconfiguration and automatic restore of test?  Is that correct or is it just a cut and paste from the evaluation guide where we don't care about system failures because it is eval?

    We use EMC CLARiiON systems for storage and I have gone through the H5583-VMware_Site_Recovery_Manager_with_EMC_CLARiiON_CX3_and_MirrorViewS_Implementation (see attachment) - this document does not mention any of these steps at all.

    Can anyone who has been successfully complete a review of restoration?

    Surely files in VM reserved space on the storage array and folders/directories in vCenter can be removed after the restore is complete, in this way, all changes can be made when retrieving VMs are on the rise and running and no downtime will be experienced by the company? -is that not what the result you want in this situation?

    Look forward to your opinion on this subject.

    Craig.

    Hi Craig

    The word of Chad is the deadline and this point, but subject to change, is June

    It is certainly not a flaw to make the functionality available to the general public at that time - but teams of engineers are looking to this kind of delay

    Hope that helps

    Kind regards

    Alex Tanner

  • Getting error: could not open the Virtual Machine: failed to query the Source for more information

    When I have a virtual machine to export to the FVO on an ESXi 4.0 and then try again to import the FVO on VMware Player or Workstation 7.1, I get the following message:

    «Could not open the Virtual Machine: failed to query the Source for more information.» I can successfully re-import this file OVF in an ESXi server without any problems. Anyone know why this is happening and what can be done to remedy this?

    Thank you

    Christopher

    Hello.

    Try to use ovftool to convert a VMX of the FVO.

    Good luck!

  • Recovering files on a virtual machine that is inaccessible

    .

    Hi all

    My vm is deceased and I need help, recover, or at least the files it contains. I think I might of a lack of space because I have tried to delete some files and copied them accidentally, causing its gel and get this tint gray on the window. I then tried to shut it down and it would not, so I went into the Task Manager and killed the process, and now when I try to open it, it gives me "generic error". Is there a way I can recover the files on this virtual machine?

    eodnhoj wrote:

    Is this a problem?

    It is of course!

    You need you have extra space for other things like the .vmem file which is the size of the RAM that is assigned to the Virtual Machine and this isn't the only thing that you need extra space for the.

    Anyway you should make a copy of the virtual machine on a different drive having a more adequate space then and try to execute it or attempt to recover data from the user.

  • Error trying to clone a virtual machine

    Hello

    I'm trying to use the vsphere api 5.0 to clone a virtual machine that was created in the web client.

    Here is my XML SOAP message:

    <? XML version = "1.0" encoding = "UTF-8"? >

    " < SOAP-SOAP ENV:Envelope - ENV:encodingStyle = ' http://schemas.xmlsoap.org/SOAP/encoding/ "xmlns:SOAP - ENV =" " http://schemas.xmlsoap.org/SOAP/envelope/ "container =" " http://www.w3.org/2001/XMLSchema "" xmlns: xsi = " " http://www.w3.org/2001/XMLSchema-instance "xmlns:SOAP - ENC =" " http://schemas.xmlsoap.org/SOAP/encoding/ ">

    < SOAP - ENV:Body >

    < CloneVM_Task xmlns = "urn: vim25" >

    < _this type = 'VirtualMachine' > vm-xxxxx < / _this >

    < folder > datacenter-xxxxx < / case >

    < name > clone-test-1 < / name >

    < spec >

    < location >

    store of data <>data store - xxxxx < / datastore >

    resgroup-xxxxx < pool > < / pool >

    < / location >

    false < template > < / template >

    false < powerOn > < / powerOn >

    < / spec >

    < / CloneVM_Task >

    < / SOAP - ENV:Body >

    < / SOAP - ENV:Envelope >

    but I get the error "the application refers to an unexpected or unknown type".

    Here is the entire response in a table:

    {Array (15)}

    'key' = >

    String(11) "task-xxxxxxx".

    "task" = >

    String(11) "task-xxxxxxx".

    'name' = >

    (12) a string "CloneVM_Task".

    'descriptionId' = >

    (20) a string "VirtualMachine.clone".

    'entity' = >

    String (8) "vm-xxxxx".

    "entityName" = >

    (8) a string 'xxxxxx '.

    'State' = >

    String(5) "error".

    'cancelled' = >

    String(5) "false."

    'Cancel' = >

    (4) a string 'true '.

    'error' = >

    {Array (2)}

    'fault' = >

    {Array (1)}

    "argument" = >

    (22) a string "ManagedObjectReference".

    }

    'localizedMessage' = >

    String (52) "request refers to an unexpected or unknown type."

    }

    'reason' = >

    {Array (1)}

    'userName' = >

    String (10) "myusername".

    }

    'queueTime' = >

    (26) string "xxxx".

    "startTime" = >

    (27) string "xxxx".

    'completeTime' = >

    (26) string "xxxx".

    'eventChainId' = >

    String (7) 'xxxxxxx '.

    }

    Thanks in advance for any help, it will be greatly appreciated!

    Yes, login and vcenter.

    Thanks for trying to help, but I managed to solve it.  It turns out that it was

    1. I was providing the setting wrong folder (should have been the result of FindByInventoryPath('your_data_center_name/vm') instead of FindByInventoryPath ('your_data_center_name')

    2. I didn't need to provide anything inside the 'location' parameter, it comes to be present

    Thank you again and hope that the above comments help someone else trying to do the same thing

  • Error trying to deploy a virtual machine from a template

    Hello everyone,

    We went from ESX 3.5 U4 and VC 2.0 to vSphere 4 and ESX 4.0. In VI 3 deployment of virtual machines in models worked fine without any errors. Now, I have the problem that I can't deploy virtual machines from templates more. I upgraded VMWare tools on each machine for vSphere 4. But whenever I try to deploy a VM from a template I get the following error: "number of virtual devices exceeds the maximum for a given controller. This happens only when I go to the option "Change the virtual hardware (experimental)" and by changing the virtual network to another local VIRTUAL network adapter (in my case from INTERNAL to VLAN21) before you deploy. When I'm not changing the network card virtual, all works well.

    I have been through a few KB and some discussion of the community, but those who are almost for vmware converter.

    Could you please help me?

    Thanks in advance for any answers.

    Mirco79

    Convert virtual machine model.

    Modify the virtual machine settings.

    Choose a network suitable for model (it shows probably no name)

    Convert virtual machine model

    Try to deploy new virtual machine model to see if it works again correctly.

    StarWind Software R & D

  • Search for virtual machines with function "Shared Folders" (HGFS) running

    I'm looking for advice on creating a script to find all VM with HGFS running, or where the service is actually used.

    Apparently, VMware posted the notice of security VMSA-2016-0001 | United States yesterday and my security people are panicking.

    Any information you have would be useful.

    Thank you

    Ludi

    The only way I know is questioning the guest operating system itself and check the registry path:

    HKLM\System\CurrentControlSet\Control\NetworkProvider\Order

    and check if the value string ProviderOrder hgfs, vmhgs or vmhgfs.

    You should remove these values and restart the virtual machine for the change to take effect.

    Wise PowerShell:

    $VM = get - VM NameofVM

    $Reg = [Microsoft.Win32.RegistryKey]: OpenRemoteBaseKey ("LocalMachine', $vm.extensiondata.summary.guest.hostname")

    $RegKey = $Reg.OpenSubKey("System\CurrentControlSet\Control\NetworkProvider\Order")

    $RegKey.GetValue ("ProviderOrder")

    VMware KB: Guest Windows cannot update hgfs.dat or vmhgs.dat

  • vMotion is a failure for virtual machines

    I'm trying to migrate virtual machines to one ESXi to another in the same cluster, it fails in the first stage. Storage and networking are shared and other same cluster different host machines have been migrated successfully. One could suggest?

    Are you a specific error when migrating?

    It's a failure at the end of specific percentage?

    Have you checked reverse migration between different host and no host work?

    Check if the nucleus of vMotion port is accessible from both ESXi hosts.

    If vMotion IP is not the ping requests, check if the IP configuration is correctly performed according to the standard.

    If the IP configuration is done correctly, try unchecking and rechecking vMotion core port of two hosts, it should work.

    Also check that vMotion does not work on dVS and Standard with different IP configuration.

Maybe you are looking for

  • How to delete/remove history sites?

    Ditto

  • Fractures of fatigue on the Satellite P100-423

    Hi all This is my first post here.The hinges on my Satellite P100-423 have always been fairly rigid. Thus fractures of stress now appeared on the back of the lid near the hinges.I bought in Nov/06 and it seems to be now out of warranty.I would apprec

  • Satellite P100 loses its next update

    Satellite P100 V3.30 Sound BiOS: Conexant HD Audio v 4.8.0 Windows Vista 32 bit Following a Vista Windows Update which contained an update of his Toshiba, all sounds have disappeared from the laptop. I did a system restore to before the update sound,

  • Analysis of controls

    I have a HP Photosmart 5510 and I use a MacBook Pro. I'm scanning my check to my computer and it keeps scanning only 3/4 of the audit, leaving the numbers, the most important part, cut. No matter how I flip, how I move it, it still cuts it. What can

  • Satellite L300 - fails at startup

    My Toshiba L300 fails. When I try to start it, it lights up. Then he said: run the system normally and all that, what I choose that it starts then it comes up with a bar and bar back and forth, a green and a (c) Microsoft Corporation under him. And t