SlideShare uma empresa Scribd logo
1 de 31
Baixar para ler offline
London Workshop
    Exploring VMware APIs
    Preetham Gopalaswamy
    Group Product Manager vCenter Server and vSphere APIs
    October 8, 2010
    Managing Large vSphere Environments using SDKs / PowerCLI




1
Disclaimer

    This session may contain product features that are
    currently under development.
    This session/overview of the new technology represents
    no commitment from VMware to deliver these features in
    any generally available product.
    Features are subject to change, and must not be included in
    contracts, purchase orders, or sales agreements of any kind.
    Technical feasibility and market demand will affect final delivery.
    Pricing and packaging for any new technologies or features
    discussed or presented have not been determined.

“THESE FEATURES ARE REPRESENTATIVE OF FEATURE AREAS UNDER
 DEVELOPMENT. FEATURE COMMITMENTS ARE SUBJECT TO CHANGE,
 AND MUST NOT BE INCLUDED IN CONTRACTS, PURCHASE ORDERS,
 OR SALES AGREEMENTS OF ANY KIND. TECHNICAL FEASIBILITY AND
 MARKET DEMAND WILL AFFECT FINAL.”

2
VMware API Overview

                                                               VMware Enabled    Independent
                      Secure Private Cloud
                                                               Public Clouds     Public Clouds




      Solution API/CLI
      View                Thin App           Zimbra            SaaS             Other SaaS
                                                               Applications     Providers

                  VMware End-User Computing

      Application API
                                                                                Google App
                                                               VMforce          Engine
      Spring             vFabric             Hyperic
                                                                                Other cloud
                                                               Oher PaaS        infrastructure
                VMware Cloud Application Platform              Partners         providers



       Virtualization/Hardware Health/Cloud API/CLI
      VMware Cloud Infrastructure and Management               vCloud
                                                               Datacenter

      vCenter            vShield             vCloud Director   vCloud Express


       VMware vSphere: Foundation for Cloud Computing




3
Some Much That I Can Do…

Management capabilities available in the vSphere platform
    •   Virtual Machine management
    •   Host configuration (storage, networking)
    •   Performance monitoring and management
    •   Events and Alarms
    •   Host hardware management and health monitoring
    •   Virtual Storage management
    •   Virtual machine content back-up and restore
    •   User management (on hosts)
    •   Virtual Disk manipulation
    •   Communication from the host to the guest
    •   Hypervisor information from inside the guest




4
… But Which API Do I Use?

What is your role and what are you trying to do?
    • System Administrator managing a few virtualized servers
      • Using the command-line to troubleshoot
      • Trying to configure an aspect of your infrastructure that does not have a GUI
    • Datacenter administrator in a Cloud Service Provider or large enterprise
      • Automate provisioning and management of 100s of hosts and 1000s of VMs
      • Monitor the hardware in your datacenter
    • Software developer in an ISV or large datacenter
      • Developing a management application that monitors and manages a virtual
       datacenter
      • Testing software in multiple VMs each running different a different OS
      • Creating a smart guest application that is virtualization-aware




5
Agenda

    Guiding principles
    Virtualization Management through the Web Services API
    Hardware Health Monitoring and Management (CIM SMASH)
    Automation through CLIs (vCLI, PowerCLI)
    Language Specific SDKs (Perl, .NET, Java)
    Bridging the Hypervisor and the Guest (Guest SDK, VIX)




6
Introduction

    Some core principles of the vSphere management capabilities:
    • They will be exposed by the server as a web-accessible interface
    • Any SDK that is distributed by VMware will leverage one or more
     of these interfaces
    • All capabilities available on ESXi will also be available on ESX and through the
     same interfaces
    • Management tools must integrate through vCenter where-ever possible




7
vSphere Web Services SDK

    Once known as the VI API




                                           Service
                                            Web
    •   Always available
    •   Secure
    •   Firewall friendly
    •   Designed for network access
    •   Standards based
    •   Governed by access control rules




8
vSphere Web Services SDK

    Available on ESX, ESXi, vCenter




                                                           Service
    and VMware Server 2.0




                                                            Web
    Comprehensive interface for vSphere
    virtualization management
    Server (ESX/ESXi or vCenter) authentication credentials must
    be provided to access this interface
    The Web Services SDK will be refreshed each time the vSphere
    interface is enhanced to include new features – typically during
    major and minor vSphere releases
    This interface will maintain backward and forward compatibility
    for 2 releases




9
vSphere Web Services SDK

 Provides interfaces to do the following:




                                                         Service
                                                          Web
 •   Inventory retrieval (Hosts, VMs, Virtual Devices)
 •   Virtual Machine management
 •   Host configuration (storage, networking)
 •   Performance monitoring and management
 Sample utilities are included with the vSphere SDK package
 to demonstrate use of the APIs. We are happy to enhance the
 samples based on input from our partners
 Clients can monitor the infrastructure through this API so that
 they are informed any time there is a change – through events
 or through the PropertyCollector
 vCenter enables the creation and configuration of alarms
 in response to specific events. The response to an alarm
 can be configured


10
Hardware Health Monitoring and Management

 Hardware asset information and health information              H
                                                              He /W
 is exposed through the standards-based CIM                     a lt
                                                                    h
 SMASH interface (Systems Management Architecture
 for Server Hardware)
 This API is accessible on the hosts through an https interface
 VMware’s implementation uses the SFCB CIMOM and the default
 providers that ship in-box are open-source OMC providers
 VMware supports both CIM XML over http and WSMan
 While several management tools support CIM data, not many
 support CIM Indications or WSEventing. So, all CIM Indications are
 also available as SNMP traps
 VMware partners with all its OEM vendors and IHV partners to
 enable them to create CIM providers that enhance the hardware
 data available in vSphere


