Is there an api to get the info of the OS running on the host machine?

My server is ESXi 4.1, and I can get this information from the property "name" object "AboutInfo.

But, I can't get the information about the operating system running on the server except the 'osType'.

However, when I use the command 'uname - a', I can get a long chain, "Linux 2.6.18 vcs - 164.ESX #1 Fri Apr 16 14:57:03 PDT 2010 x86_64 x86_64 x86_64 GNU/Linux" for example, as a result.

So, my question is that how I can the information of operating system as the above string?

There are a few places to the VM guestOS.

(1) when you create a virtual machine, you assign a guestOS type based on the list available in the API here - http://www.vmware.com/support/developer/vc-sdk/visdk41pubs/ApiReference/vim.vm.GuestOsDescriptor.GuestOsIdentifier.html#asianux3Guest. As you can see, it does not include something on a certain core, just the major release version. If you want to query to see what guestOS "configured" has been assigned to particular VM, you can take a look at its config info here - http://www.vmware.com/support/developer/vc-sdk/visdk41pubs/ApiReference/vim.vm.ConfigInfo.html

(2) now, simply because you have assigned a unique guestOS, this does not mean that it be installed this particular operating system... It's bad because VMware did some things when it virtualizes this comments according to your selection. Another method of extracting the real guestOS leverages VMware Tools, if you have it installed and running within the guestOS, you can extract the BONE that is detected. You can find this information in the comments section that provides details of inside the guest - http://www.vmware.com/support/developer/vc-sdk/visdk41pubs/ApiReference/vim.vm.GuestInfo.html. As you can see, not only you can get the information of the OS, but you can get things like address IP, etc.. Remember that this only works if you have installed VMware tools.

Now to give you an example where #2 would give better results than the #1. I installed a virtual appliance provided by VMware, the VM shell or it is configured OS has been set at Other Linux (64-bit) but when you query the information of the customer, the OS reported CentOS 4/5 (64-bit) , meaning that it really works. Again, you get only the type of operating system if VMware he understands and is able to detect it. You won't get details on the kernel version or updates/etc.

If you need this level of granularity, you will need to extract directly from the guestOS. VMware another API called VIX which allows you to execute commands directly from the guest's use case is mainly on the management of comments. http://www.VMware.com/support/developer/VIX-API/

Hope this helps

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

William Lam

VMware vExpert 2009,2010

VMware VCP3, 4

VMware VCAP4-DCA

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

Twitter: @lamw

repository scripts vGhetto

Introduction to the vMA (tips/tricks)

Getting started with vSphere SDK for Perl

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

VMware developer community

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

Tags: VMware

