iscsi setup and stuff!

Here is a nice powercli way to setup iscsi networking, and set the vlans and all sorts of fun stuff! 🙂


$h = get-vmhost rey-esxi-03*
$vs = $h | Get-VirtualSwitch -name vSwitch0


New-VMHostNetworkAdapter -VMHost $h -PortGroup vmk-iscsi-01 -VirtualSwitch $vs -SubnetMask 255.255.255.0 -IP 192.168.152.19
$vpg = $h | get-virtualportgroup -name vmk-iscsi-01
$vpg | Set-VirtualPortGroup -vlanid 152
$vpgo = $vpg | get-nicteamingpolicy
$vpgo | set-NicTeamingPolicy -makenicactive vmnic1

New-VMHostNetworkAdapter -VMHost $h -PortGroup vmk-iscsi-02 -VirtualSwitch $vs -SubnetMask 255.255.255.0 -IP 192.168.152.20
$vpg = $h | get-virtualportgroup -name vmk-iscsi-02
$vpg | Set-VirtualPortGroup -vlanid 152
$vpgo = $vpg | get-nicteamingpolicy
$vpgo | set-NicTeamingPolicy -makenicactive vmnic3

New-VMHostNetworkAdapter -VMHost $h -PortGroup vmk-iscsi-03 -VirtualSwitch $vs -SubnetMask 255.255.255.0 -IP 192.168.152.21
$vpg = $h | get-virtualportgroup -name vmk-iscsi-03
$vpg | Set-VirtualPortGroup -vlanid 152
$vpgo = $vpg | get-nicteamingpolicy
$vpgo | set-NicTeamingPolicy -makenicactive vmnic5

New-VMHostNetworkAdapter -VMHost $h -PortGroup vmk-iscsi-04 -VirtualSwitch $vs -SubnetMask 255.255.255.0 -IP 192.168.152.22
$vpg = $h | get-virtualportgroup -name vmk-iscsi-04
$vpg | Set-VirtualPortGroup -vlanid 152
$vpgo = $vpg | get-nicteamingpolicy
$vpgo | set-NicTeamingPolicy -makenicactive vmnic7

WordPress Themes