SlideShare une entreprise Scribd logo
1  sur  28
Introduction to vSphere APIs Using pyVmomi
pyVmomi
Michael Rice
@VirtDevNinja
http://errr-online.com/
https://github.com/michaelrice
About Michael Rice
❖ Software Developer @ Rackspace
❖ Trust me, I have a Linux beard.
❖ http://linuxbeard.com/image/114385301362
❖ RPM Package Maintainer for pyVmomi
❖ Leading community contributor to pyVmomi & community-
samples
❖ Creator of YAVIJAVA the VIJAVA fork
❖ StackOverflow pyVmomi & VIJAVA
About pyVmomi
❖ Open Source python SDK for vSphere
❖ Released Dec 2013
❖ License: Apache 2.0
❖ Python VMWare Managed Object Management Interface
❖ Other Vmomi projects include GoVmomi & rbVmomi
❖ Wraps vSphere WebServices SOAP API very tightly
❖ Its been around a long time!! Look on your 4.0 HostSystems!
❖ Multiple versions. Whats on HostSystems != whats on GitHub
Why Use Python & pyVmomi
❖ Python is easy for beginners to learn
❖ vSphere 6.0 VMWare released VMWare vCloud Suite SDK for Python
❖ http://developercenter.vmware.com/web/sdk/60/vcloudsuite-python
❖ Python is in the top 10 languages you should be learning RIGHT NOW!
❖ If you work in a mixed environment of admins running Windows, Mac and Linux then
the same Python code works for everyone! (mostly)
❖ Integrate with ConfigManagement like Ansible & SaltStack
❖ pySphere and pSphere are much slower because they use SUDS
❖ pyVmomi is FAST! 360 milliseconds to inventory 576 VMs
❖ Do tasks you can normally only do from the UI — Reset Alarms from Red to Green
Setting Up a Development
Environment
❖ Setup a Development vCenter using Simulator
❖ Install Python and VirtualEnv on our desktop
❖ Install Python IDE — pyCharm/IntelliJ, pyDev, etc..
❖ No Intelli-Sense due to dynamic nature of library
❖ Install pyVmomi
Installing vCenter SA
❖ Download vCenter Server Appliance 5.5 ova
❖ 6.0 has a bug and Simulator DOES NOT WORK!
❖ Deploy the OVA to Fusion or Workstation
❖ Use simple shell script to configure VCSA Simulator
❖ https://gist.github.com/michaelrice/
#!/bin/bash
# See the original work from William Lam at http://www.virtuallyghetto.com/
echo "Accepting EULA ..."
/usr/sbin/vpxd_servicecfg eula accept
echo "Setting default ports ..."
/usr/sbin/vpxd_servicecfg 'ports' 'defaults'
echo "Configuring Embedded DB ..."
/usr/sbin/vpxd_servicecfg 'db' 'write' 'embedded'
echo "Configuring SSO..."
/usr/sbin/vpxd_servicecfg 'sso' 'write' 'embedded' 'password'
echo "Starting VCSIM ..."
/usr/bin/vmware-vcsim-start default
echo "Starting VCSA ..."
/usr/sbin/vpxd_servicecfg service start
Install Python & VirtualEnv
❖ Please See one of the 1000’s of guides online
❖ I use 2.7 but pyVmomi supports the following versions
of Python: 2.6, 2.7, 3.3, 3.4
❖ On Mac consider brew install of python
Install an IDE
❖ pyCharm/IntelliJ
❖ pyDev
❖ Other
Install pyVmomi
❖ Universal/Recommended
❖ pip install -U pyvmomi
❖ RHEL/Fedora/CentOS
❖ yum install pyvmomi
❖ FreeBSD
❖ pkg install pyvmomi
Not So Fast!!
vSphere Object Model
❖ Managed Objects
❖ HostSystem, VirtualMachine, Folder, Network, etc..
❖ Managed Object Reference
❖ Used in MO to point to other associated managed objects
❖ Data Objects
❖ Information about a Managed Object. Properties of the
MO
Object Diagram
Basic Usage with Actual
Code!!
>>> from pyVim.connect import SmartConnect
>>> si = SmartConnect(host="vcsa", user="admin", pwd="password")
>>> host = si.content.searchIndex.FindByDnsName(None, “DC0_C0_H0”, False)
>>> print host.name
DC0_C0_H0
>>> print host.summary.hardware.model
ProLiant DL380 G5
3 Lines of Code to get a HostSystem!
List All HostSystems in
vCenter
service_instance = SmartConnect(User, Password, HostName)
Hosts = GetAllHosts(service_instance)
for host in Hosts:
PrintHostInfo(host)
def PrintHostInfo(host):
# print various property info for a given host
def GetAllHosts(service_instance):
# do work needed to get host related info here…
Solving Business Problems
❖ SAN Team has a “Non Impacting No Downtime Maintenance” to do on the SAN
Switches
❖ All customers have redundant connections
❖ Maint will require them to bring down A chan restore it then bring down B
chan and restore it
❖ Such a low risk VirtSupport not informed only customer is notified.
❖ vCenter Alarms monitor the SAN connections
❖ They see redundancy lost & trigger SNMP trap.
❖ Ticket is generated for each device!!
❖ 30 mins later its 3am & 100’s of tickets have hit the queue fire drill begins!
Solving Business Problems
❖ Already had SOP in place for how to manually work the Redundancy lost tickets
❖ Use python to connect to various APIs in company to gather data from ticket to
automate the SOP
❖ Use pyVmomi to connect vCenter to check for actual problem.
❖ Rescan HBA etc..
❖ Use pyVmomi to ack alarm & reset from red to green
❖ Use python to hit ticket API to close ticket if fixed or flag as real issue for
VirtSupport to go look at
❖ While this code was in production it worked 1000’s of tickets saving Rackers 100’s
of hours in NVA work.
Valuable Tools
❖ Onyx
❖ https://labs.vmware.com/flings/onyx
❖ Latest Version: 2.2.5
❖ Capture all traffic happening between client and server
❖ DoubleCloud Proxy
❖ Created by: Steve Jin
❖ http://www.doublecloud.org/doublecloud-proxy/
❖ Capture all traffic happening between client and server
Onyx & DoubleCloud Proxy
❖ Start the app and point them at your target vSphere
server
❖ Point your script or VIClient etc.. at proxy
❖ Profit
Things Ive Learned
❖ There are several “hidden” folders
❖ These can all be seen using the MOB
❖ HostSystems do not always have a unique UUID
❖ On Dell if Service Tag not set in BIOS it uses a generic default UUID
❖ When searching for them use the DNS Name or InventoryPath +
name
❖ InventoryPath can be tricky. Use MOB for help
❖ Using the UUID will return the first one it finds
❖ http://kb.vmware.com/kb/1006250
Things Ive Learned
❖ VirtualMachine BIOS UUID is shared by VMS in a vApp
❖ The only thing unique for use in searching for a VM is
the instance UUID so use it or the InventoryPath +
name
❖ Property Collectors are complicated but worth the extra
work
❖ You CAN NOT SCALE with out them!!
Must Have Links
❖ pyVmomi docs: https://github.com/vmware/pyvmomi/tree/master/docs
❖ community-samples: https://github.com/vmware/pyvmomi-community-samples/
❖ ~30 samples and growing!! Contribute today!!
❖ Help us: https://github.com/vmware/pyvmomi-community-
samples/labels/help%20wanted
❖ My Blog: http://www.errr-online.com/
❖ VMWare developer resources: http://developercenter.vmware.com/sdks
❖ Shawn Hartsock: http://hartsock.blogspot.com/
❖ VMWare employee currently maintaing pyVmomi
❖ youtube: https://www.youtube.com/playlist?list=PLO7-
YtwexdVIttJejhsBjo0TZPq0BSFfw
Getting Help
❖ pyVmomi: https://github.com/vmware/pyvmomi
❖ IRC: Freenode —> #pyvmomi
❖ Mailing List: http://pyvmomi.2338814.n4.nabble.com/
❖ StackOver Flow: tag post with pyvmomi