11
What is CIM

 CIM stands for “Common Information Model”,
 an industry standard, object-oriented data model
 that provides a UML-based framework for describing
 management data
 CIM schemas are defined in a language called Managed Object
 Format (MOF). The Distributed Management Task Force (DMTF)
 is a standards body defining the CIM Schema with over1000
 classes and associations
 Web-based Enterprise Management (WBEM) is a set of standards
 defining web-based CIM implementations. Transport between the
 CIM server and client can be CIM XML over http/https or WSman
 WBEM profiles define a collection of CIM elements and rules
 pertaining to a specific area of management




12
Hardware Health Monitoring and Management

 CPU details                                  H
                                            He /W
                                              a lt
                                                  h
 Fan
 Battery
 Local RAID storage
 Power Supply
 Power State Management
 System logs
 System Memory
 Firmware
 Temperature Sensors




13
vSphere CIM SMASH API

 vCenter includes a monitoring Service that aggregates          H
                                                              He /W
 hardware information (primarily health) from each              a lt
                                                                    h
 of the hosts that it manages
 This service exposes information to the vSphere Client
 through a proprietary HTML interface
 The service is also integrated with the vCenter Alarms
 infrastructure so that key hardware events can trigger alarms
 The hardware health data is available only on the host. API users
 are encouraged to authenticate against vCenter and use the
 AcquireCIMTicket method to work against a host – rather than
 authenticate against the host




14
Hardware Health Providers

 VMware provides a set of default hardware                                 H
                                                                         He /W
 health providers                                                          a lt
                                                                               h

 Server and IHV partners often supply additional
 hardware health providers
     Experience enhanced if you install the partners’ providers
     Providers may need to be installed separately
     Server vendors often distribute an ESXi image customized for their hardware
 Each hardware vendor (server or IHV) is responsible for developing
 additional providers are installed if the default set of hardware
 health data does not give you all the information




15
Command Line Interfaces

 VMware offers 2 types of command line interfaces
 • vSphere CLI/vCLI – once known as RCLI or VI CLI
 • PowerCLI – previously known as the VI Toolkit (for Windows)   CL
                                                                   I




16
vCLIs

 vSphere CLI offers the capabilities previously
 available only on the COS (Console Operating
 System) in Classic ESX, through a remote interface.
                                                               CL
 This CLI is supported on both ESX and ESXi                      I


 Functionally, they are mainly focused on host configuration
 Most of the vSphere CLI commands are currently
 available through vCenter. VMware plans to support
 all of them through vCenter in a future release
 Most of the commands are Perl scripts and hence run in Linux
 and Windows
 The vSphere CLI can be downloaded and installed separately
 or as part of a VMware supplied virtual machine vMA (vSphere
 Management Assistant)




17
vCLI: The Next Generation - esxcli

 esxcli was first introduced in vSphere 4.0
 At its simplest it can be described as CLIs that run on
 the server with an XML front-end                                   CL
                                                                      I
 The CLI functionality is broken into logical namespaces
 with actions specific to each namespace. To run such a
 command, one would say:
 esxcli [generic options] <namespace> <action> [specific options]
 Enables easy extensibility/upgrade of the command-line
 functionality without changing the client
 The goal is to transition all the current vCLI commands to the
 esxcli style in the future




18
vSphere PowerCLI

 PowerCLI offers a command-line/scripting interface to
 vSphere management based on Microsoft PowerShell
 VMware has created over 250 cmdlets that expose             CL
                                                               I
 the most common management use-cases
 Cmdlets are simple, intuitive and can be easily and
 elegantly chained to accomplish complex management tasks
 This product boasts of a large, extremely active user community,
 that is enhancing our base implementation with new scripts that
 are available on the forum and at
 http://blogs.vmware.com/vipowershell




19
The Simple Elegance of PowerCLI

 The script below shows how one can create
 snapshots for all VMs that are currently powered on
 The same task would be several 100 lines                                           CL
                                                                                      I
 of code using the vSphere Web Services SDK
 (Java binding)

     connect
     get-vm | where {$_.powerstate eq “poweredOn”} | new-snapshot
     get-cluster -name “mycluster” | get-vmhost | Get-VMHostStorage -RescanAllHBA
     disconnect


 The PowerCLI model will form the basis for all the language
 specific SDKs that VMware will offer the ecosystem




20
vSphere [Language Specific] SDKs

 VMware offers its customers SDKs for different
 programming languages
 The following SDKs are currently available:                SD
                                                               K   s
 • Perl (previously known as the VI Perl Toolkit)
 • .NET (available as part of the PowerCLI)
 • Java (now available as a Technology preview)
 These SDKs define a client-side data model specific to the
 particular programming language (Perl objects, .NET objects,
 Java objects)




21
vSphere SDKs Architecture



                  VMware CLIs and Customer/Partner Solutions                        SD
                                                                                       K   s

         vSphere SDK        Utility Applications and Samples

                                       Abstraction Layer
                                  maps VMware entities into native objects
                                  provides a simple API to retrieve objects


                                          Runtime Layer
                                     interfaces with the web services

                       vSphere Web Services SDK           vSphere CIM SMASH API

                                                 vCenter
                            ESX             ESX             ESX               ESX




