Managing Virtual Infrastructures With PowerShell


Published on

The slide deck from VC 101: Managing Virtual Infrastructures with PowerShell

Published in: Technology, Business
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • Managing Virtual Infrastructures With PowerShell

    1. 1. Date: May 4 th – 7 th , 2009 Prepared for: 2009 Virtualization Congress Managing Virtual Infrastructures with Microsoft PowerShell
    2. 2. The Boring Stuff... 
    3. 3. Safe Harbor Statement This presentation may contain forward-looking statements that involve risks, uncertainties and assumptions. If such risks or uncertainties materialize or such assumptions prove incorrect, the results of Rackspace Hosting could differ materially from those expressed or implied by such forward-looking statements and assumptions. All statements other than statements of historical fact are statements that could be deemed forward-looking statements, including any statements concerning expected development, performance or market acceptance associated with products; anticipated operational and financial benefits from our products and services; any statements of expectation or belief; and any statements of assumptions underlying any of the foregoing. Risks, uncertainties and assumptions include the possibility that expected benefits from our products may not materialize because they are not generally accepted in the marketplace, which could occur due to certain factors including (i) a failure to market the product cost effectively, differentiate the product from competitive products or communicate differentiations effectively, (ii) the reliability, quality or compatibility associated with the product, (iii) changes in technology which adversely effect the product’s benefit, (iv) slowdowns in the general economy or technology industry that impact consumer spending habits, and (v) internal strategy decisions that impact the product. Further information on these and other factors that could affect our financial results is included in the reports on Forms 10-K, 10-Q and 8-K and in other filings we make with the Securities and Exchange Commission from time to time. These documents are available on the SEC Filings section of the Investor Information section of our website at  Except as required by law, Rackspace Hosting assumes no obligation to update these forward-looking statements publicly, or to update the reasons actual results could differ materially from those anticipated in these forward-looking statements, even if new information becomes available in the future.
    4. 4. Agenda <ul><li>Introductions </li></ul><ul><li>What’s this all about? </li></ul><ul><li>Who are we? </li></ul><ul><li>PowerShell </li></ul><ul><li>PowerShell Basics </li></ul><ul><li>Differences in Toolkits  </li></ul><ul><li>Putting The Power Into Play </li></ul><ul><li>Examples </li></ul><ul><li>Demos </li></ul><ul><li>More Examples </li></ul><ul><li>Advanced Topics </li></ul><ul><li>Resources </li></ul><ul><li>Q&A </li></ul>
    5. 5. What’s this all about?
    6. 6. What can you say about any good systems administrator? They’re lazy... Why would we say this?
    7. 7. A lot of our daily tasks are repetitive, mundane, and required!!! So how does that make a good systems administrator lazy? Using automation, scripting, and doing more with less is lazy! (Insert something about the economy ‘here’)
    8. 8. Powershell does this! Powershell loves this! And it’s easy!
    9. 9. Who Are We?
    10. 10. Who are we? <ul><li>Cody Bunch </li></ul><ul><li>Rackspace Engineer </li></ul><ul><li>Windows User </li></ul><ul><li>Virtualization Geek </li></ul>Patrick Ancillotti Rackspace Engineer *nix User Virtualization Geek but most of all... ADMINS!
    11. 11. PowerShell?
    12. 12. What is Powershell? <ul><li>Wikipedia calls it : Windows PowerShell is an extensible command-line shell and associated scripting language from Microsoft. It was released in 2006 ... </li></ul><ul><li>We call it : PowerShell is geared around making your life as an ADMIN Easier. PowerShell can be used for: </li></ul><ul><li>Scripting! - Automation, Woot! </li></ul><ul><li>  Interactive Command Shell </li></ul><ul><li>GUI! </li></ul>MSDN calls it : Windows PowerShell is a new Windows command-line shell designed especially for system administrators...
    13. 13. PowerShell & Virtualization <ul><li>Virtualization Vendor Support for PowerShell: </li></ul><ul><ul><li>Citrix XenServer/XenCenter </li></ul></ul><ul><ul><li>VMware VI Toolkit for Windows </li></ul></ul><ul><ul><li>Microsoft SCVMM </li></ul></ul>
    14. 14. What's Different? <ul><li>What's Different: </li></ul><ul><ul><li>Major feature differences </li></ul></ul><ul><ul><li>cmdlet differences </li></ul></ul><ul><ul><li>Syntax changes </li></ul></ul><ul><ul><li>Maturity </li></ul></ul><ul><ul><ul><li>VMWare! </li></ul></ul></ul><ul><ul><ul><li>Hyper-V </li></ul></ul></ul><ul><ul><ul><li>Xen </li></ul></ul></ul>
    15. 15. Toolkit Maturity <ul><ul><li>VMWare! </li></ul></ul><ul><ul><ul><li>Full suite of cmdlets </li></ul></ul></ul><ul><ul><ul><li>Well Supported Community </li></ul></ul></ul><ul><ul><ul><li>Well published documentation </li></ul></ul></ul><ul><ul><li>Hyper-V </li></ul></ul><ul><ul><ul><li>Full suite of cmdlets (SCVMM 2008) </li></ul></ul></ul><ul><ul><ul><li>Well published documentation (resources slide) </li></ul></ul></ul><ul><ul><li>Xen </li></ul></ul><ul><ul><ul><li>Cmdlets </li></ul></ul></ul><ul><ul><ul><li>A few random blog posts </li></ul></ul></ul><ul><ul><ul><li>Requires ‘Initialize-XenServer:Aliases’ to behave like other toolkits. </li></ul></ul></ul>
    16. 16. Putting The Power Into Play
    17. 17. Managing Hypervisors! - Basic Examples <ul><ul><li>Storage? Who Needs Storage? </li></ul></ul><ul><li>Networking! </li></ul>
    18. 18. Storage ! <ul><ul><li>On VMware </li></ul></ul><ul><ul><ul><li>New-Datastore </li></ul></ul></ul><ul><ul><ul><li>Set-Datastore </li></ul></ul></ul><ul><ul><ul><li>Remove-Datastore </li></ul></ul></ul><ul><ul><li>On Xen </li></ul></ul><ul><ul><ul><li>Create-Xenserver:SR </li></ul></ul></ul><ul><ul><ul><li>Set-Xenserver:SR.* </li></ul></ul></ul><ul><ul><ul><li>Destroy-SR </li></ul></ul></ul><ul><ul><li>On Hyper-V </li></ul></ul><ul><ul><ul><li>Handled by Windows/Undocumented...? </li></ul></ul></ul>
    19. 19. Networking! - Virtual Switches <ul><ul><li>On VMware </li></ul></ul><ul><ul><ul><li>New/Set/Remove-VirtualSwitch </li></ul></ul></ul><ul><ul><ul><li>New/Set/Remove-VirtualPortGroup </li></ul></ul></ul><ul><ul><ul><li>New/Set/Remove-VMHostNetworkAdaptor </li></ul></ul></ul><ul><ul><li>On Xen </li></ul></ul><ul><ul><ul><li>Create-Xenserver:Network </li></ul></ul></ul><ul><ul><ul><li>Set-Xenserver:Network.* </li></ul></ul></ul><ul><ul><ul><li>Destroy-Xenserver:Network </li></ul></ul></ul><ul><ul><li>On Hyper-V </li></ul></ul><ul><ul><ul><li>New-VirtualNetwork </li></ul></ul></ul><ul><ul><ul><li>Get/Set-VirtualNetwork </li></ul></ul></ul><ul><ul><ul><li>Remove-VirtualNetwork </li></ul></ul></ul>
    20. 20. Demo!
    21. 21. Managing VMs! - Basics <ul><ul><li>Pop a VM in the oven </li></ul></ul><ul><ul><ul><li>Add VMs </li></ul></ul></ul><ul><ul><ul><li>Remove VMs </li></ul></ul></ul><ul><ul><li>Whoops! Changes. </li></ul></ul><ul><ul><ul><li>Add A NIC </li></ul></ul></ul><ul><ul><ul><li>Change Memory </li></ul></ul></ul><ul><ul><li>Power Operations </li></ul></ul><ul><ul><ul><li>Power On </li></ul></ul></ul><ul><ul><ul><li>Power Off </li></ul></ul></ul>
    22. 22. Pop a VM in the oven. <ul><ul><li>On VMware </li></ul></ul><ul><ul><ul><li>New-VM </li></ul></ul></ul><ul><ul><ul><li>Get-VM/Set-VM </li></ul></ul></ul><ul><ul><ul><li>Remove-VM </li></ul></ul></ul><ul><ul><li>On Xen </li></ul></ul><ul><ul><ul><li>Create-XenServer:VM </li></ul></ul></ul><ul><ul><ul><li>Get-XenServer:VM/Set-XenServer:VM.* </li></ul></ul></ul><ul><ul><ul><li>Destroy-XenServer:VM </li></ul></ul></ul><ul><ul><li>On Hyper-V </li></ul></ul><ul><ul><ul><li>New-VM </li></ul></ul></ul><ul><ul><ul><li>Get-VM/Set-VM </li></ul></ul></ul><ul><ul><ul><li>Remove-VM </li></ul></ul></ul>
    23. 23. Whoops! Changes. <ul><ul><li>On VMware </li></ul></ul><ul><ul><ul><li>Get-VM | Set-VM -MemoryMB 1024 </li></ul></ul></ul><ul><ul><ul><li>Get-VM | New-NetworkAdaptor </li></ul></ul></ul><ul><ul><li>On Xen </li></ul></ul><ul><ul><ul><li>Get-Xenserver:VM | Set-Xenserver:VM.MemoryStaticMax -Value 1024 </li></ul></ul></ul><ul><ul><ul><li>Dunno </li></ul></ul></ul><ul><ul><li>On Hyper-V </li></ul></ul><ul><ul><ul><li>Get-VM | Set-VM -MemoryMB 1024 </li></ul></ul></ul><ul><ul><ul><li>Get-VM | New-VirtualNetworkAdaptor </li></ul></ul></ul>They happen, heres how you would change memory & network info on a VM
    24. 24. Feel The Power! - Power Operations <ul><ul><li>On VMware </li></ul></ul><ul><ul><ul><li>Get-VM -Name $Name | Start-VM </li></ul></ul></ul><ul><ul><ul><li>Get-VM -Name $Name | Stop-VM </li></ul></ul></ul><ul><ul><li>On Xen </li></ul></ul><ul><ul><ul><li>Get-XenServer:VM | Invoke-XenServer:VM.start </li></ul></ul></ul><ul><ul><ul><li>Get-XenServer:VM | Invoke-XenServer:VM.hardshutdown </li></ul></ul></ul><ul><ul><li>On Hyper-V </li></ul></ul><ul><ul><ul><li>Get-VM -Name $Name | Start-VM </li></ul></ul></ul><ul><ul><ul><li>Get-VM -Name $Name | Shutdown-VM </li></ul></ul></ul><ul><ul><ul><li>Get-VM -Name $Name | Stop-VM </li></ul></ul></ul>
    25. 25. Demo!
    26. 26. Advanced Topics
    27. 27. Feel The Power! Advanced Stuff! <ul><li>Mass Deploy </li></ul><ul><li>Deploy from CSV! </li></ul><ul><li>E-mail Reports </li></ul><ul><li>How Many Chickens? </li></ul>
    28. 28. Demo!
    29. 29. Feel The Power! - Community... <ul><li>  </li></ul><ul><li>Funky stuff that other people have done:  </li></ul><ul><li>VMware vDiagram </li></ul><ul><ul><li>( ) </li></ul></ul><ul><li>VMware Health Check Script </li></ul><ul><ul><li>( ) </li></ul></ul><ul><li>VMware Blue Screen Detector </li></ul><ul><ul><li>( http://www.nt al-Machine-Blue-Screen-detector.html ) </li></ul></ul><ul><li>And more coming.... </li></ul>
    30. 30. Resources!
    31. 31. Where to from here? <ul><li> - Coming Soon!!! Slide Deck, Code Demonstrated, Video Tutorials, Podcast, and more. </li></ul><ul><li>Forums! </li></ul><ul><li>IRC! </li></ul><ul><li>Community Blogs! </li></ul><ul><li>And many more!!! </li></ul>
    32. 33. Q & A
    33. 34. That’s all folks!