Similar Questions

  • Is there an API to get the session timeout value

    Hello

    Is there an API to get the value of timeout between vcenter server and vsphere web customer?   I enclose the screenshot that displays this value in the VShpere Web client version 5.1.

    Thank you

    Can you post this question in the forum Web Service SDK? vSphere SDK for management

    There will be more competent people.

  • Is there an API to get the price of the item with an advanced price?

    With an advanced price, is there an API to get prices for specific elements of the pricing engine? If Yes, where can I find the documentation for it?

    Thank you
    Kurz

    List of the 11i API found in:

    Oracle integration repository
    http://IREP.Oracle.com

    In version 12, the Oracle integration repository will be available as part of the E-Business Suite.

  • Is there a way to get the host, on which the guest is running?

    Is it possible to get the name of the host that is running on the client?

    It depends...

    I guess you want to know if it is possible from inside of the guest in dialogue directly with the hypervisor, VMware Tools, but without going out to the network and to ask someone (which in turn requires some knowledge on which ask and the appropriate permissions to do). Then the answer is no.

    On the other hand, if you know for example that all guests who could potentially run the virtual machine are handled by the same server vCenter and you know the name of the vCenter server and have an account that is authorized to connect to it... then you can use this way to determine on which virtual machine host is actually run.

    Andreas

    - Blog of experience front of VMware

  • Is there an API to get the date on the calendar open based on production schedule

    Hello

    I have a need to determine if promised PO date is open in Oracle manufacturing calendar. Is there a public API, or private, can I use for this? We are on Oracle EBS R12.

    Thanks for your help.

    AB

    I found the name of the program. It's mrp_calendar.next_work_day.

    Thank you.

    AB

  • Is there a way to get the list of hosts and its groups of belonging to the vCenter folder level in 5.5 web vsphere client plugin development?

    Hello

    I need to get the list of all hosts and its groups of belonging to the vcenter folder level.

    1. I created a view giving the extension point: vsphere.core.folder.monitorViews.

    2. After this step, I wrote the constraint as in my class of mediator,

    var ListConstraint:Constraint =

    QuerySpecUtil.createConstraintForRelationship ( _contextObject, 'childEntity');

    I was expecting a list of all child entities such as hosts, dc, cluster... But I have only the immediate child object which is only the Datacenter as my result.

    Is it possible to get all hosts and vCenter folder level Clusters because I need the entire list to vCenter (highest level).

    Other info:

    Object file has only two properties:

    1 childEntity - list of entities

    2 childType in-kind folder ('Virtual Machine', 'Data center'...)

    Is it possible to write a constraint specifying which list of childEntities I need using childType in.

    Example: Make Me childEntities that has a 'Host' and 'Cluster' childType but childType in doesn't have these two types.

    In addition, at this level, I could see the 'Associated objects' tab which has all the information I need, such as Clusters and Cluster tab hosts and host tab respectively.

    So, I think its possible to get this list to vCenter folder level.

    I have attached a screenshot representing the need. Kindly ignore the Conventions of naming in there since I edited the example comes with the sdk program.


    Query:

    1. How can I get the host and Cluster (table of relationship) list to vCenter folder level or even at the level of the vise.global.view?

    2. once I get this list, is it possible for me to manipulate that list and send the new list to IU?

    3. is there another way to do the same thing without the help of model classes and mediator?


    Pointers to this will be very useful.

    It is not possible to obtain all hosts a folder specific vCenter from a single query Data Manager.  You need to get the list of centers of data first and then get a list of data center hosts.

    It is best to make these repeated requests to the java level and return only the list that you want to the user interface.

    You can get all the objects in the host of the system with a simple query using a constraint with targetType = 'HostSystem', but you will need to eliminate those from other vCenter servers.  See how this chassis example queries all hosts the Java later in the getHosts() method: samples/chassis-app/chassisRackVSphere-service/src/main/java/com/vmware/samples/chassisRackVSphere/ChassisRackVSphereDataAdapter.java

    Another option is to use the vSphere Web Services SDK to browse vCenter. See the vSphere management forum for help on these APIs.  See this plugin of the sample using this SDK

    samples/vsphereviews/vsphere-wssdk-provider/src/main/java/com/vmware/samples/wssdkprovider/VmDataProviderImpl.java

  • Is there an API to change the device password policy?

    As we know, the BES IT policy, we could configure password policy such as:

    1 history of max password

    2. password max attempt

    3 password expire

    4. minimum length of password

    etc...

    I did some research on the internet and I saw no API to get the Java application. I just want to confirm with experts here.

    Thank you.

    That's right, that there is no API for this.

  • Is there a way to get the comment of layer?

    Hello world.

    I'm having a problem.

    I can't find the API to get the comment of layer.

    You could teach me please?

    Hmmm... It "seems to be no API c for that."

    You can always do so through AEGP_ExecuteScript() and retrieve the

    result back to part c.

    funny. I didn't know there would be a api for this...

  • Is there a way to get the name of the currency of the members of the outline

    Guys,

    Is there a way to get the names of the currencies of the members. I don't see any VB API function to do this. How can I get it?

    See you soon,.
    PM

    Mikki, if you want to just take one of your dimension of 'Country' and see what the currency is associated with him, call it EsbGetMemberInfo or EsbOtlGetMemberInfo will do (at least, according to the docs, do not remember having ever done).

    Only valid in > = 11.1.2. but if you export the outline to XML go MaxL, information is here too.

  • Is there a way to get the text to reformat then I Zoom in to read an article.

    Is there a way to get the text to reformat then I Zoom in to read an article, so I can't do a pan on?

    Unfortunately not - this is one of the disadvantages of pinch to zoom - makes the biggest full page

  • I try to install vista on my laptop but a letter of the key is not visible, all the other parts are very well including the serial code, is there another way to get the key of the other information?

    Taché product key

    Hello

    I try to install vista on my laptop but a letter of the key is not visible, all the other parts are very well including the serial code, is there another way to get the key of the other information? The laptop currently has non-OS I've tried to reinstall.

    Thank you

    Scott

    Product keys are bit-agnostic - they don't care if it's 32-bit or 64-bit.

    However, cannot legally use the recovery disk from one computer to a different constructor machine - as other licenses are not properly paid..

    There is nothing nonetheless to try all possible variations on the absence of character (there are only 25, after all the )

    Other than that, your best option is to contact the manufacturer and order a set of recovery disc for the machine. I do no download available for Vista with SP2 - but you can download Vista with SP1 and create the disc.

    http://www.heidoc.NET/Joomla/technology-science/Microsoft/57-Windows-Vista-direct-download-links

  • Is there a way to get the key on the dvd?

    I have one of the signature of windows 7 dvd sets complete the house party promotion my system which featured 64-bit died and I would like to install it on my new drive, but could not find the dvd cover with the product key to this issue is there a way to get the key on the dvd?

    Nope. There is no key on the DVD. Without the lid, you are out of luck.

  • Is there a way to get the first Pro CS6 with still now I can't find the previous, offered versions with the subscription of the CC 2015?

    Is there a way to get the first Pro CS6 with still now I can't find the previous, offered versions with the subscription of the CC 2015? What is recommended for creating DVDs with interactive menus?

    Instructions again, cloud or version https://forums.adobe.com/thread/1992717 serial number
    -a of notes on different versions of cloud and step by step on these differences
    -contains information about the separate library download which is necessary
    -CS6 is the last reminder, see here #8 why http://forums.adobe.com/thread/1337952?tstart=0

    Still and 10 Windows https://forums.adobe.com/thread/2015461 use the compatibility mode of Windows 8
    problem/solution to install Encore CS6 https://forums.adobe.com/thread/1934087

  • There is workaround to get the playback mode by default when I start the software adobe reader DC?

    There is workaround to get the playback mode by default when I start the software adobe reader DC?

    Hi Keeperparma,

    There is no option in Acrobat reader to customize playback mode when you start the player, but you can configure for a specific file by using the "view original" feature of acrobat, but which apply only to this specific pdf.

    Kind regards

    Rahul

  • Is there a way to get the number of the current item?

    In an article with multiple instances: is there a way to get the number of the current item? If for example, I'm on the 3rd point, is it some sort of integrated "GET CURRENT NUMBER REGISTRATION" which would return a '3' to the program?

    Thank you

    Published by: WayneFMcKinstry on April 9, 2010 10:50

    If I get you correctly in tabular element that you want to know the current record or current, you can try this...

    For the current record

    :SYSTEM.CURSOR_RECORD;
    or
    :SYSTEM.CURRENT_RECORD;
    

    for the current element

    :SYSTEM.CURSOR_ITEM;
    

    -Clément

Maybe you are looking for