22
vSphere SDK for Perl (example)


     # login
     Util::connect();                                                              SD
                                                                                      K   s
     # get VirtualMachine views for all powered on VM's
     my $vm_views = Vim::find_entity_views(view_type => 'VirtualMachine',
                             filter => { 'runtime.powerState' => 'poweredOn' });
     # snapshot each VM
     foreach my $vm (@$vm_views) {
         $vm->CreateSnapshot(name => 'snapshot sample',
                    description => 'Snapshot created from workshop sample',
                    memory => 0,
                    quiesce => 0);
         print "Snapshot complete for VM: " . $vm->name . "n";
     }
     # logout
     Util::disconnect();



23
Vitual Disk Development Kit (VDDK)

 Use the Virtual Disk Libraries to
 • Access/modify virtual disks (VixDiskLib)
 • Mount a volume/disk (ViMntapi)
 The vmdk file format is public… but
 •   Let us avoid everyone implementing VMDK readers/writers
 •   Avoid updating the readers/writers for every format update
 •   Optimized code from VMware which has already done all this work
 •   Low threshold to let ISV’s use VMDK as their native format (e.g. for backup)




24
Vitual Disk Development Kit (VDDK)




        VDDK App
                                     1. Login
                                                           vCenter
                                2. Open(VM, vmdk, …)


                         4. Read(handle, …)

                                                       2a. GetTicket(Vm, Vmdk,…)

     3. Open(vmdk, Ticket, …)




25
vSphere Guest SDK

 API available to developers writing applications
 that will run in a virtual machine on a vSphere platform
 Available as a C or a Java library                         SD
                                                               K

 Provides information about the virtual machine
 and limited information about the host that the machine
 is running on
 Enables customers to write smart applications that respond to
 changes at the virtual environment layer
 This SDK is available in guest operating systems (Windows and
 Linux) where VMware Tools is installed




26
vSphere Guest SDK

 Data that is displayed includes:
 •   Resources that the host has allocated to this virtual machine
 •   Actual resource utilization by the VM                                     SD
                                                                                  K
 •   Elapsed time since this VM was last powered on or reset
 •   CPU time scheduled on the host system for a particular VM’s CPU
     (this information combined with other available statistics allows you
     to estimate how fast this VM’s CPU is running relative to the host CPU)
 Since vSphere 4.0, the Guest SDK now reports on more VM-
 specific performance statistics than were previously available
 Strong security rules prevent a virtual machine from having
 complete knowledge of the host that it runs on
 Applications requiring host level data must use the vSphere Web
 Services SDK (which would require host/vCenter authentication)



27
VIX API

 The VIX API offers 2 categories of capabilities:
 • VM operations
 • Ability to transfer files between the hypervisor and the guest      SD
                                                                          K
 • Start and stop applications inside the guest (needs VMware tools)
 The first category of actions are available through the vSphere Web
 Services API (already discussed earlier)
 The latter categories of actions will be available in the WS API in
 a future release – at that point, the VIX API will become defunct
 Communications with the guest require a valid credential against
 the Guest Operating System




28
vSphere Management Automation Interfaces



                                                                             vSphere Management
                               Guest SDK                                       Assistant (vMA)

                                                                            Partner Agents/Tools/CLIs
 Partner GUI Plug-in
                                                    Power CLI                       vSphere CLI


                            SDK for Java           SDK for .NET                     SDK for Perl


                  Client Plug-in API     VIX API       Web Services API       H/W Mgmt APIs

                                   vSphere (ESX/ESXi + vCenter)                                      Virtual Disk
                                                                                                   Development Kit


                                  Platform    Memory        Network       Storage       Other
                  Host
                Hardware



29
Helpful Resources
 For all your integration needs go to http://developer.vmware.com
 Developer Support can be purchased from the GSS organization.
 They answer questions like
 • Can I automate the following use-case using the APIs?
 • If so, where is the documentation/samples to help me?
 • I tried it and it does not work. Can you help me troubleshoot?
 • I think I found a bug in vSphere
 Some other related sessions that may be of interest
 • PPC-02: Best Practices in Using the vSphere Web Services SDK
 • PPC-03: All about vSphere Events, Alarms and Tasks
 • PPC-04: vSphere APIs for Performance Monitoring
 • PPC-05: Demystifying Property Collector
 • PPC-07: War Stories from the Trenches (from our Developer Support team)
 • PPC-14: vCloud API – SDK to Improve Efficiency when Building Your Clouds
 • PPC-17: Hardware Health Monitoring – Present and Future

30
Support and Training available for PowerCLI and SDKs




 Scripting / development support for SDKs and PowerCLI
 http://vmware.com/go/sdksupport


 PowerCLI Training: http://vmware.com/go/vsphereautomation




31

Mais conteúdo relacionado

Mais procurados

Super Fast Application development with Mura CMS
Super Fast Application development with Mura CMSSuper Fast Application development with Mura CMS
Super Fast Application development with Mura CMSColdFusionConference
 
Making Symofny shine with Varnish - SymfonyCon Madrid 2014
Making Symofny shine with Varnish - SymfonyCon Madrid 2014Making Symofny shine with Varnish - SymfonyCon Madrid 2014
Making Symofny shine with Varnish - SymfonyCon Madrid 2014Barel Barelon
 
Deploy, Scale and Manage your Application with AWS Elastic Beanstalk
Deploy, Scale and Manage your Application with AWS Elastic BeanstalkDeploy, Scale and Manage your Application with AWS Elastic Beanstalk
Deploy, Scale and Manage your Application with AWS Elastic BeanstalkAmazon Web Services
 
Expand Your ColdFusion App Power with AWS
Expand Your ColdFusion App Power with AWSExpand Your ColdFusion App Power with AWS
Expand Your ColdFusion App Power with AWSColdFusionConference
 
