Automating host remediation

Discussion in 'Virtual and Cloud Computing' started by JK2447, Aug 11, 2011.

  1. JK2447
    Highly Decorated Member Award 500 Likes Award

    JK2447 Petabyte Poster Administrator Premium Member

    Top Poster
    of the Month

    7,191
    945
    318
    Has anyone automated the remediation of their ESX 4/4.1 hosts?

    We stage the patches and automate the shutdown of the guests but we remediate hosts manually.

    I'm sure you can do it through Update Manager but I'm interested in knowing if anyone uses PowerCLI for something like this as I'm on a Powershell v2 course in sept and am keen to use the skills.
     
    Certifications: VCP4, 5, 6, 6.5, 6.7, 7, 8, VCAP DCV Design, VMConAWS Skill, Google Cloud Digital Leader, BSc (Hons), HND IT, HND Computing, ITIL-F, MBCS CITP, MCP (270,290,291,293,294,298,299,410,411,412) MCTS (401,620,624,652) MCSA:Security, MCSE: Security, Security+, CPTS, CCA (XenApp6.5), MCSA 2012, VSP, VTSP
    WIP: Google Cloud Certs
  2. dales

    dales Terabyte Poster

    2,005
    51
    142
    Its been a while since I've played with vmware in that way but I set it up at the last place I worked at. From memory you do it through the scheduled tasks bit rather than update manager as when I started doing it I scheduled the host updates just after close of play so I could sit and babysit it just to make sure it all went ok. ThomasMC will be vastly more helpful than I on this
     
    Certifications: vExpert 2014+2015+2016,VCP-DT,CCE-V, CCE-AD, CCP-AD, CCEE, CCAA XenApp, CCA Netscaler, XenApp 6.5, XenDesktop 5 & Xenserver 6,VCP3+5,VTSP,MCSA MCDST MCP A+ ITIL F
    WIP: Nothing
  3. ThomasMc

    ThomasMc Gigabyte Poster

    1,507
    49
    111
    It seems fairly easy to do;

    Install vCenter Update Manager PowerCLI
    Fire up PowerCLI and connect to your VC
    Set DRS to fully automated
    Code:
    set-cluster -cluster clustername -drsautomationlevel fullyautomated -confirm:$false
    
    and then something like this
    Code:
    $baseline = Get-Baseline -Name "Critical Host Patches"
    Remediate-Inventory -Entity Cluster -Baseline $baseline -RunAsync
    
    you also might want to add these to your Remediate-Inventory
    Code:
    -HostDisableMediaDevices $true 
    -ClusterDisableDistributedPowerManagement $true
    -ClusterDisableHighAvailability $true
    -ClusterDisableFaultTolerance $true
    
    and to see all the switches available
    Code:
    get-help Remediate-Inventory
    
     
    Certifications: MCDST|FtOCC
    WIP: MCSA(70-270|70-290|70-291)
    SimonD likes this.
  4. JK2447
    Highly Decorated Member Award 500 Likes Award

    JK2447 Petabyte Poster Administrator Premium Member

    Top Poster
    of the Month

    7,191
    945
    318
    Cheers guys, sadly DRS is not an option, can't really say too much...

    Downtime of guests is not an issue as we do it out of hours. I'll have a play with our Update Manager server today see what's what.

    At the minute we have very little automation so this could be a good opportunity for me to boost my appraisal grade.

    While I'm on, do any of you have reports emailed to you for your hosts and guests?
     
    Certifications: VCP4, 5, 6, 6.5, 6.7, 7, 8, VCAP DCV Design, VMConAWS Skill, Google Cloud Digital Leader, BSc (Hons), HND IT, HND Computing, ITIL-F, MBCS CITP, MCP (270,290,291,293,294,298,299,410,411,412) MCTS (401,620,624,652) MCSA:Security, MCSE: Security, Security+, CPTS, CCA (XenApp6.5), MCSA 2012, VSP, VTSP
    WIP: Google Cloud Certs
  5. ThomasMc

    ThomasMc Gigabyte Poster

    1,507
    49
    111
    Without DRS makes it a little more interesting and also a better candidate for automating since you have more to do :)

    vmDK » Automating VMware cluster remediation without DRS: PowerCLI

    As for reporting, we use Veeam for most of that but have a butchers over the vCheck by Alan Renouf

    Virtu-Al | Virtually everything is poshable
     
    Certifications: MCDST|FtOCC
    WIP: MCSA(70-270|70-290|70-291)
  6. JK2447
    Highly Decorated Member Award 500 Likes Award

    JK2447 Petabyte Poster Administrator Premium Member

    Top Poster
    of the Month

    7,191
    945
    318
    Cheers Thomas thats the site Scott told me about!! I've got it written down somewhere in the 3 green books ha ha

    Nice one more reppington for you my man
     
    Certifications: VCP4, 5, 6, 6.5, 6.7, 7, 8, VCAP DCV Design, VMConAWS Skill, Google Cloud Digital Leader, BSc (Hons), HND IT, HND Computing, ITIL-F, MBCS CITP, MCP (270,290,291,293,294,298,299,410,411,412) MCTS (401,620,624,652) MCSA:Security, MCSE: Security, Security+, CPTS, CCA (XenApp6.5), MCSA 2012, VSP, VTSP
    WIP: Google Cloud Certs

Share This Page

Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.