Hirdetés

Új hozzászólás Aktív témák

  • kraftxld

    félisten

    Mai feladat, ügyfél belép a 21. századba, 10Gbit-es networking lesz :)
    Mostani konfig, 2x1Gbit management, 4x1Gbit VM traffic, 2x1Gbit vMotion.
    Ezt átrakni egy új 2x10Gbit-es standard vswitch-re.

    A PowerCLI rész a vMotion meg a VM traffic részt pakolja át, utána pedig némi bütykölés az esxcli-vel, ezt majd iLO-n keresztül kell bepötyögni, mert ugyebár ha legyalulom a vmk0 adaptert akkor elszáll minden management. 8 host van, lehet majd feltöltöm azt a részt egy datastore-ba mint .sh file.

    #Connecting to the host, uncomment and change as required
    #Connect-VIServer -Server esx01.corp.local
    $newvswitch = '10G'
    $vmotionvmk = 'vmk1'

    #Moving the vMotion adapter to the 10Gbit switch
    $vmkip = (Get-VMHostNetworkAdapter -Name $vmotionvmk).IP
    $vmksubnet = (Get-VMHostNetworkAdapter -Name $vmotionvmk).SubnetMask
    New-VirtualPortGroup -Name VLAN31 -VirtualSwitch $newvswitch -VLanId 31
    $vmnic = Get-VMHostNetworkAdapter -Name $vmotionvmk
    Remove-VMHostNetworkAdapter -Nic $vmnic -Confirm:$false
    New-VMHostNetworkAdapter -PortGroup VLAN31 -VirtualSwitch $newvswitch -VMotionEnabled $true -IP $vmkip -SubnetMask $vmksubnet -Mtu 9000
    Remove-VirtualSwitch -VirtualSwitch vSwitch2 -Confirm:$false

    #Moving the VirtualNetworks to the 10Gbit switch
    $oldvswitch = 'vSwitch1'

    foreach ($pg in (Get-VirtualPortGroup -VirtualSwitch $oldvswitch))
        {
        Remove-VirtualPortGroup -VirtualPortGroup $pg -Confirm:$false
        New-VirtualPortGroup -VirtualSwitch $newvswitch -Name $pg.Name -VLanId $pg.VLanId
        }
    Remove-VirtualSwitch -VirtualSwitch $oldvswitch -Confirm:$false

    #esxcli commands for management interface
    # 1, removing the vmk0 interface, 2, removing the port group, 3, removing the vSwitch, 4, adding vmk0 to the new switch, 5, setting up the management IP, 6, re-adding the default route

    #esxcli network ip interface remove --interface-name vmk0
    #esxcli network vswitch standard portgroup remove --porgroup-name Management --vwitch-name vSwtich0
    #esxcli network vswitch standard remove --vswitch-name vSwitch0
    #esxcli network ip interface add --interface-name vmk0 --mtu 9000 --portgroup-name VLAN25
    #esxcli network ip interface ipv4 set --interface-name vmk0 --ipv4 172.16.1.14 --netmask 255.255.255.0 --type static
    #esxcfg-route -a default 172.16.1.1
    #just for reference, vmk0 is always tagged with management traffic: esxcli network ip interface tag add - vmk0 -t Management

Új hozzászólás Aktív témák