Become a Security Rockstar with ColdFusion 2016
Become a Security Rockstar with ColdFusion 2016Become a Security Rockstar with ColdFusion 2016
Become a Security Rockstar with ColdFusion 2016ColdFusionConference
 
Clustering Multiple Instances in Cold Fusion
Clustering Multiple Instances in Cold FusionClustering Multiple Instances in Cold Fusion
Clustering Multiple Instances in Cold FusionMindfire Solutions
 
Accessible Video Anywhere with ColdFusion an AWS
Accessible Video Anywhere with ColdFusion an AWSAccessible Video Anywhere with ColdFusion an AWS
Accessible Video Anywhere with ColdFusion an AWSColdFusionConference
 
In The Trenches With Tomster, Upgrading Ember.js & Ember Data
In The Trenches With Tomster, Upgrading Ember.js & Ember DataIn The Trenches With Tomster, Upgrading Ember.js & Ember Data
In The Trenches With Tomster, Upgrading Ember.js & Ember DataStacy London
 
A First Look at vSphere Integrated Containers and Photon Platform
A First Look at vSphere Integrated Containers and Photon PlatformA First Look at vSphere Integrated Containers and Photon Platform
A First Look at vSphere Integrated Containers and Photon PlatformDan Wendlandt
 
No Docker? No Problem: Automating installation and config with Ansible
No Docker? No Problem: Automating installation and config with AnsibleNo Docker? No Problem: Automating installation and config with Ansible
No Docker? No Problem: Automating installation and config with AnsibleJeff Potts
 
Microsoft Azure 新功能導覽 @ Build 2014
Microsoft Azure 新功能導覽 @ Build 2014Microsoft Azure 新功能導覽 @ Build 2014
Microsoft Azure 新功能導覽 @ Build 2014Jeff Chu
 
VMware compute driver for OpenStack
VMware compute driver for OpenStackVMware compute driver for OpenStack
VMware compute driver for OpenStackopenstackindia
 
Build your own clouds with Chef and MCollective
Build your own clouds with Chef and MCollectiveBuild your own clouds with Chef and MCollective
Build your own clouds with Chef and MCollectiveJonathan Weiss
 
Containers and security
Containers and securityContainers and security
Containers and securitysriram_rajan
 
VMware goes container crazy with vSphere integrated containers
VMware goes container crazy with vSphere integrated containersVMware goes container crazy with vSphere integrated containers
VMware goes container crazy with vSphere integrated containersvmware academy
 
VSphere Integrated Containers v3.0
VSphere Integrated Containers v3.0VSphere Integrated Containers v3.0
VSphere Integrated Containers v3.0The World Bank
 
Virtual machines and containers
Virtual machines and containersVirtual machines and containers
Virtual machines and containersPatrick Pierson
 

Mais procurados (20)

Super Fast Application development with Mura CMS
Super Fast Application development with Mura CMSSuper Fast Application development with Mura CMS
Super Fast Application development with Mura CMS
 
Making Symofny shine with Varnish - SymfonyCon Madrid 2014
Making Symofny shine with Varnish - SymfonyCon Madrid 2014Making Symofny shine with Varnish - SymfonyCon Madrid 2014
Making Symofny shine with Varnish - SymfonyCon Madrid 2014
 
Deploy, Scale and Manage your Application with AWS Elastic Beanstalk
Deploy, Scale and Manage your Application with AWS Elastic BeanstalkDeploy, Scale and Manage your Application with AWS Elastic Beanstalk
Deploy, Scale and Manage your Application with AWS Elastic Beanstalk
 
Locking Down CF Servers
Locking Down CF ServersLocking Down CF Servers
Locking Down CF Servers
 
Expand Your ColdFusion App Power with AWS
Expand Your ColdFusion App Power with AWSExpand Your ColdFusion App Power with AWS
Expand Your ColdFusion App Power with AWS
 
Become a Security Rockstar with ColdFusion 2016
Become a Security Rockstar with ColdFusion 2016Become a Security Rockstar with ColdFusion 2016
Become a Security Rockstar with ColdFusion 2016
 
Clustering Multiple Instances in Cold Fusion
Clustering Multiple Instances in Cold FusionClustering Multiple Instances in Cold Fusion
Clustering Multiple Instances in Cold Fusion
 
Accessible Video Anywhere with ColdFusion an AWS
Accessible Video Anywhere with ColdFusion an AWSAccessible Video Anywhere with ColdFusion an AWS
Accessible Video Anywhere with ColdFusion an AWS
 
In The Trenches With Tomster, Upgrading Ember.js & Ember Data
In The Trenches With Tomster, Upgrading Ember.js & Ember DataIn The Trenches With Tomster, Upgrading Ember.js & Ember Data
In The Trenches With Tomster, Upgrading Ember.js & Ember Data
 
A First Look at vSphere Integrated Containers and Photon Platform
A First Look at vSphere Integrated Containers and Photon PlatformA First Look at vSphere Integrated Containers and Photon Platform
A First Look at vSphere Integrated Containers and Photon Platform
 
No Docker? No Problem: Automating installation and config with Ansible
No Docker? No Problem: Automating installation and config with AnsibleNo Docker? No Problem: Automating installation and config with Ansible
No Docker? No Problem: Automating installation and config with Ansible
 
Microsoft Azure 新功能導覽 @ Build 2014
Microsoft Azure 新功能導覽 @ Build 2014Microsoft Azure 新功能導覽 @ Build 2014
Microsoft Azure 新功能導覽 @ Build 2014
 
VMware compute driver for OpenStack
VMware compute driver for OpenStackVMware compute driver for OpenStack
VMware compute driver for OpenStack
 
