VMware PowerPoint Image Slides...

46

Transcript of VMware PowerPoint Image Slides...

Page 1: VMware PowerPoint Image Slides (16x9)download3.vmware.com/vmworld/2014/downloads/session-pdfs/INF1601_Final... · SRM Reporting • 5.5 R2 Introduced cmdlets • 5.8 R1 adds more
Page 2: VMware PowerPoint Image Slides (16x9)download3.vmware.com/vmworld/2014/downloads/session-pdfs/INF1601_Final... · SRM Reporting • 5.5 R2 Introduced cmdlets • 5.8 R1 adds more

Disclaimer

• This presentation may contain product features that are currently under development.

• This overview of 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.

CONFIDENTIAL 2

Page 3: VMware PowerPoint Image Slides (16x9)download3.vmware.com/vmworld/2014/downloads/session-pdfs/INF1601_Final... · SRM Reporting • 5.5 R2 Introduced cmdlets • 5.8 R1 adds more

Lets talk PowerCLI• Introduction

• Welcome to PowerCLI 5.8 R1

• Best Practices

From one line to a full script

• Deployment

• Reporting

Statistical Reporting

SRM Reporting

vCloud Reporting

• Integration

SDDC Integration

Desired State Configuration

Page 4: VMware PowerPoint Image Slides (16x9)download3.vmware.com/vmworld/2014/downloads/session-pdfs/INF1601_Final... · SRM Reporting • 5.5 R2 Introduced cmdlets • 5.8 R1 adds more

Who are we?

Brian GrafTechnical Marketing - Automation, VMware

vExpert

VMware Blog: http://blogs.vmware.com/PowerCLI/

Personal Blog: http://www.vtagion.com

Twitter: @vTagion

Luc DekensSystems Engineer, Eurocontrol Maastricht

Personal Blog: http://lucd.info/

vExpert & PowerShell MVP

VMTN account: LucD

Twitter: @Lucd22

Page 5: VMware PowerPoint Image Slides (16x9)download3.vmware.com/vmworld/2014/downloads/session-pdfs/INF1601_Final... · SRM Reporting • 5.5 R2 Introduced cmdlets • 5.8 R1 adds more

justingrote says:

PowerShell saved me so much time

PeterVG says:

Thanks a million, you saved me a lot of time!!

sddunne says:

This works excellently and has saved our

Bacon!

packetboy says:

you saved me heaps of time! thanks!!

tonygent says:

You’ve saved me hours :)

sepeck says:

Just saved my co-workers a bunch of work on

the next patch cycle.

johnwilk says:

you have just saved me a weeks work.

RagingOtter says:

Thanks for posting this it saved me a lot of time

rbrannigan says:

If I ever manage to find a girlfriend I’ll have tons

of time to spend with her thanks to PowerCLI.

Page 6: VMware PowerPoint Image Slides (16x9)download3.vmware.com/vmworld/2014/downloads/session-pdfs/INF1601_Final... · SRM Reporting • 5.5 R2 Introduced cmdlets • 5.8 R1 adds more

Welcome to PowerCLI 5.8 R1Even more automation awesomeness (Automness?)

Page 7: VMware PowerPoint Image Slides (16x9)download3.vmware.com/vmworld/2014/downloads/session-pdfs/INF1601_Final... · SRM Reporting • 5.5 R2 Introduced cmdlets • 5.8 R1 adds more

Image

Builder

Auto Deploy

License

vCloud

Director

vCloud

Tenant

vSphere

Distributed

Switch

Site

Recovery

Manager

vSphere

Core

PowerCLI – 5.8 R1 What's New?

Storage

Page 8: VMware PowerPoint Image Slides (16x9)download3.vmware.com/vmworld/2014/downloads/session-pdfs/INF1601_Final... · SRM Reporting • 5.5 R2 Introduced cmdlets • 5.8 R1 adds more

PowerCLI – 5.8 R1 What's New?

• Enhanced startup speed

• Storage Policy cmdlets