Contenu connexe

Tendances

Osnug meetup-tungsten fabric - overview.pptx
Osnug meetup-tungsten fabric - overview.pptxOsnug meetup-tungsten fabric - overview.pptx
Osnug meetup-tungsten fabric - overview.pptxM.Qasim Arham
 
Kubernetes overview 101
Kubernetes overview 101Kubernetes overview 101
Kubernetes overview 101Boskey Savla
 
Chef vs Puppet vs Ansible vs Saltstack | Configuration Management Tools | Dev...
Chef vs Puppet vs Ansible vs Saltstack | Configuration Management Tools | Dev...Chef vs Puppet vs Ansible vs Saltstack | Configuration Management Tools | Dev...
Chef vs Puppet vs Ansible vs Saltstack | Configuration Management Tools | Dev...Simplilearn
 
VMware Tanzu Kubernetes Connect
VMware Tanzu Kubernetes ConnectVMware Tanzu Kubernetes Connect
VMware Tanzu Kubernetes ConnectVMware Tanzu
 
Kubernetes Workshop
Kubernetes WorkshopKubernetes Workshop
Kubernetes Workshoploodse
 
Open stack
Open stackOpen stack
Open stacksvm
 
Docker Networking - Common Issues and Troubleshooting Techniques
Docker Networking - Common Issues and Troubleshooting TechniquesDocker Networking - Common Issues and Troubleshooting Techniques
Docker Networking - Common Issues and Troubleshooting TechniquesSreenivas Makam
 
Crossplane @ Mastering GitOps.pdf
Crossplane @ Mastering GitOps.pdfCrossplane @ Mastering GitOps.pdf
Crossplane @ Mastering GitOps.pdfQAware GmbH
 
Infrastructure as Code with Ansible
Infrastructure as Code with AnsibleInfrastructure as Code with Ansible
Infrastructure as Code with AnsibleDaniel Bezerra
 