Hidden gems in cf2016
Hidden gems in cf2016Hidden gems in cf2016
Hidden gems in cf2016
 
Virtualized containers
Virtualized containersVirtualized containers
Virtualized containers
 
Build your own clouds with Chef and MCollective
Build your own clouds with Chef and MCollectiveBuild your own clouds with Chef and MCollective
Build your own clouds with Chef and MCollective
 
Containers and security
Containers and securityContainers and security
Containers and security
 
VMware goes container crazy with vSphere integrated containers
VMware goes container crazy with vSphere integrated containersVMware goes container crazy with vSphere integrated containers
VMware goes container crazy with vSphere integrated containers
 
VSphere Integrated Containers v3.0
VSphere Integrated Containers v3.0VSphere Integrated Containers v3.0
VSphere Integrated Containers v3.0
 
Virtual machines and containers
Virtual machines and containersVirtual machines and containers
Virtual machines and containers
 

Semelhante a Manage VMs Using APIs and PowerCLI

VMware vSphere technical presentation
VMware vSphere technical presentationVMware vSphere technical presentation
VMware vSphere technical presentationaleyeldean
 
vmwarevspheretechnicalpresentation-100822072122-phpapp01.pdf
vmwarevspheretechnicalpresentation-100822072122-phpapp01.pdfvmwarevspheretechnicalpresentation-100822072122-phpapp01.pdf
vmwarevspheretechnicalpresentation-100822072122-phpapp01.pdfsamarth97
 
Creating v sphere client plug ins
Creating v sphere client plug insCreating v sphere client plug ins
Creating v sphere client plug insPablo Roesch
 
Managing ESXi - Tools and Techniques
Managing ESXi - Tools and TechniquesManaging ESXi - Tools and Techniques
Managing ESXi - Tools and TechniquesChristopher Janoch
 
Introduction to VMware Infrastructure
Introduction to VMware  Infrastructure  Introduction to VMware  Infrastructure
Introduction to VMware Infrastructure aktivfinger
 
Mid term report
Mid term reportMid term report
Mid term reportlokesh039
 
Virtualisation with v mware
Virtualisation with v mwareVirtualisation with v mware
Virtualisation with v mwaresagaroceanic11
 
Tudor Damian - Comparing Microsoft Cloud with VMware Cloud
Tudor Damian - Comparing Microsoft Cloud with VMware CloudTudor Damian - Comparing Microsoft Cloud with VMware Cloud
Tudor Damian - Comparing Microsoft Cloud with VMware CloudITSpark Community
 
Infraestructure WMWARE
Infraestructure  WMWAREInfraestructure  WMWARE
Infraestructure WMWAREaktivfinger
 
VMware vCloud Director
VMware vCloud DirectorVMware vCloud Director
VMware vCloud DirectorErik Bussink
 
Virtualization meisen 042811
Virtualization meisen 042811Virtualization meisen 042811
Virtualization meisen 042811Morty Eisen
 
Vmware virtualization in data centers
Vmware virtualization in data centersVmware virtualization in data centers
Vmware virtualization in data centersHarshitTaneja13
 
Qinnova Cloud Computing Session
Qinnova Cloud Computing Session Qinnova Cloud Computing Session
Qinnova Cloud Computing Session aleyeldean
 
What’s new in vSphere 5 and vCenter Server Heartbeat – Customer Presentation
What’s new in vSphere 5 and vCenter Server Heartbeat – Customer PresentationWhat’s new in vSphere 5 and vCenter Server Heartbeat – Customer Presentation
What’s new in vSphere 5 and vCenter Server Heartbeat – Customer PresentationSuministros Obras y Sistemas
 
Virtualization VMWare technology
Virtualization VMWare technologyVirtualization VMWare technology
Virtualization VMWare technologysanjoysanyal
 

Semelhante a Manage VMs Using APIs and PowerCLI (20)

Transitioning to vmWare ESXi
Transitioning to vmWare ESXiTransitioning to vmWare ESXi
Transitioning to vmWare ESXi
 
VMware vSphere technical presentation
VMware vSphere technical presentationVMware vSphere technical presentation
VMware vSphere technical presentation
 
Virtualization & tipping point
Virtualization & tipping pointVirtualization & tipping point
Virtualization & tipping point
 
VMware vSphere 6 & Horizon View 6.1 – What's New ?
VMware vSphere 6 & Horizon View 6.1 – What's New ?VMware vSphere 6 & Horizon View 6.1 – What's New ?
VMware vSphere 6 & Horizon View 6.1 – What's New ?
 
vmwarevspheretechnicalpresentation-100822072122-phpapp01.pdf
vmwarevspheretechnicalpresentation-100822072122-phpapp01.pdfvmwarevspheretechnicalpresentation-100822072122-phpapp01.pdf
vmwarevspheretechnicalpresentation-100822072122-phpapp01.pdf
 
Creating v sphere client plug ins
Creating v sphere client plug insCreating v sphere client plug ins
Creating v sphere client plug ins
 
Managing ESXi - Tools and Techniques
Managing ESXi - Tools and TechniquesManaging ESXi - Tools and Techniques
Managing ESXi - Tools and Techniques
 
Cloud reference model session3
Cloud reference model session3Cloud reference model session3
Cloud reference model session3
 
Introduction to VMware Infrastructure
Introduction to VMware  Infrastructure  Introduction to VMware  Infrastructure
Introduction to VMware Infrastructure
 
Mid term report
Mid term reportMid term report
Mid term report
 
Virtualisation with v mware
Virtualisation with v mwareVirtualisation with v mware
Virtualisation with v mware
 