• Query an OVF/OVA for deployment properties

• OVF/OVA deployment and configuration

• Added a filter by tag to more cmdlets

• Enhanced error reporting

• Added support for RelatedObject to Get-HardDisk

• Added filtering support to multiple areas

• Support for latest version of vCloud APIs

• New-CIVM cmdlet

• Support for upcoming version of SRM

PS> Whats-New

Page 9: VMware PowerPoint Image Slides (16x9)download3.vmware.com/vmworld/2014/downloads/session-pdfs/INF1601_Final... · SRM Reporting • 5.5 R2 Introduced cmdlets • 5.8 R1 adds more

Storage Policy Based Management (SPBM)Storage Profiles / Storage Policies / SPBM

Page 10: VMware PowerPoint Image Slides (16x9)download3.vmware.com/vmworld/2014/downloads/session-pdfs/INF1601_Final... · SRM Reporting • 5.5 R2 Introduced cmdlets • 5.8 R1 adds more

New Storage Snapin

New Cmdlets to work with Storage Policy Based ManagementStorage

• Set-SpbmStoragePolicy

• Remove-SpbmStoragePolicy

• New-SpbmStoragePolicy

• Get-SpbmStoragePolicy

• Export-SpbmStoragePolicy

• Import-SpbmStoragePolicy

• Get-SpbmCapability

• Get-SpbmCompatibleStorage

• Get-SpbmEntityConfiguration

• Set-SpbmEntityConfiguration

• New-SpbmRule

• New-SpbmRuleSet

• Get-SpbmView

Page 11: VMware PowerPoint Image Slides (16x9)download3.vmware.com/vmworld/2014/downloads/session-pdfs/INF1601_Final... · SRM Reporting • 5.5 R2 Introduced cmdlets • 5.8 R1 adds more

New Storage Snapin Examples

Example PowerCLI code for some of the new SPBM cmdlets:

Return all SPBM capability schemas which belong to the "VSAN" namespace and are of category "Performance"

C:\PS>Get-SpbmCapability –Namespace "VSAN" –Category "Performance"

Create a new storage policy named "MyPolicy", with description "MyPolicyDescription" and with rule set objects

$ruleset1, $ruleset2 and $ruleset3.

C:\PS>New-SpbmStoragePolicy –Name "MyPolicy" –Description "MyPolicyDescription" –AnyOfRuleSets$ruleset1, $ruleset2, $ruleset3

Deploying a New VM named “VM1” to a storage Policy named “GoldPolicy”:

C:\PS>New-VM –Name VM1 –VM base-sles-01a –Datastore (Get-SpbmCompatibleStorage –StoragePolicyGoldPolicy) –VMHost esx-01a.corp.local –DiskStorageFormat thin

Storage

Page 12: VMware PowerPoint Image Slides (16x9)download3.vmware.com/vmworld/2014/downloads/session-pdfs/INF1601_Final... · SRM Reporting • 5.5 R2 Introduced cmdlets • 5.8 R1 adds more

SPBMDEMO

Page 13: VMware PowerPoint Image Slides (16x9)download3.vmware.com/vmworld/2014/downloads/session-pdfs/INF1601_Final... · SRM Reporting • 5.5 R2 Introduced cmdlets • 5.8 R1 adds more

SPBM Code ExampleStorage

Page 14: VMware PowerPoint Image Slides (16x9)download3.vmware.com/vmworld/2014/downloads/session-pdfs/INF1601_Final... · SRM Reporting • 5.5 R2 Introduced cmdlets • 5.8 R1 adds more

Best Practices

Page 15: VMware PowerPoint Image Slides (16x9)download3.vmware.com/vmworld/2014/downloads/session-pdfs/INF1601_Final... · SRM Reporting • 5.5 R2 Introduced cmdlets • 5.8 R1 adds more

Best Practice: External Info

• Use external resources

• Link ESXi build – VMware Tools version

• VMware webpage