Desktop virtualization
Desktop virtualizationDesktop virtualization
Desktop virtualizationatadrisi
 
Infrastructure as Code
Infrastructure as CodeInfrastructure as Code
Infrastructure as CodeRobert Greiner
 
OpenShift Overview
OpenShift OverviewOpenShift Overview
OpenShift Overviewroundman
 
Cloud Native Apps with GitOps
Cloud Native Apps with GitOps Cloud Native Apps with GitOps
Cloud Native Apps with GitOps Weaveworks
 
Developing applications with a microservice architecture (SVforum, microservi...
Developing applications with a microservice architecture (SVforum, microservi...Developing applications with a microservice architecture (SVforum, microservi...
Developing applications with a microservice architecture (SVforum, microservi...Chris Richardson
 
Ansible presentation
Ansible presentationAnsible presentation
Ansible presentationSuresh Kumar
 
Introduction to KubeSphere and its open source ecosystem
Introduction to KubeSphere and its open source ecosystemIntroduction to KubeSphere and its open source ecosystem
Introduction to KubeSphere and its open source ecosystemKubeSphere
 

Tendances (20)

Osnug meetup-tungsten fabric - overview.pptx
Osnug meetup-tungsten fabric - overview.pptxOsnug meetup-tungsten fabric - overview.pptx
Osnug meetup-tungsten fabric - overview.pptx
 
Kubernetes overview 101
Kubernetes overview 101Kubernetes overview 101
Kubernetes overview 101
 
Chef vs Puppet vs Ansible vs Saltstack | Configuration Management Tools | Dev...
Chef vs Puppet vs Ansible vs Saltstack | Configuration Management Tools | Dev...Chef vs Puppet vs Ansible vs Saltstack | Configuration Management Tools | Dev...
Chef vs Puppet vs Ansible vs Saltstack | Configuration Management Tools | Dev...
 
VMware Tanzu Kubernetes Connect
VMware Tanzu Kubernetes ConnectVMware Tanzu Kubernetes Connect
VMware Tanzu Kubernetes Connect
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to docker
 
Kubernetes Workshop
Kubernetes WorkshopKubernetes Workshop
Kubernetes Workshop
 
Open stack
Open stackOpen stack
Open stack
 
Docker Networking - Common Issues and Troubleshooting Techniques
Docker Networking - Common Issues and Troubleshooting TechniquesDocker Networking - Common Issues and Troubleshooting Techniques
Docker Networking - Common Issues and Troubleshooting Techniques
 
Crossplane @ Mastering GitOps.pdf
Crossplane @ Mastering GitOps.pdfCrossplane @ Mastering GitOps.pdf
Crossplane @ Mastering GitOps.pdf
 
Infrastructure as Code with Ansible
Infrastructure as Code with AnsibleInfrastructure as Code with Ansible
Infrastructure as Code with Ansible
 
Cloud Computing Using OpenStack
Cloud Computing Using OpenStack Cloud Computing Using OpenStack
Cloud Computing Using OpenStack
 
Desktop virtualization
Desktop virtualizationDesktop virtualization
Desktop virtualization
 
Infrastructure as Code
Infrastructure as CodeInfrastructure as Code
Infrastructure as Code
 
OpenShift Overview
OpenShift OverviewOpenShift Overview
OpenShift Overview
 
Cloud Native Apps with GitOps
Cloud Native Apps with GitOps Cloud Native Apps with GitOps
Cloud Native Apps with GitOps
 
Developing applications with a microservice architecture (SVforum, microservi...
Developing applications with a microservice architecture (SVforum, microservi...Developing applications with a microservice architecture (SVforum, microservi...
Developing applications with a microservice architecture (SVforum, microservi...
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
 
Ansible presentation
Ansible presentationAnsible presentation
Ansible presentation
 
Introduction to KubeSphere and its open source ecosystem
Introduction to KubeSphere and its open source ecosystemIntroduction to KubeSphere and its open source ecosystem
Introduction to KubeSphere and its open source ecosystem
 
Virtual Container - Docker
Virtual Container - Docker Virtual Container - Docker
Virtual Container - Docker
 

En vedette

Controlling multiple VMs with the power of Python
Controlling multiple VMs with the power of PythonControlling multiple VMs with the power of Python
Controlling multiple VMs with the power of PythonYurii Vasylenko
 
Vmware vSphere Api Best Practices
Vmware vSphere Api Best PracticesVmware vSphere Api Best Practices
Vmware vSphere Api Best PracticesPablo Roesch
 
vSphere APIs for performance monitoring
vSphere APIs for performance monitoringvSphere APIs for performance monitoring
vSphere APIs for performance monitoringAlan Renouf
 
Exploring VMware APIs by Preetham Gopalaswamy
Exploring VMware APIs by Preetham GopalaswamyExploring VMware APIs by Preetham Gopalaswamy
Exploring VMware APIs by Preetham GopalaswamyAlan Renouf
 
VMware Automation, PowerCLI presented at the Northern California PSUG
VMware Automation, PowerCLI presented at the Northern California PSUGVMware Automation, PowerCLI presented at the Northern California PSUG
VMware Automation, PowerCLI presented at the Northern California PSUGAlan Renouf
 
Salt Cloud vmware-orchestration
Salt Cloud vmware-orchestrationSalt Cloud vmware-orchestration
Salt Cloud vmware-orchestrationMo Rawi
 
CAS, OpenID, Shibboleth, SAML : concepts, différences et exemples
CAS, OpenID, Shibboleth, SAML : concepts, différences et exemplesCAS, OpenID, Shibboleth, SAML : concepts, différences et exemples
CAS, OpenID, Shibboleth, SAML : concepts, différences et exemplesClément OUDOT
 
Apache Zeppelin + Livy: Bringing Multi Tenancy to Interactive Data Analysis
Apache Zeppelin + Livy: Bringing Multi Tenancy to Interactive Data AnalysisApache Zeppelin + Livy: Bringing Multi Tenancy to Interactive Data Analysis
Apache Zeppelin + Livy: Bringing Multi Tenancy to Interactive Data AnalysisDataWorks Summit/Hadoop Summit
 
Big Data visualization with Apache Spark and Zeppelin
Big Data visualization with Apache Spark and ZeppelinBig Data visualization with Apache Spark and Zeppelin
Big Data visualization with Apache Spark and Zeppelinprajods
 
Advanced Apache Spark Meetup Data Sources API Cassandra Spark Connector Spark...
Advanced Apache Spark Meetup Data Sources API Cassandra Spark Connector Spark...Advanced Apache Spark Meetup Data Sources API Cassandra Spark Connector Spark...
Advanced Apache Spark Meetup Data Sources API Cassandra Spark Connector Spark...Chris Fregly
 
Explorez vos données avec apache zeppelin
Explorez vos données avec apache zeppelinExplorez vos données avec apache zeppelin
Explorez vos données avec apache zeppelinBruno Bonnin
 
Pyvmomiとansibleのdynamic inventory
Pyvmomiとansibleのdynamic inventoryPyvmomiとansibleのdynamic inventory
Pyvmomiとansibleのdynamic inventoryKentaro Kawano
 
Barracuda Email Security Gateway(旧 Barracuda Spam Firewall PLUS) 製品のご紹介
Barracuda Email Security Gateway(旧 Barracuda Spam Firewall PLUS) 製品のご紹介Barracuda Email Security Gateway(旧 Barracuda Spam Firewall PLUS) 製品のご紹介
Barracuda Email Security Gateway(旧 Barracuda Spam Firewall PLUS) 製品のご紹介BarracudaJapan
 
How to Adopt Infrastructure as Code
How to Adopt Infrastructure as CodeHow to Adopt Infrastructure as Code
How to Adopt Infrastructure as CodeNGINX, Inc.
 
Building an EmPyre with Python
Building an EmPyre with PythonBuilding an EmPyre with Python
Building an EmPyre with PythonWill Schroeder
 
TOSCA and OpenTOSCA: TOSCA Introduction and OpenTOSCA Ecosystem Overview
TOSCA and OpenTOSCA: TOSCA Introduction and OpenTOSCA Ecosystem OverviewTOSCA and OpenTOSCA: TOSCA Introduction and OpenTOSCA Ecosystem Overview
TOSCA and OpenTOSCA: TOSCA Introduction and OpenTOSCA Ecosystem OverviewOpenTOSCA
 
Seven Habits of Highly Effective Jenkins Users (2014 edition!)
Seven Habits of Highly Effective Jenkins Users (2014 edition!)Seven Habits of Highly Effective Jenkins Users (2014 edition!)
Seven Habits of Highly Effective Jenkins Users (2014 edition!)Andrew Bayer
 

En vedette (19)

Controlling multiple VMs with the power of Python
Controlling multiple VMs with the power of PythonControlling multiple VMs with the power of Python
Controlling multiple VMs with the power of Python
 
Vmware vSphere Api Best Practices
Vmware vSphere Api Best PracticesVmware vSphere Api Best Practices
Vmware vSphere Api Best Practices
 
vSphere APIs for performance monitoring
vSphere APIs for performance monitoringvSphere APIs for performance monitoring
vSphere APIs for performance monitoring
 
Exploring VMware APIs by Preetham Gopalaswamy
Exploring VMware APIs by Preetham GopalaswamyExploring VMware APIs by Preetham Gopalaswamy
Exploring VMware APIs by Preetham Gopalaswamy
 
VMware Automation, PowerCLI presented at the Northern California PSUG
VMware Automation, PowerCLI presented at the Northern California PSUGVMware Automation, PowerCLI presented at the Northern California PSUG
VMware Automation, PowerCLI presented at the Northern California PSUG
 
Salt Cloud vmware-orchestration
Salt Cloud vmware-orchestrationSalt Cloud vmware-orchestration
Salt Cloud vmware-orchestration
 
CAS, OpenID, Shibboleth, SAML : concepts, différences et exemples
CAS, OpenID, Shibboleth, SAML : concepts, différences et exemplesCAS, OpenID, Shibboleth, SAML : concepts, différences et exemples
CAS, OpenID, Shibboleth, SAML : concepts, différences et exemples
 
Apache Zeppelin + Livy: Bringing Multi Tenancy to Interactive Data Analysis
Apache Zeppelin + Livy: Bringing Multi Tenancy to Interactive Data AnalysisApache Zeppelin + Livy: Bringing Multi Tenancy to Interactive Data Analysis
Apache Zeppelin + Livy: Bringing Multi Tenancy to Interactive Data Analysis
 
Big Data visualization with Apache Spark and Zeppelin
Big Data visualization with Apache Spark and ZeppelinBig Data visualization with Apache Spark and Zeppelin
Big Data visualization with Apache Spark and Zeppelin
 
Advanced Apache Spark Meetup Data Sources API Cassandra Spark Connector Spark...
Advanced Apache Spark Meetup Data Sources API Cassandra Spark Connector Spark...Advanced Apache Spark Meetup Data Sources API Cassandra Spark Connector Spark...
Advanced Apache Spark Meetup Data Sources API Cassandra Spark Connector Spark...
 
Explorez vos données avec apache zeppelin
Explorez vos données avec apache zeppelinExplorez vos données avec apache zeppelin
Explorez vos données avec apache zeppelin
 
Pyvmomiとansibleのdynamic inventory
Pyvmomiとansibleのdynamic inventoryPyvmomiとansibleのdynamic inventory
Pyvmomiとansibleのdynamic inventory
 
Barracuda Email Security Gateway(旧 Barracuda Spam Firewall PLUS) 製品のご紹介
Barracuda Email Security Gateway(旧 Barracuda Spam Firewall PLUS) 製品のご紹介Barracuda Email Security Gateway(旧 Barracuda Spam Firewall PLUS) 製品のご紹介
Barracuda Email Security Gateway(旧 Barracuda Spam Firewall PLUS) 製品のご紹介
 
How to Adopt Infrastructure as Code
How to Adopt Infrastructure as CodeHow to Adopt Infrastructure as Code
How to Adopt Infrastructure as Code
 
Apache Zeppelin Helium and Beyond
Apache Zeppelin Helium and BeyondApache Zeppelin Helium and Beyond
Apache Zeppelin Helium and Beyond
 
Building an EmPyre with Python
Building an EmPyre with PythonBuilding an EmPyre with Python
Building an EmPyre with Python
 
TOSCA and OpenTOSCA: TOSCA Introduction and OpenTOSCA Ecosystem Overview
TOSCA and OpenTOSCA: TOSCA Introduction and OpenTOSCA Ecosystem OverviewTOSCA and OpenTOSCA: TOSCA Introduction and OpenTOSCA Ecosystem Overview
TOSCA and OpenTOSCA: TOSCA Introduction and OpenTOSCA Ecosystem Overview
 
Seven Habits of Highly Effective Jenkins Users (2014 edition!)
Seven Habits of Highly Effective Jenkins Users (2014 edition!)Seven Habits of Highly Effective Jenkins Users (2014 edition!)
Seven Habits of Highly Effective Jenkins Users (2014 edition!)
 
The new Netflix API
The new Netflix APIThe new Netflix API
The new Netflix API
 

Similaire à Introduction to vSphere APIs Using pyVmomi

Vagrant-Overview
Vagrant-OverviewVagrant-Overview
Vagrant-OverviewCrifkin
 
Small Python Tools for Software Release Engineering
Small Python Tools for Software Release EngineeringSmall Python Tools for Software Release Engineering
Small Python Tools for Software Release Engineeringpycontw
 
Automating Software Development Life Cycle - A DevOps Approach
Automating Software Development Life Cycle - A DevOps ApproachAutomating Software Development Life Cycle - A DevOps Approach
Automating Software Development Life Cycle - A DevOps ApproachAkshaya Mahapatra
 
Ops for NoOps - Operational Challenges for Serverless Apps
Ops for NoOps - Operational Challenges for Serverless AppsOps for NoOps - Operational Challenges for Serverless Apps
Ops for NoOps - Operational Challenges for Serverless AppsErica Windisch
 
Symfony finally swiped right on envvars
Symfony finally swiped right on envvarsSymfony finally swiped right on envvars
Symfony finally swiped right on envvarsSam Marley-Jarrett
 
Lessons On Hyper V
Lessons On Hyper VLessons On Hyper V
Lessons On Hyper VAidan Finn
 
Getting started with puppet and vagrant (1)
Getting started with puppet and vagrant (1)Getting started with puppet and vagrant (1)
Getting started with puppet and vagrant (1)Puppet
 
Docker Security workshop slides
Docker Security workshop slidesDocker Security workshop slides
Docker Security workshop slidesDocker, Inc.
 
Puppet for dummies - PHPBenelux UG edition
Puppet for dummies - PHPBenelux UG editionPuppet for dummies - PHPBenelux UG edition
Puppet for dummies - PHPBenelux UG editionJoshua Thijssen
 
Making Developers Productive with Vagrant, VirtualBox, and Docker
Making Developers Productive with Vagrant, VirtualBox, and DockerMaking Developers Productive with Vagrant, VirtualBox, and Docker
Making Developers Productive with Vagrant, VirtualBox, and DockerJohn Rofrano
 
Top Troubleshooting Tips and Techniques for Citrix XenServer Deployments
Top Troubleshooting Tips and Techniques for Citrix XenServer DeploymentsTop Troubleshooting Tips and Techniques for Citrix XenServer Deployments
Top Troubleshooting Tips and Techniques for Citrix XenServer DeploymentsDavid McGeough
 
Create Development and Production Environments with Vagrant
Create Development and Production Environments with VagrantCreate Development and Production Environments with Vagrant
Create Development and Production Environments with VagrantBrian Hogan
 
Containerizing your Security Operations Center
Containerizing your Security Operations CenterContainerizing your Security Operations Center
Containerizing your Security Operations CenterJimmy Mesta
 
Как мы взломали распределенные системы конфигурационного управления
Как мы взломали распределенные системы конфигурационного управленияКак мы взломали распределенные системы конфигурационного управления
Как мы взломали распределенные системы конфигурационного управленияPositive Hack Days
 
[Mas 500] Various Topics
[Mas 500] Various Topics[Mas 500] Various Topics
[Mas 500] Various Topicsrahulbot
 
Modern tooling to assist with developing applications on FreeBSD
Modern tooling to assist with developing applications on FreeBSDModern tooling to assist with developing applications on FreeBSD
Modern tooling to assist with developing applications on FreeBSDSean Chittenden
 
DEF CON 27 - ORANGE TSAI and MEH CHANG - infiltrating corporate intranet like...
DEF CON 27 - ORANGE TSAI and MEH CHANG - infiltrating corporate intranet like...DEF CON 27 - ORANGE TSAI and MEH CHANG - infiltrating corporate intranet like...
DEF CON 27 - ORANGE TSAI and MEH CHANG - infiltrating corporate intranet like...Felipe Prado
 
Deploying Symfony | symfony.cat
Deploying Symfony | symfony.catDeploying Symfony | symfony.cat
Deploying Symfony | symfony.catPablo Godel
 
V mware
V mwareV mware
V mwaredvmug1
 

Similaire à Introduction to vSphere APIs Using pyVmomi (20)

Vagrant-Overview
Vagrant-OverviewVagrant-Overview
Vagrant-Overview
 
Small Python Tools for Software Release Engineering
Small Python Tools for Software Release EngineeringSmall Python Tools for Software Release Engineering
Small Python Tools for Software Release Engineering
 
Automating Software Development Life Cycle - A DevOps Approach
Automating Software Development Life Cycle - A DevOps ApproachAutomating Software Development Life Cycle - A DevOps Approach
Automating Software Development Life Cycle - A DevOps Approach
 
Ops for NoOps - Operational Challenges for Serverless Apps
Ops for NoOps - Operational Challenges for Serverless AppsOps for NoOps - Operational Challenges for Serverless Apps
Ops for NoOps - Operational Challenges for Serverless Apps
 
Symfony finally swiped right on envvars
Symfony finally swiped right on envvarsSymfony finally swiped right on envvars
Symfony finally swiped right on envvars
 
Lessons On Hyper V
Lessons On Hyper VLessons On Hyper V
Lessons On Hyper V
 
London Hug 20/6 - Vault production
London Hug 20/6 - Vault productionLondon Hug 20/6 - Vault production
London Hug 20/6 - Vault production
 
Getting started with puppet and vagrant (1)
Getting started with puppet and vagrant (1)Getting started with puppet and vagrant (1)
Getting started with puppet and vagrant (1)
 
Docker Security workshop slides
Docker Security workshop slidesDocker Security workshop slides
Docker Security workshop slides
 
Puppet for dummies - PHPBenelux UG edition
Puppet for dummies - PHPBenelux UG editionPuppet for dummies - PHPBenelux UG edition
Puppet for dummies - PHPBenelux UG edition
 
Making Developers Productive with Vagrant, VirtualBox, and Docker
Making Developers Productive with Vagrant, VirtualBox, and DockerMaking Developers Productive with Vagrant, VirtualBox, and Docker
Making Developers Productive with Vagrant, VirtualBox, and Docker
 
Top Troubleshooting Tips and Techniques for Citrix XenServer Deployments
Top Troubleshooting Tips and Techniques for Citrix XenServer DeploymentsTop Troubleshooting Tips and Techniques for Citrix XenServer Deployments
Top Troubleshooting Tips and Techniques for Citrix XenServer Deployments
 
Create Development and Production Environments with Vagrant
Create Development and Production Environments with VagrantCreate Development and Production Environments with Vagrant
Create Development and Production Environments with Vagrant
 
Containerizing your Security Operations Center
Containerizing your Security Operations CenterContainerizing your Security Operations Center
Containerizing your Security Operations Center
 
Как мы взломали распределенные системы конфигурационного управления
Как мы взломали распределенные системы конфигурационного управленияКак мы взломали распределенные системы конфигурационного управления
Как мы взломали распределенные системы конфигурационного управления
 
[Mas 500] Various Topics
[Mas 500] Various Topics[Mas 500] Various Topics
[Mas 500] Various Topics
 
Modern tooling to assist with developing applications on FreeBSD
Modern tooling to assist with developing applications on FreeBSDModern tooling to assist with developing applications on FreeBSD
Modern tooling to assist with developing applications on FreeBSD
 
DEF CON 27 - ORANGE TSAI and MEH CHANG - infiltrating corporate intranet like...
DEF CON 27 - ORANGE TSAI and MEH CHANG - infiltrating corporate intranet like...DEF CON 27 - ORANGE TSAI and MEH CHANG - infiltrating corporate intranet like...
DEF CON 27 - ORANGE TSAI and MEH CHANG - infiltrating corporate intranet like...
 
Deploying Symfony | symfony.cat
Deploying Symfony | symfony.catDeploying Symfony | symfony.cat
Deploying Symfony | symfony.cat
 
V mware
V mwareV mware
V mware
 

Dernier

OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...Shane Coughlan
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...kalichargn70th171
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfryanfarris8
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...SelfMade bd
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfonteinmasabamasaba
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...Nitya salvi
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfproinshot.com
 
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456KiaraTiradoMicha
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrandmasabamasaba
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024Mind IT Systems
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfonteinmasabamasaba
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 

Dernier (20)

OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 

Introduction to vSphere APIs Using pyVmomi

  • 1. Introduction to vSphere APIs Using pyVmomi pyVmomi Michael Rice @VirtDevNinja http://errr-online.com/ https://github.com/michaelrice
  • 2. About Michael Rice ❖ Software Developer @ Rackspace ❖ Trust me, I have a Linux beard. ❖ http://linuxbeard.com/image/114385301362 ❖ RPM Package Maintainer for pyVmomi ❖ Leading community contributor to pyVmomi & community- samples ❖ Creator of YAVIJAVA the VIJAVA fork ❖ StackOverflow pyVmomi & VIJAVA
  • 3.
  • 4. About pyVmomi ❖ Open Source python SDK for vSphere ❖ Released Dec 2013 ❖ License: Apache 2.0 ❖ Python VMWare Managed Object Management Interface ❖ Other Vmomi projects include GoVmomi & rbVmomi ❖ Wraps vSphere WebServices SOAP API very tightly ❖ Its been around a long time!! Look on your 4.0 HostSystems! ❖ Multiple versions. Whats on HostSystems != whats on GitHub
  • 5. Why Use Python & pyVmomi ❖ Python is easy for beginners to learn ❖ vSphere 6.0 VMWare released VMWare vCloud Suite SDK for Python ❖ http://developercenter.vmware.com/web/sdk/60/vcloudsuite-python ❖ Python is in the top 10 languages you should be learning RIGHT NOW! ❖ If you work in a mixed environment of admins running Windows, Mac and Linux then the same Python code works for everyone! (mostly) ❖ Integrate with ConfigManagement like Ansible & SaltStack ❖ pySphere and pSphere are much slower because they use SUDS ❖ pyVmomi is FAST! 360 milliseconds to inventory 576 VMs ❖ Do tasks you can normally only do from the UI — Reset Alarms from Red to Green
  • 6. Setting Up a Development Environment ❖ Setup a Development vCenter using Simulator ❖ Install Python and VirtualEnv on our desktop ❖ Install Python IDE — pyCharm/IntelliJ, pyDev, etc.. ❖ No Intelli-Sense due to dynamic nature of library ❖ Install pyVmomi
  • 7. Installing vCenter SA ❖ Download vCenter Server Appliance 5.5 ova ❖ 6.0 has a bug and Simulator DOES NOT WORK! ❖ Deploy the OVA to Fusion or Workstation ❖ Use simple shell script to configure VCSA Simulator ❖ https://gist.github.com/michaelrice/
  • 8. #!/bin/bash # See the original work from William Lam at http://www.virtuallyghetto.com/ echo "Accepting EULA ..." /usr/sbin/vpxd_servicecfg eula accept echo "Setting default ports ..." /usr/sbin/vpxd_servicecfg 'ports' 'defaults' echo "Configuring Embedded DB ..." /usr/sbin/vpxd_servicecfg 'db' 'write' 'embedded' echo "Configuring SSO..." /usr/sbin/vpxd_servicecfg 'sso' 'write' 'embedded' 'password' echo "Starting VCSIM ..." /usr/bin/vmware-vcsim-start default echo "Starting VCSA ..." /usr/sbin/vpxd_servicecfg service start
  • 9.
  • 10. Install Python & VirtualEnv ❖ Please See one of the 1000’s of guides online ❖ I use 2.7 but pyVmomi supports the following versions of Python: 2.6, 2.7, 3.3, 3.4 ❖ On Mac consider brew install of python
  • 11. Install an IDE ❖ pyCharm/IntelliJ ❖ pyDev ❖ Other
  • 12. Install pyVmomi ❖ Universal/Recommended ❖ pip install -U pyvmomi ❖ RHEL/Fedora/CentOS ❖ yum install pyvmomi ❖ FreeBSD ❖ pkg install pyvmomi
  • 14. vSphere Object Model ❖ Managed Objects ❖ HostSystem, VirtualMachine, Folder, Network, etc.. ❖ Managed Object Reference ❖ Used in MO to point to other associated managed objects ❖ Data Objects ❖ Information about a Managed Object. Properties of the MO
  • 16.
  • 17.
  • 18. Basic Usage with Actual Code!! >>> from pyVim.connect import SmartConnect >>> si = SmartConnect(host="vcsa", user="admin", pwd="password") >>> host = si.content.searchIndex.FindByDnsName(None, “DC0_C0_H0”, False) >>> print host.name DC0_C0_H0 >>> print host.summary.hardware.model ProLiant DL380 G5 3 Lines of Code to get a HostSystem!
  • 19. List All HostSystems in vCenter service_instance = SmartConnect(User, Password, HostName) Hosts = GetAllHosts(service_instance) for host in Hosts: PrintHostInfo(host) def PrintHostInfo(host): # print various property info for a given host def GetAllHosts(service_instance): # do work needed to get host related info here…
  • 20. Solving Business Problems ❖ SAN Team has a “Non Impacting No Downtime Maintenance” to do on the SAN Switches ❖ All customers have redundant connections ❖ Maint will require them to bring down A chan restore it then bring down B chan and restore it ❖ Such a low risk VirtSupport not informed only customer is notified. ❖ vCenter Alarms monitor the SAN connections ❖ They see redundancy lost & trigger SNMP trap. ❖ Ticket is generated for each device!! ❖ 30 mins later its 3am & 100’s of tickets have hit the queue fire drill begins!
  • 21. Solving Business Problems ❖ Already had SOP in place for how to manually work the Redundancy lost tickets ❖ Use python to connect to various APIs in company to gather data from ticket to automate the SOP ❖ Use pyVmomi to connect vCenter to check for actual problem. ❖ Rescan HBA etc.. ❖ Use pyVmomi to ack alarm & reset from red to green ❖ Use python to hit ticket API to close ticket if fixed or flag as real issue for VirtSupport to go look at ❖ While this code was in production it worked 1000’s of tickets saving Rackers 100’s of hours in NVA work.
  • 22.
  • 23. Valuable Tools ❖ Onyx ❖ https://labs.vmware.com/flings/onyx ❖ Latest Version: 2.2.5 ❖ Capture all traffic happening between client and server ❖ DoubleCloud Proxy ❖ Created by: Steve Jin ❖ http://www.doublecloud.org/doublecloud-proxy/ ❖ Capture all traffic happening between client and server
  • 24. Onyx & DoubleCloud Proxy ❖ Start the app and point them at your target vSphere server ❖ Point your script or VIClient etc.. at proxy ❖ Profit
  • 25. Things Ive Learned ❖ There are several “hidden” folders ❖ These can all be seen using the MOB ❖ HostSystems do not always have a unique UUID ❖ On Dell if Service Tag not set in BIOS it uses a generic default UUID ❖ When searching for them use the DNS Name or InventoryPath + name ❖ InventoryPath can be tricky. Use MOB for help ❖ Using the UUID will return the first one it finds ❖ http://kb.vmware.com/kb/1006250
  • 26. Things Ive Learned ❖ VirtualMachine BIOS UUID is shared by VMS in a vApp ❖ The only thing unique for use in searching for a VM is the instance UUID so use it or the InventoryPath + name ❖ Property Collectors are complicated but worth the extra work ❖ You CAN NOT SCALE with out them!!
  • 27. Must Have Links ❖ pyVmomi docs: https://github.com/vmware/pyvmomi/tree/master/docs ❖ community-samples: https://github.com/vmware/pyvmomi-community-samples/ ❖ ~30 samples and growing!! Contribute today!! ❖ Help us: https://github.com/vmware/pyvmomi-community- samples/labels/help%20wanted ❖ My Blog: http://www.errr-online.com/ ❖ VMWare developer resources: http://developercenter.vmware.com/sdks ❖ Shawn Hartsock: http://hartsock.blogspot.com/ ❖ VMWare employee currently maintaing pyVmomi ❖ youtube: https://www.youtube.com/playlist?list=PLO7- YtwexdVIttJejhsBjo0TZPq0BSFfw
  • 28. Getting Help ❖ pyVmomi: https://github.com/vmware/pyvmomi ❖ IRC: Freenode —> #pyvmomi ❖ Mailing List: http://pyvmomi.2338814.n4.nabble.com/ ❖ StackOver Flow: tag post with pyvmomi