Tudor Damian - Comparing Microsoft Cloud with VMware Cloud
Tudor Damian - Comparing Microsoft Cloud with VMware CloudTudor Damian - Comparing Microsoft Cloud with VMware Cloud
Tudor Damian - Comparing Microsoft Cloud with VMware Cloud
 
Infraestructure WMWARE
Infraestructure  WMWAREInfraestructure  WMWARE
Infraestructure WMWARE
 
VMware vCloud Director
VMware vCloud DirectorVMware vCloud Director
VMware vCloud Director
 
01 v mware overview
01  v mware overview01  v mware overview
01 v mware overview
 
Virtualization meisen 042811
Virtualization meisen 042811Virtualization meisen 042811
Virtualization meisen 042811
 
Vmware virtualization in data centers
Vmware virtualization in data centersVmware virtualization in data centers
Vmware virtualization in data centers
 
Qinnova Cloud Computing Session
Qinnova Cloud Computing Session Qinnova Cloud Computing Session
Qinnova Cloud Computing Session
 
What’s new in vSphere 5 and vCenter Server Heartbeat – Customer Presentation
What’s new in vSphere 5 and vCenter Server Heartbeat – Customer PresentationWhat’s new in vSphere 5 and vCenter Server Heartbeat – Customer Presentation
What’s new in vSphere 5 and vCenter Server Heartbeat – Customer Presentation
 
Virtualization VMWare technology
Virtualization VMWare technologyVirtualization VMWare technology
Virtualization VMWare technology
 

Mais de Alan Renouf

Advanced performance troubleshooting using esxtop
Advanced performance troubleshooting using esxtopAdvanced performance troubleshooting using esxtop
Advanced performance troubleshooting using esxtopAlan Renouf
 
vSphere APIs for performance monitoring
vSphere APIs for performance monitoringvSphere APIs for performance monitoring
vSphere APIs for performance monitoringAlan Renouf
 
TA6944 PowerCLI is for Administrators!
TA6944 PowerCLI is for Administrators!TA6944 PowerCLI is for Administrators!
TA6944 PowerCLI is for Administrators!Alan Renouf
 
VMware VI Toolkit UKVMUG
VMware VI Toolkit UKVMUGVMware VI Toolkit UKVMUG
VMware VI Toolkit UKVMUGAlan Renouf
 

Mais de Alan Renouf (6)

Bill board
Bill boardBill board
Bill board
 
Advanced performance troubleshooting using esxtop
Advanced performance troubleshooting using esxtopAdvanced performance troubleshooting using esxtop
Advanced performance troubleshooting using esxtop
 
PowerCLI & Onyx
PowerCLI & OnyxPowerCLI & Onyx
PowerCLI & Onyx
 
vSphere APIs for performance monitoring
vSphere APIs for performance monitoringvSphere APIs for performance monitoring
vSphere APIs for performance monitoring
 
TA6944 PowerCLI is for Administrators!
TA6944 PowerCLI is for Administrators!TA6944 PowerCLI is for Administrators!
TA6944 PowerCLI is for Administrators!
 
VMware VI Toolkit UKVMUG
VMware VI Toolkit UKVMUGVMware VI Toolkit UKVMUG
VMware VI Toolkit UKVMUG
 

Último

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 

Último (20)

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 