Page 16: VMware PowerPoint Image Slides (16x9)download3.vmware.com/vmworld/2014/downloads/session-pdfs/INF1601_Final... · SRM Reporting • 5.5 R2 Introduced cmdlets • 5.8 R1 adds more

Best Practice: External Info

• Learn RegEx expressions !

• Use hash tables for storing information

Page 17: VMware PowerPoint Image Slides (16x9)download3.vmware.com/vmworld/2014/downloads/session-pdfs/INF1601_Final... · SRM Reporting • 5.5 R2 Introduced cmdlets • 5.8 R1 adds more

Best Practice : External Info

Page 18: VMware PowerPoint Image Slides (16x9)download3.vmware.com/vmworld/2014/downloads/session-pdfs/INF1601_Final... · SRM Reporting • 5.5 R2 Introduced cmdlets • 5.8 R1 adds more

Best Practice : External Info

• If you are behind a proxy

• Add the following

Page 19: VMware PowerPoint Image Slides (16x9)download3.vmware.com/vmworld/2014/downloads/session-pdfs/INF1601_Final... · SRM Reporting • 5.5 R2 Introduced cmdlets • 5.8 R1 adds more

Best PracticesFrom Idea to Function

Page 20: VMware PowerPoint Image Slides (16x9)download3.vmware.com/vmworld/2014/downloads/session-pdfs/INF1601_Final... · SRM Reporting • 5.5 R2 Introduced cmdlets • 5.8 R1 adds more

Best Practice: From Idea to Function

• How do we get to some of the scripts

• Scripts are organic

• Multiple stages

– One-off, quick solution

– A working solution

– An optimised solution

– A reusable solution

– A shareable solution

Page 21: VMware PowerPoint Image Slides (16x9)download3.vmware.com/vmworld/2014/downloads/session-pdfs/INF1601_Final... · SRM Reporting • 5.5 R2 Introduced cmdlets • 5.8 R1 adds more

Best Practice: From Idea to Function

• Problem : show multipath policy for RDMs

• Find where the information is

– Get-Harddisk –Disktype

– Get-ScsiLun

Initial idea

Page 22: VMware PowerPoint Image Slides (16x9)download3.vmware.com/vmworld/2014/downloads/session-pdfs/INF1601_Final... · SRM Reporting • 5.5 R2 Introduced cmdlets • 5.8 R1 adds more

Best Practice: From Idea to Function

• We have a link through the CanonicalName

Page 23: VMware PowerPoint Image Slides (16x9)download3.vmware.com/vmworld/2014/downloads/session-pdfs/INF1601_Final... · SRM Reporting • 5.5 R2 Introduced cmdlets • 5.8 R1 adds more

Best Practice: From Idea to Function

• Use a Where-clause to fetch the info

One off

Page 24: VMware PowerPoint Image Slides (16x9)download3.vmware.com/vmworld/2014/downloads/session-pdfs/INF1601_Final... · SRM Reporting • 5.5 R2 Introduced cmdlets • 5.8 R1 adds more

Best Practice: From Idea to Function

• Use a calculated property

Combine

Page 25: VMware PowerPoint Image Slides (16x9)download3.vmware.com/vmworld/2014/downloads/session-pdfs/INF1601_Final... · SRM Reporting • 5.5 R2 Introduced cmdlets • 5.8 R1 adds more

Best Practice: From Idea to Function

• Report for all RDM in the cluster

Generalise

Page 26: VMware PowerPoint Image Slides (16x9)download3.vmware.com/vmworld/2014/downloads/session-pdfs/INF1601_Final... · SRM Reporting • 5.5 R2 Introduced cmdlets • 5.8 R1 adds more

Best Practice: From Idea to Function

• Optimise: Get-ScsiLun is expensive

– With hash table lookup: 40% faster

Optimise

Page 27: VMware PowerPoint Image Slides (16x9)download3.vmware.com/vmworld/2014/downloads/session-pdfs/INF1601_Final... · SRM Reporting • 5.5 R2 Introduced cmdlets • 5.8 R1 adds more

