Configuring PowerCLI
ALARMS:
PowerCLI C:\>Connect-VIServer -Server 10.60.105.77 -User administrator@vsphere.local -Password Passw0rd!
PowerCLI C:\> Get-AlarmDefinition -Name 'Host connection and power state' |Set-AlarmDefinition -Description 'Host Power State'
PowerCLI C:\> Get-AlarmDefinition -Name 'Host connection and power state' |Set-AlarmDefinition -Description 'Host Power State' -ActionRepeatMinutes 5
PowerCLI C:\> Get-AlarmDefinition -Name 'Host connection and power state' |New-AlarmAction -Email -To 'operaciones@company.com'
PowerCLI C:\> Get-AlarmDefinition -Name 'Host connection and power state' | Get-AlarmAction
NETWORKING:
New dvSwitch:
New-VDSwitch -Name 'VMware_COMPANY
Remove dvSwitch:
Get-VDSwitch -Name 'VMwar3_COMPANY' | Remove-VDSwitch -Name 'VMwar3_COMPANY'
Get-VDSwitch -Name 'VMwar3_COMPANY' | New-VDPortgroup -Name 'VMware_POrtgroup'
Teaming Policy dvportgroup:
Get-VDSwitch "dvsCOMPANY" | Get-VDPortGroup DMZ Virtual IPs | Get-VDUplinkTeamingPolicy | Set-VDUplinkTeamingPolicy -LoadBalancingPolicy LoadBalanceLoadBased
-LoadBalancingPolicy
1. LoadBalanceIP - Description #Set Route based on IP hash
2. LoadBalanceSrcMac - Description #Set Route based on source MAC hash
3. LoadBalanceSrcId - Description #Set Route based on originating virtual port
4. ExplicitFailover - Description #Set Use explicit failover order
5. LoadBalanceLoadBased - Description #Set Route based on physcial NIC load
6. LoadBalanceIP - Description #Remove $pg to apply new load balancing policy to all portgroups on the same VDS
CLUSTER DRS
PowerCLI C:\>Connect-VIServer -Server 10.60.105.77 -User administrator@vsphere.local -Password Passw0rd!
Get-Cluster
DRS Configuration
Get-Cluster C3-MGMT |Set-DrsAutomationLevel Manual
Set-Cluster C3-DEV -DRSAutomationLevel PartiallyAutomated
Set-Cluster C3-DEV -DRSAutomationLevel FullyAutomated
Add Host to Cluster
Get-Cluster C3-MGMT | Add-VMHost 1amp-esxi02.company.net -User root -Password VMwr3!!
Remove Host from Cluster
Get-VMHost covbneswcinrm2002.ilumno.net -Location DC | Remove-VMHost -Confirm:$false
No hay comentarios:
Publicar un comentario