Manage VMs Using APIs and PowerCLI

  • 1. London Workshop Exploring VMware APIs Preetham Gopalaswamy Group Product Manager vCenter Server and vSphere APIs October 8, 2010 Managing Large vSphere Environments using SDKs / PowerCLI 1
  • 2. Disclaimer This session may contain product features that are currently under development. This session/overview of the new technology represents no commitment from VMware to deliver these features in any generally available product. Features are subject to change, and must not be included in contracts, purchase orders, or sales agreements of any kind. Technical feasibility and market demand will affect final delivery. Pricing and packaging for any new technologies or features discussed or presented have not been determined. “THESE FEATURES ARE REPRESENTATIVE OF FEATURE AREAS UNDER DEVELOPMENT. FEATURE COMMITMENTS ARE SUBJECT TO CHANGE, AND MUST NOT BE INCLUDED IN CONTRACTS, PURCHASE ORDERS, OR SALES AGREEMENTS OF ANY KIND. TECHNICAL FEASIBILITY AND MARKET DEMAND WILL AFFECT FINAL.” 2
  • 3. VMware API Overview VMware Enabled Independent Secure Private Cloud Public Clouds Public Clouds Solution API/CLI View Thin App Zimbra SaaS Other SaaS Applications Providers VMware End-User Computing Application API Google App VMforce Engine Spring vFabric Hyperic Other cloud Oher PaaS infrastructure VMware Cloud Application Platform Partners providers Virtualization/Hardware Health/Cloud API/CLI VMware Cloud Infrastructure and Management vCloud Datacenter vCenter vShield vCloud Director vCloud Express VMware vSphere: Foundation for Cloud Computing 3
  • 4. Some Much That I Can Do… Management capabilities available in the vSphere platform • Virtual Machine management • Host configuration (storage, networking) • Performance monitoring and management • Events and Alarms • Host hardware management and health monitoring • Virtual Storage management • Virtual machine content back-up and restore • User management (on hosts) • Virtual Disk manipulation • Communication from the host to the guest • Hypervisor information from inside the guest 4
  • 5. … But Which API Do I Use? What is your role and what are you trying to do? • System Administrator managing a few virtualized servers • Using the command-line to troubleshoot • Trying to configure an aspect of your infrastructure that does not have a GUI • Datacenter administrator in a Cloud Service Provider or large enterprise • Automate provisioning and management of 100s of hosts and 1000s of VMs • Monitor the hardware in your datacenter • Software developer in an ISV or large datacenter • Developing a management application that monitors and manages a virtual datacenter • Testing software in multiple VMs each running different a different OS • Creating a smart guest application that is virtualization-aware 5
  • 6. Agenda Guiding principles Virtualization Management through the Web Services API Hardware Health Monitoring and Management (CIM SMASH) Automation through CLIs (vCLI, PowerCLI) Language Specific SDKs (Perl, .NET, Java) Bridging the Hypervisor and the Guest (Guest SDK, VIX) 6
  • 7. Introduction Some core principles of the vSphere management capabilities: • They will be exposed by the server as a web-accessible interface • Any SDK that is distributed by VMware will leverage one or more of these interfaces • All capabilities available on ESXi will also be available on ESX and through the same interfaces • Management tools must integrate through vCenter where-ever possible 7
  • 8. vSphere Web Services SDK Once known as the VI API Service Web • Always available • Secure • Firewall friendly • Designed for network access • Standards based • Governed by access control rules 8
  • 9. vSphere Web Services SDK Available on ESX, ESXi, vCenter Service and VMware Server 2.0 Web Comprehensive interface for vSphere virtualization management Server (ESX/ESXi or vCenter) authentication credentials must be provided to access this interface The Web Services SDK will be refreshed each time the vSphere interface is enhanced to include new features – typically during major and minor vSphere releases This interface will maintain backward and forward compatibility for 2 releases 9
  • 10. vSphere Web Services SDK Provides interfaces to do the following: Service Web • Inventory retrieval (Hosts, VMs, Virtual Devices) • Virtual Machine management • Host configuration (storage, networking) • Performance monitoring and management Sample utilities are included with the vSphere SDK package to demonstrate use of the APIs. We are happy to enhance the samples based on input from our partners Clients can monitor the infrastructure through this API so that they are informed any time there is a change – through events or through the PropertyCollector vCenter enables the creation and configuration of alarms in response to specific events. The response to an alarm can be configured 10
  • 11. Hardware Health Monitoring and Management Hardware asset information and health information H He /W is exposed through the standards-based CIM a lt h SMASH interface (Systems Management Architecture for Server Hardware) This API is accessible on the hosts through an https interface VMware’s implementation uses the SFCB CIMOM and the default providers that ship in-box are open-source OMC providers VMware supports both CIM XML over http and WSMan While several management tools support CIM data, not many support CIM Indications or WSEventing. So, all CIM Indications are also available as SNMP traps VMware partners with all its OEM vendors and IHV partners to enable them to create CIM providers that enhance the hardware data available in vSphere 11
  • 12. What is CIM CIM stands for “Common Information Model”, an industry standard, object-oriented data model that provides a UML-based framework for describing management data CIM schemas are defined in a language called Managed Object Format (MOF). The Distributed Management Task Force (DMTF) is a standards body defining the CIM Schema with over1000 classes and associations Web-based Enterprise Management (WBEM) is a set of standards defining web-based CIM implementations. Transport between the CIM server and client can be CIM XML over http/https or WSman WBEM profiles define a collection of CIM elements and rules pertaining to a specific area of management 12
  • 13. Hardware Health Monitoring and Management CPU details H He /W a lt h Fan Battery Local RAID storage Power Supply Power State Management System logs System Memory Firmware Temperature Sensors 13
  • 14. vSphere CIM SMASH API vCenter includes a monitoring Service that aggregates H He /W hardware information (primarily health) from each a lt h of the hosts that it manages This service exposes information to the vSphere Client through a proprietary HTML interface The service is also integrated with the vCenter Alarms infrastructure so that key hardware events can trigger alarms The hardware health data is available only on the host. API users are encouraged to authenticate against vCenter and use the AcquireCIMTicket method to work against a host – rather than authenticate against the host 14
  • 15. Hardware Health Providers VMware provides a set of default hardware H He /W health providers a lt h Server and IHV partners often supply additional hardware health providers Experience enhanced if you install the partners’ providers Providers may need to be installed separately Server vendors often distribute an ESXi image customized for their hardware Each hardware vendor (server or IHV) is responsible for developing additional providers are installed if the default set of hardware health data does not give you all the information 15
  • 16. Command Line Interfaces VMware offers 2 types of command line interfaces • vSphere CLI/vCLI – once known as RCLI or VI CLI • PowerCLI – previously known as the VI Toolkit (for Windows) CL I 16
  • 17. vCLIs vSphere CLI offers the capabilities previously available only on the COS (Console Operating System) in Classic ESX, through a remote interface. CL This CLI is supported on both ESX and ESXi I Functionally, they are mainly focused on host configuration Most of the vSphere CLI commands are currently available through vCenter. VMware plans to support all of them through vCenter in a future release Most of the commands are Perl scripts and hence run in Linux and Windows The vSphere CLI can be downloaded and installed separately or as part of a VMware supplied virtual machine vMA (vSphere Management Assistant) 17
  • 18. vCLI: The Next Generation - esxcli esxcli was first introduced in vSphere 4.0 At its simplest it can be described as CLIs that run on the server with an XML front-end CL I The CLI functionality is broken into logical namespaces with actions specific to each namespace. To run such a command, one would say: esxcli [generic options] <namespace> <action> [specific options] Enables easy extensibility/upgrade of the command-line functionality without changing the client The goal is to transition all the current vCLI commands to the esxcli style in the future 18
  • 19. vSphere PowerCLI PowerCLI offers a command-line/scripting interface to vSphere management based on Microsoft PowerShell VMware has created over 250 cmdlets that expose CL I the most common management use-cases Cmdlets are simple, intuitive and can be easily and elegantly chained to accomplish complex management tasks This product boasts of a large, extremely active user community, that is enhancing our base implementation with new scripts that are available on the forum and at http://blogs.vmware.com/vipowershell 19
  • 20. The Simple Elegance of PowerCLI The script below shows how one can create snapshots for all VMs that are currently powered on The same task would be several 100 lines CL I of code using the vSphere Web Services SDK (Java binding) connect get-vm | where {$_.powerstate eq “poweredOn”} | new-snapshot get-cluster -name “mycluster” | get-vmhost | Get-VMHostStorage -RescanAllHBA disconnect The PowerCLI model will form the basis for all the language specific SDKs that VMware will offer the ecosystem 20
  • 21. vSphere [Language Specific] SDKs VMware offers its customers SDKs for different programming languages The following SDKs are currently available: SD K s • Perl (previously known as the VI Perl Toolkit) • .NET (available as part of the PowerCLI) • Java (now available as a Technology preview) These SDKs define a client-side data model specific to the particular programming language (Perl objects, .NET objects, Java objects) 21
  • 22. vSphere SDKs Architecture VMware CLIs and Customer/Partner Solutions SD K s vSphere SDK Utility Applications and Samples Abstraction Layer maps VMware entities into native objects provides a simple API to retrieve objects Runtime Layer interfaces with the web services vSphere Web Services SDK vSphere CIM SMASH API vCenter ESX ESX ESX ESX 22
  • 23. vSphere SDK for Perl (example) # login Util::connect(); SD K s # get VirtualMachine views for all powered on VM's my $vm_views = Vim::find_entity_views(view_type => 'VirtualMachine', filter => { 'runtime.powerState' => 'poweredOn' }); # snapshot each VM foreach my $vm (@$vm_views) { $vm->CreateSnapshot(name => 'snapshot sample', description => 'Snapshot created from workshop sample', memory => 0, quiesce => 0); print "Snapshot complete for VM: " . $vm->name . "n"; } # logout Util::disconnect(); 23
  • 24. Vitual Disk Development Kit (VDDK) Use the Virtual Disk Libraries to • Access/modify virtual disks (VixDiskLib) • Mount a volume/disk (ViMntapi) The vmdk file format is public… but • Let us avoid everyone implementing VMDK readers/writers • Avoid updating the readers/writers for every format update • Optimized code from VMware which has already done all this work • Low threshold to let ISV’s use VMDK as their native format (e.g. for backup) 24
  • 25. Vitual Disk Development Kit (VDDK) VDDK App 1. Login vCenter 2. Open(VM, vmdk, …) 4. Read(handle, …) 2a. GetTicket(Vm, Vmdk,…) 3. Open(vmdk, Ticket, …) 25
  • 26. vSphere Guest SDK API available to developers writing applications that will run in a virtual machine on a vSphere platform Available as a C or a Java library SD K Provides information about the virtual machine and limited information about the host that the machine is running on Enables customers to write smart applications that respond to changes at the virtual environment layer This SDK is available in guest operating systems (Windows and Linux) where VMware Tools is installed 26
  • 27. vSphere Guest SDK Data that is displayed includes: • Resources that the host has allocated to this virtual machine • Actual resource utilization by the VM SD K • Elapsed time since this VM was last powered on or reset • CPU time scheduled on the host system for a particular VM’s CPU (this information combined with other available statistics allows you to estimate how fast this VM’s CPU is running relative to the host CPU) Since vSphere 4.0, the Guest SDK now reports on more VM- specific performance statistics than were previously available Strong security rules prevent a virtual machine from having complete knowledge of the host that it runs on Applications requiring host level data must use the vSphere Web Services SDK (which would require host/vCenter authentication) 27
  • 28. VIX API The VIX API offers 2 categories of capabilities: • VM operations • Ability to transfer files between the hypervisor and the guest SD K • Start and stop applications inside the guest (needs VMware tools) The first category of actions are available through the vSphere Web Services API (already discussed earlier) The latter categories of actions will be available in the WS API in a future release – at that point, the VIX API will become defunct Communications with the guest require a valid credential against the Guest Operating System 28
  • 29. vSphere Management Automation Interfaces vSphere Management Guest SDK Assistant (vMA) Partner Agents/Tools/CLIs Partner GUI Plug-in Power CLI vSphere CLI SDK for Java SDK for .NET SDK for Perl Client Plug-in API VIX API Web Services API H/W Mgmt APIs vSphere (ESX/ESXi + vCenter) Virtual Disk Development Kit Platform Memory Network Storage Other Host Hardware 29
  • 30. Helpful Resources For all your integration needs go to http://developer.vmware.com Developer Support can be purchased from the GSS organization. They answer questions like • Can I automate the following use-case using the APIs? • If so, where is the documentation/samples to help me? • I tried it and it does not work. Can you help me troubleshoot? • I think I found a bug in vSphere Some other related sessions that may be of interest • PPC-02: Best Practices in Using the vSphere Web Services SDK • PPC-03: All about vSphere Events, Alarms and Tasks • PPC-04: vSphere APIs for Performance Monitoring • PPC-05: Demystifying Property Collector • PPC-07: War Stories from the Trenches (from our Developer Support team) • PPC-14: vCloud API – SDK to Improve Efficiency when Building Your Clouds • PPC-17: Hardware Health Monitoring – Present and Future 30
  • 31. Support and Training available for PowerCLI and SDKs Scripting / development support for SDKs and PowerCLI http://vmware.com/go/sdksupport PowerCLI Training: http://vmware.com/go/vsphereautomation 31