Best Practice: From Idea to Function

• Create a function

Reusability

Page 28: VMware PowerPoint Image Slides (16x9)download3.vmware.com/vmworld/2014/downloads/session-pdfs/INF1601_Final... · SRM Reporting • 5.5 R2 Introduced cmdlets • 5.8 R1 adds more

Best Practice: From Idea to Function

Share

• Share a function

Page 29: VMware PowerPoint Image Slides (16x9)download3.vmware.com/vmworld/2014/downloads/session-pdfs/INF1601_Final... · SRM Reporting • 5.5 R2 Introduced cmdlets • 5.8 R1 adds more

BP: From Idea to Function

• Share as a moduleShare+

Page 30: VMware PowerPoint Image Slides (16x9)download3.vmware.com/vmworld/2014/downloads/session-pdfs/INF1601_Final... · SRM Reporting • 5.5 R2 Introduced cmdlets • 5.8 R1 adds more

Best Practice: From Idea to Function

Page 31: VMware PowerPoint Image Slides (16x9)download3.vmware.com/vmworld/2014/downloads/session-pdfs/INF1601_Final... · SRM Reporting • 5.5 R2 Introduced cmdlets • 5.8 R1 adds more

OVF/OVA Deployment EnhancementsDeploying is now easier

Page 32: VMware PowerPoint Image Slides (16x9)download3.vmware.com/vmworld/2014/downloads/session-pdfs/INF1601_Final... · SRM Reporting • 5.5 R2 Introduced cmdlets • 5.8 R1 adds more

OVF/OVA Deployment

OVF/OVA Parameters can now be set and passed in PowerCLI

Populate an OvfConfiguration object and provide it to Import-VApp. The populated OvfConfiguration object specifies

explicit values for one network mapping property and two standard properties.

$ovfConfig = Get-OvfConfiguration "myOvfTemplate.ovf"$ovfConfig.NetworkMapping.Network.Value = "Network 2"$ovfConfig.vami.VM_1.ip0.Value = "10.23.101.2"$ovfConfig.vami.VM_2.ip0.Value = "10.23.101.3"

Import-VApp $ovfPath -OvfConfiguration $ovfConfig -VMHost $vmHost

Populate an OvfConfiguration object and provide it to Import-VApp. The populated OvfConfiguration object specifies a

network mapping by standard port group.

$ovfConfig = Get-OvfConfiguration "myOvfTemplate.ovf"$portGroup = Get-VirtualPortGroup -Name "Network 2" -Standard$ovfConfig.NetworkMapping.Network.Value = $portGroup

Import-VApp $ovfPath -OvfConfiguration $ovfConfig -VMHost $vmHost

Page 33: VMware PowerPoint Image Slides (16x9)download3.vmware.com/vmworld/2014/downloads/session-pdfs/INF1601_Final... · SRM Reporting • 5.5 R2 Introduced cmdlets • 5.8 R1 adds more

OVF/OVA DeploymentDEMO

Page 34: VMware PowerPoint Image Slides (16x9)download3.vmware.com/vmworld/2014/downloads/session-pdfs/INF1601_Final... · SRM Reporting • 5.5 R2 Introduced cmdlets • 5.8 R1 adds more

Reporting

Page 35: VMware PowerPoint Image Slides (16x9)download3.vmware.com/vmworld/2014/downloads/session-pdfs/INF1601_Final... · SRM Reporting • 5.5 R2 Introduced cmdlets • 5.8 R1 adds more

Reporting

vSphere Reporting

• Best place to start (safe)

• Community samples

• vCheck

SRM Reporting

• 5.5 R2 Introduced cmdlets

• 5.8 R1 adds more functionality

• Ken’s posts on vSphere Blog

vCloud Reporting

• Cloud cmdlets

• Tenant Snapin

• Updated in 5.8 R1

Statistical Reporting

• Get-Stat, Get-StatInterval

• Enhanced in 5.5 R2

• Stats Toolbox

Page 36: VMware PowerPoint Image Slides (16x9)download3.vmware.com/vmworld/2014/downloads/session-pdfs/INF1601_Final... · SRM Reporting • 5.5 R2 Introduced cmdlets • 5.8 R1 adds more

Stats Toolbox

• A handy tool to explore the vSphere counters

• List by group and interval

• Change the statistics level

• Search the Internet

• What are the oldest available metrics

• Generate PowerCLI code

Page 37: VMware PowerPoint Image Slides (16x9)download3.vmware.com/vmworld/2014/downloads/session-pdfs/INF1601_Final... · SRM Reporting • 5.5 R2 Introduced cmdlets • 5.8 R1 adds more

Stats Toolbox DEMO

Page 38: VMware PowerPoint Image Slides (16x9)download3.vmware.com/vmworld/2014/downloads/session-pdfs/INF1601_Final... · SRM Reporting • 5.5 R2 Introduced cmdlets • 5.8 R1 adds more

Integration

Page 39: VMware PowerPoint Image Slides (16x9)download3.vmware.com/vmworld/2014/downloads/session-pdfs/INF1601_Final... · SRM Reporting • 5.5 R2 Introduced cmdlets • 5.8 R1 adds more

Integration

PowerShell makes integration easy

• Microsoft

• Common framework criteria

• 3rd Party

• NetApp / PernixData / Tintri / HP / More…

Rest API

• Invoke-RestMethod

• Invoke-Webrequest

Read from files

• XML

• CSV

• TXT

CMDB to vSphere Tags

Page 40: VMware PowerPoint Image Slides (16x9)download3.vmware.com/vmworld/2014/downloads/session-pdfs/INF1601_Final... · SRM Reporting • 5.5 R2 Introduced cmdlets • 5.8 R1 adds more

IntegrationDEMO

Page 41: VMware PowerPoint Image Slides (16x9)download3.vmware.com/vmworld/2014/downloads/session-pdfs/INF1601_Final... · SRM Reporting • 5.5 R2 Introduced cmdlets • 5.8 R1 adds more

CMDB Code Example

Page 42: VMware PowerPoint Image Slides (16x9)download3.vmware.com/vmworld/2014/downloads/session-pdfs/INF1601_Final... · SRM Reporting • 5.5 R2 Introduced cmdlets • 5.8 R1 adds more

Desired State Configuration (DSC)

• Introduced with PS v4

• Two modes: push & pull

• Main Purpose: capture configuration drift

• But also:

– initial deployment

– monitoring

• Built-in resources (Linux in CTP)

• Scripted resources (use PowerCLI)

Page 43: VMware PowerPoint Image Slides (16x9)download3.vmware.com/vmworld/2014/downloads/session-pdfs/INF1601_Final... · SRM Reporting • 5.5 R2 Introduced cmdlets • 5.8 R1 adds more

Handle VMRC

and VIX in the

same way

Generates MOF file

Desired State Configuration (DSC)

Page 44: VMware PowerPoint Image Slides (16x9)download3.vmware.com/vmworld/2014/downloads/session-pdfs/INF1601_Final... · SRM Reporting • 5.5 R2 Introduced cmdlets • 5.8 R1 adds more

ConclusionJoin PowerCLI-Dating.com to find your PowerCLI partner

rbrannigan says:

If I ever manage to find a girlfriend I’ll have tons

of time to spend with her thanks to PowerCLI.

Page 45: VMware PowerPoint Image Slides (16x9)download3.vmware.com/vmworld/2014/downloads/session-pdfs/INF1601_Final... · SRM Reporting • 5.5 R2 Introduced cmdlets • 5.8 R1 adds more
Page 46: VMware PowerPoint Image Slides (16x9)download3.vmware.com/vmworld/2014/downloads/session-pdfs/INF1601_Final... · SRM Reporting • 5.5 R2 Introduced cmdlets • 5.8 R1 adds more