달력

5

« 2024/5 »

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
Microsoft 기반의 VDI나 RemoteApp 등의 시스템 구축 시 사용자들의 접근을 위해 RD 웹 액세스 서버를 구축합니다.
기본적으로 페이지 제목에 표시되는 Work Resources 문구를 변경하는 방법을 설명 드립니다.
 

RD 연결 브로커 서버에 로그온 한 후 PowerShell을 실행하고 아래 명령을 사용합니다.
Set-RDWorkspace -Name "표시할 제목" -ConnectionBroker <RD 연결 브로커 서버의 FQDN>

예를 들어, 제목을 Enterprise Mobility로 하고, 연결 브로서 서버의 이름이 rds.domain.local인 경우
Set-RDWorkspace -Name "Enterprise Mobility" -ConnectionBroker rds.domain.local





:
Posted by 커널64
Windows Server 2012 기반의 Hyper-V 인프라 구성 시 필요한 몇 가지 구성들을 '빼먹지 않고', 좀 더 '손 쉽게' 할 수 있도록 PowerShell 스크립트로 만들어 보았습니다. 기본적인 권장 구성과 역할 및 기능 설치, 네트워크 관련 설정들이 포함됩니다.






Function Essential
{
  Clear-Host
  Write-Host -ForegroundColor White -BackgroundColor DarkGreen "Phase - 2"
  Write-Host `n"------------------------------------"
  Write-Host "-- Essential Settings for Hyper-V --"
  Write-Host "------------------------------------"`n
  Write-Host "Checking Current Status ..."`n

  Write-Host -NoNewline " - TCP Chimney Offload: "
  $NetGlobalSettings = Get-NetOffloadGlobalSetting
  If ($NetGlobalSettings.Chimney -eq "Enabled") {Write-Host -foregroundColor Red "Enabled"}
  Else {Write-Host -foregroundColor Green "Disabled"}

  Write-Host -NoNewline " - User Access Control: "
  $LUA = Get-ItemProperty "HKLM:SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System"
  If ($LUA.EnableLUA -ne "0") {Write-Host -foregroundColor Red "Enabled"}
  Else {Write-Host -foregroundColor Green "Disabled"}

  Write-Host -NoNewline " - IP Version 6 (IPv6): "
  $IPv6 = Get-ItemProperty "HKLM:SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters"
  If ($IPv6.DisabledComponents -ne "4294967295") {Write-Host -foregroundColor Red "Enabled"}
  Else {Write-Host -foregroundColor Green "Disabled"}

  Write-Host -NoNewline " - Remote Desktop Connection: "
  $RDP = Get-ItemProperty "HKLM:SYSTEM\CurrentControlSet\Control\Terminal Server"
  If ($RDP.fDenyTSConnections -ne "0") {Write-Host -foregroundColor Red "Disabled"}
  Else {Write-Host -foregroundColor Green "Enabled"}

  Write-Host -NoNewline " - Remote Desktop Network Level Authentication: "
  $RDPSet = Get-ItemProperty "HKLM:SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp"
  If ($RDPSet.UserAuthentication -ne "0") {Write-Host -foregroundColor Red "Enabled"}
  Else {Write-Host -foregroundColor Green "Disabled"}

  Write-Host -NoNewline " - Remote Server Management: "
  $RemoteMgmt = Invoke-Expression -Command "Configure-SMRemoting.exe -GET"
  If ($RemoteMgmt -like "*사용하지 않도록*") {Write-Host -foregroundColor Red "Disabled"}
  Else {Write-Host -foregroundColor Green "Enabled"}

  Write-Host -NoNewline " - Firewall Exception(Remote Desktop Connection): "
  $FWRules = Get-NetFirewallRule | Where {$_.Group -eq "@FirewallAPI.dll,-28752"}
  $FWState = 0
  foreach ($Item in $FWRules)
  {
    If ($Item.Enabled -eq "False") {$FWState = 1}
  }
  If ($FWState -eq 1) {Write-Host -foregroundColor Red "Disabled"}
  Else {Write-Host -foregroundColor Green "Enabled"}

  Write-Host -NoNewline " - Firewall Exception(File and Printer Sharing): "
  $FWRules = Get-NetFirewallRule | Where {$_.Group -eq "@FirewallAPI.dll,-28502"}
  $FWState = 0
  foreach ($Item in $FWRules)
  {
    If ($Item.Enabled -eq "False") {$FWState = 1}
  }
  If ($FWState -eq 1) {Write-Host -foregroundColor Red "Disabled"}
  Else {Write-Host -foregroundColor Green "Enabled"}

  Write-Host -NoNewline " - Firewall Exception(Windows Remote Management): "
  $FWRules = Get-NetFirewallRule | Where {$_.Group -eq "@FirewallAPI.dll,-30267"}
  $FWState = 0
  foreach ($Item in $FWRules)
  {
    If ($Item.Enabled -eq "False") {$FWState = 1}
  }
  If ($FWState -eq 1) {Write-Host -foregroundColor Red "Disabled"}
  Else {Write-Host -foregroundColor Green "Enabled"}

  Write-Host -NoNewline " - Firewall Exception(Remote Service Management): "
  $FWRules = Get-NetFirewallRule | Where {$_.Group -eq "@FirewallAPI.dll,-29502"}
  $FWState = 0
  foreach ($Item in $FWRules)
  {
    If ($Item.Enabled -eq "False") {$FWState = 1}
  }
  If ($FWState -eq 1) {Write-Host -foregroundColor Red "Disabled"}
  Else {Write-Host -foregroundColor Green "Enabled"}
  
  Write-Host -NoNewline " - Firewall Exception(COM+ Remote Management): "
  $FWRules = Get-NetFirewallRule | Where {$_.Group -eq "@comres.dll,-3405"}
  $FWState = 0
  foreach ($Item in $FWRules)
  {
    If ($Item.Enabled -eq "False") {$FWState = 1}
  }
  If ($FWState -eq 1) {Write-Host -foregroundColor Red "Disabled"}
  Else {Write-Host -foregroundColor Green "Enabled"}

  Write-Host -NoNewline " - Firewall Exception(Remote Event Log Management): "
  $FWRules = Get-NetFirewallRule | Where {$_.Group -eq "@FirewallAPI.dll,-29252"}
  $FWState = 0
  foreach ($Item in $FWRules)
  {
    If ($Item.Enabled -eq "False") {$FWState = 1}
  }
  If ($FWState -eq 1) {Write-Host -foregroundColor Red "Disabled"}
  Else {Write-Host -foregroundColor Green "Enabled"}

  Write-Host -NoNewline " - Firewall Exception(WMI(Windows Management Instrumentation)): "
  $FWRules = Get-NetFirewallRule | Where {$_.Group -eq "@FirewallAPI.dll,-34251"}
  $FWState = 0
  foreach ($Item in $FWRules)
  {
    If ($Item.Enabled -eq "False") {$FWState = 1}
  }
  If ($FWState -eq 1) {Write-Host -foregroundColor Red "Disabled"}
  Else {Write-Host -foregroundColor Green "Enabled"}

  Write-Host -NoNewline " - Disallow Client Printer Redirection: "
  $PrinterMap = Get-ItemProperty "HKLM:SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services"
  If ($PrinterMap.fDisableCpm -ne "1" -or $PrinterMap.fDisableCpm -eq $NULL) {Write-Host -foregroundColor Red "Disabled"`n}
  Else {Write-Host -foregroundColor Green "Enabled"`n}

  Do
  {
    Write-Host -NoNewline `n"Set All to Desired Configurations? "
    Write-Host -foregroundColor Yellow -NoNewline "[Y]"
    Write-Host -NoNewline " or "
    Write-Host -foregroundColor Yellow -NoNewline "[N]"
    Write-Host -NoNewline ": "
    $DesiredConfig = Read-Host
  }
  While ($DesiredConfig -ne "Y" -and $DesiredConfig -ne "N")

  Switch ($DesiredConfig)
  {
    "Y"
    {
      Clear-Host
      Write-Host -ForegroundColor White -BackgroundColor DarkGreen "Phase - 3"

      Write-Host `n`n"Disable TCP Chimney Offload"
      Set-NetOffloadGlobalSetting -Chimney Disabled
      Write-Host " -> Completed!"

      Write-Host `n"Turn Off User Access Control"
      Set-ItemProperty "HKLM:SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" -Name EnableLUA -Value 0
      Write-Host " -> Completed!"

      Write-Host `n"Disable IP Version 6 (IPv6)"
      Set-ItemProperty "HKLM:SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters" -Name DisabledComponents -Value 4294967295
      Write-Host " -> Completed!"

      Write-Host `n"Enable Remote Desktop Connection"
      Set-ItemProperty "HKLM:SYSTEM\CurrentControlSet\Control\Terminal Server" -Name fDenyTSConnections -Value 0
      Write-Host " -> Completed!"

      Write-Host `n"Disable Remote Desktop Network Level Authentication"
      Set-ItemProperty "HKLM:SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" -Name UserAuthentication -Value 0
      Write-Host " -> Completed!"

      Write-Host `n"Enable Remote Server Management"
      $RemoteMgmt = Invoke-Expression -Command "Configure-SMRemoting.exe -Enable"
      $CommandLineStr = "winrm set winrm/config/client '@{TrustedHosts="+$([Char]34)+"*"+$([Char]34)+"}'"
      $RemoteMgmt = Invoke-Expression -Command $CommandLineStr
      Write-Host " -> Completed!"

      Write-Host `n"Configure Firewall Exceptions"
      $TargetFWRules = Get-NetFirewallRule | Where {$_.Group -eq "@FirewallAPI.dll,-28752" -or $_.Group -eq "@FirewallAPI.dll,-28502" -or $_.Group -eq "@FirewallAPI.dll,-30267" -or $_.Group -eq "@FirewallAPI.dll,-29502" -or $_.Group -eq "@comres.dll,-3405" -or $_.Group -eq "@FirewallAPI.dll,-29252" -or $_.Group -eq "@FirewallAPI.dll,-34251" -or $_.Group -eq "@FirewallAPI.dll,-29002"}
      $TargetFWRules | Set-NetFirewallRule -Enabled True
      Write-Host " -> Completed!"

      Write-Host `n"Disallow Client Printer Redirection"
      Set-ItemProperty "HKLM:SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" -Name fDisableCpm -Value 1
      Write-Host " -> Completed!"

      Write-Host `n`n"Press Any Key to Continue..."
      $x = $host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
    }

    "N"
    {
      Write-Host `n"Canceled."
      Start-Sleep 1
      Break
    }
  }
}


Function WindowsFeatures
{
  Clear-Host
  Write-Host -ForegroundColor White -BackgroundColor DarkGreen "Phase - 2"
  Write-Host `n"----------------------------------------------------------"
  Write-Host "-- Windows Features for Hyper-V and Failover Clustering --"
  Write-Host "----------------------------------------------------------"`n
  Write-Host "Checking Current Status ..."`n

  $WinFeatures = Get-WindowsFeature -Name Hyper-V, Failover-Clustering, Multipath-IO, Telnet-Client

  Write-Host -NoNewline " - Hyper-V Role: "
  $HV = $WinFeatures | Where {$_.Name -eq "Hyper-V"}
  If ($HV.Installed -ne "True") {Write-Host -foregroundColor Red "Not Installed"}
  Else {Write-Host -foregroundColor Green "Installed"}

  Write-Host -NoNewline " - Failover Clustering: "
  $WSFC = $WinFeatures | Where {$_.Name -eq "Failover-Clustering"}
  If ($WSFC.Installed -ne "True") {Write-Host -foregroundColor Red "Not Installed"}
  Else {Write-Host -foregroundColor Green "Installed"}

  Write-Host -NoNewline " - Multipath IO: "
  $MPIO = $WinFeatures | Where {$_.Name -eq "Multipath-IO"}
  If ($MPIO.Installed -ne "True") {Write-Host -foregroundColor Red "Not Installed"}
  Else {Write-Host -foregroundColor Green "Installed"}

  Write-Host -NoNewline " - Telnet Client: "
  $TC = $WinFeatures | Where {$_.Name -eq "Telnet-Client"}
  If ($TC.Installed -ne "True") {Write-Host -foregroundColor Red "Not Installed"`n}
  Else {Write-Host -foregroundColor Green "Installed"`n}

  Do
  {
    Write-Host -NoNewline `n"Install All Required Windows Features? "
    Write-Host -foregroundColor Yellow -NoNewline "[Y]"
    Write-Host -NoNewline " or "
    Write-Host -foregroundColor Yellow -NoNewline "[N]"
    Write-Host -NoNewline ": "
    $InstallWinFeatures = Read-Host
  }
  While ($InstallWinFeatures -ne "Y" -and $InstallWinFeatures -ne "N")

  Switch ($InstallWinFeatures)
  {
    "Y"
    {
      Add-WindowsFeature Telnet-Client,Failover-Clustering,Multipath-IO,Hyper-V -IncludeManagementTools -Verbose
      Write-Host `n`n`n"Completed. System would be required Reboot."
      Write-Host `n"Press Any Key to Continue..."
      $x = $host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
    }

    "N"
    {
      Write-Host `n"Canceled."
      Start-Sleep 1
    }
  }
}


Function VirtualNetworks
{
  Do
  {
    Clear-Host
    Write-Host -ForegroundColor White -BackgroundColor DarkGreen "Phase - 2"
    Write-Host `n"-------------------------------------------------"
    Write-Host "-- Physical and Virtual Network Configurations --"
    Write-Host "-------------------------------------------------"
    Write-Host `n"1) Rename Network Interfaces"
    Write-Host `n"2) Manage Virtual Switches and Interfaces"
    Write-Host `n"3) Configure IP Addresses (IPv4)"`n

    Do
    {
      Write-Host -NoNewline `n"Select Task "
      Write-Host -foregroundColor Yellow -NoNewline "[ID]"
      Write-Host -NoNewline " or "
      Write-Host -foregroundColor Yellow -NoNewline "[Q]"
      Write-Host -NoNewline "uit: "
      $PnVNetworkConfig = Read-Host
    }
    While ((!$PnVNetworkConfig -or $PnVNetworkConfig -eq 0) -and $PnVNetworkConfig -ne "Q")

    If ($PnVNetworkConfig -eq "Q") {Break}
    
    Switch ($PnVNetworkConfig)
    {
      "1"
      {
        Do
        {
          Clear-Host
          Write-Host `n`n"Retrieving Data. Please Wait..."

          $idx = 0
          $tmpArr = @()
          $NICs = Get-NetAdapter | Sort-Object -Property Name
          $IPs = Get-NetIPAddress | Where {$_.AddressFamily -eq "IPv4"}

          foreach ($Item in $NICs)
          {
            $idx++
            $idxStr = [String]$idx+")"
            $IfName = $Item.Name
            $IfDesc = $Item.InterfaceDescription
            $Speed = $Item.LinkSpeed
            $Status = $Item.Status
            $IPAddress = ""
            $IfIPConfig = Get-NetIPInterface | Where {$_.InterfaceAlias -eq $IfName}

            If ($IfIPConfig.Dhcp -eq "Enabled") {$IPAddress = "DHCP"}
            ElseIf (! $IfIPConfig) {$IPAddress = "N/A"}
            Else
            {
              foreach ($Item1 in $IPs)
              {
                If ($Item1.InterfaceIndex -eq $Item.InterfaceIndex) {$IPAddress = $Item1.IPAddress+"/"+$Item1.PrefixLength}
              }
            }

            $Output = New-Object PSObject
            $Output | Add-Member Noteproperty Index $idxStr
            $Output | Add-Member Noteproperty Name $IfName
            $Output | Add-Member Noteproperty Description $IfDesc
            $Output | Add-Member Noteproperty "IP Address" $IPAddress
            $Output | Add-Member Noteproperty Speed $Speed
            $Output | Add-Member Noteproperty Status $Status
            $tmpArr += $Output
          }

          Clear-Host
          Write-Host -ForegroundColor White -BackgroundColor DarkGreen "Phase - 3"
          Write-Host `n"-------------------------------"
          Write-Host "-- Rename Network Interfaces --"
          Write-Host "-------------------------------"
          $tmpArr | ft -AutoSize

          Do
          {
            Write-Host -NoNewline `n"Select Interface "
            Write-Host -foregroundColor Yellow -NoNewline "[ID]"
            Write-Host -NoNewline " or "
            Write-Host -foregroundColor Yellow -NoNewline "[Q]"
            Write-Host -NoNewline "uit: "
            $RenameNIC = Read-Host
          }
          While ((!$RenameNIC -or $RenameNIC -eq 0) -and $RenameNIC -ne "Q")

          If ($RenameNIC -eq "Q") {Break}

          $RenameNIC = [Int]$RenameNIC-1
          $NewName = Read-Host `n`n"New Name for the Network Interface (Blank: Cancel)"
          If (! $NewName) {Write-Host `n"Canceled."}
          Else
          {
            $NICs[$RenameNIC] | Rename-NetAdapter -NewName $NewName
            Write-Host `n"Done."
          }
          Start-Sleep 1
        }
        While ($True)
      }

      "2"
      {
        Do
        {
          Clear-Host
          Write-Host `n`n"Retrieving Data. Please Wait..."

          $idx = 0
          $tmpArr = @()
          $NICs = Get-NetAdapter
          $VSW = Get-VMSwitch

          If (! $VSW) {Write-Host `n`n"There is no Virtual Switch."`n`n}
          Else
          {
            foreach ($Item in $VSW)
            {
              $idx++
              $idxStr = [String]$idx+")"
              $UpNIC = $NICs | Where {$_.InterfaceDescription -eq $Item.NetAdapterInterfaceDescription}
              $Output = New-Object PSObject
              $Output | Add-Member Noteproperty Index $idxStr
              $Output | Add-Member Noteproperty "Switch Name" $Item.Name
              $Output | Add-Member Noteproperty "Switch Type" $Item.SwitchType
              $Output | Add-Member Noteproperty "QoS Mode" $Item.BandwidthReservationMode
              $Output | Add-Member Noteproperty "QoS Default Weight" $Item.DefaultFlowMinimumBandwidthWeight
              $Output | Add-Member Noteproperty "Default Bandwidth %" $Item.BandwidthPercentage
              $Output | Add-Member Noteproperty "NIC Name" $UpNIC.Name
              $Output | Add-Member Noteproperty "NIC Description" $UpNIC.InterfaceDescription
              $Output | Add-Member Noteproperty "NIC Speed" $UpNIC.LinkSpeed
              $Output | Add-Member Noteproperty "NIC Status" $UpNIC.Status
              $tmpArr += $Output
            }

            Clear-Host
            Write-Host -ForegroundColor White -BackgroundColor DarkGreen "Phase - 3"
            Write-Host `n"--------------------------------------------"
            Write-Host "-- Manage Virtual Switches and Interfaces --"
            Write-Host "--------------------------------------------"
            $tmpArr | ft Index,"Switch Name","Switch Type","NIC Name","NIC Description","NIC Speed","NIC Status" -AutoSize

            Do
            {
              Write-Host -NoNewline `n"Select Virtual Switch "
              Write-Host -foregroundColor Yellow -NoNewline "[ID]"
              Write-Host -NoNewline ", Create "
              Write-Host -foregroundColor Yellow -NoNewline "[N]"
              Write-Host -NoNewline "ew Virtual Switch or "
              Write-Host -foregroundColor Yellow -NoNewline "[Q]"
              Write-Host -NoNewline "uit: "
              $ManageVSWnIf = Read-Host
            }
            While ((!$ManageVSWnIf -or $ManageVSWnIf -eq 0) -and $ManageVSWnIf -ne "N" -and $ManageVSWnIf -ne "Q")
            If ($ManageVSWnIf -eq "Q") {Break}

            If ($ManageVSWnIf -eq "N")
            {
              Do
              {
                Clear-Host
                Write-Host `n`n"Searching for Available Network Interfaces. Please Wait..."

                $idx = 0
                $tmpArr = @()
                $IPs = Get-NetIPAddress | Where {$_.AddressFamily -eq "IPv4"}
                $HostNIC = Get-VMNetworkAdapter -ManagementOS
                $NICs = Get-NetAdapterBinding | Where {$_.ComponentID -eq "ms_tcpip" -and $_.Enabled -eq "True"} | Get-NetAdapter | Sort-Object -Property Name

                foreach ($Item in $NICs)
                {
                  $isAvail = 1
                  foreach ($Item1 in $HostNIC)
                  {
                    $tmpMAC = $Item.MacAddress.Replace("-","")
                    If ($tmpMAC -eq $Item1.MacAddress) {$isAvail = 0}
                  }

                  If ($isAvail -eq 1)
                  {
                    $idx++
                    $idxStr = [String]$idx+")"
                    $IPAddress = ""
                    foreach ($Item3 in $IPs)
                    {
                      If ($Item3.InterfaceIndex -eq $Item.InterfaceIndex) {$IPAddress = $Item3.IPAddress+"/"+$Item3.PrefixLength}
                    }
                    $Output = New-Object PSObject
                    $Output | Add-Member Noteproperty Index $idxStr
                    $Output | Add-Member Noteproperty Name $Item.Name
                    $Output | Add-Member Noteproperty Description $Item.InterfaceDescription
                    $Output | Add-Member Noteproperty "IP Address" $IPAddress
                    $Output | Add-Member Noteproperty Speed $Item.LinkSpeed
                    $Output | Add-Member Noteproperty Status $Item.Status
                    $tmpArr += $Output
                  }
                }

                Clear-Host
                Write-Host -ForegroundColor White -BackgroundColor DarkGreen "Phase - 4"
                Write-Host `n"-------------------------------"
                Write-Host "-- Create New Virtual Switch --"
                Write-Host "-------------------------------"

                $tmpArr | ft -AutoSize

                Do
                {
                  Write-Host -NoNewline `n"Select Interface "
                  Write-Host -foregroundColor Yellow -NoNewline "[ID]"
                  Write-Host -NoNewline " or "
                  Write-Host -foregroundColor Yellow -NoNewline "[Q]"
                  Write-Host -NoNewline "uit: "
                  $CreateVSW = Read-Host
                }
                While ((!$CreateVSW -or $CreateVSW -eq 0) -and $CreateVSW -ne "Q")
                
                If ($CreateVSW -eq "Q") {Break}

                $CreateVSW = [Int]$CreateVSW-1
                $NICName = $tmpArr[$CreateVSW].Name

                $VSWName = Read-Host `n"New Virtual Switch Name (Blank: Cancel)"
                If (! $VSWName)
                {
                  Write-Host `n"Canceled."
                  Start-Sleep 1
                  Break
                }

                Write-Host `n"Creating a New Virtual Switch. Please Wait..."
                $CreateVWS = New-VMSwitch -Name $VSWName -NetAdapterName $NICName -AllowManagementOS $False -MinimumBandwidthMode Weight
                $SetVSWBW = $CreateVWS | Set-VMSwitch -DefaultFlowMinimumBandwidthWeight 10
                $CreateVWS = Get-VMSwitch -Name $VSWName
                $CreateVWS | fl *
                Write-Host `n"Creation Succeeded."
                Write-Host `n"Press Any Key to Continue..."
                $x = $host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
                Break
              }
              While ($True)
            }

            If ($ManageVSWnIf -ne "N" -and $ManageVSWnIf -ne "Q")
            {
              $ManageVSWnIf = [Int]$ManageVSWnIf-1
              $VSWName = $tmpArr[$ManageVSWnIf]."Switch Name"

              Do
              {
                Clear-Host
                $SelectedVSW = Get-VMSwitch | Where {$_.Name -eq $VSWName}
                If (! $SelectedVSW) {Break}

                Write-Host `n`n"Retrieving Data. Please Wait..."
                $VSWType = $SelectedVSW.SwitchType
                $VSWQoSMode = $SelectedVSW.BandwidthReservationMode
                $VSWDefaultQoS = $SelectedVSW.DefaultFlowMinimumBandwidthWeight
                $VSWDefaultPerc = $SelectedVSW.BandwidthPercentage
                $VSWNICDesc = $SelectedVSW.NetAdapterInterfaceDescription

                $VSWNIC = Get-NetAdapter | Where {$_.InterfaceDescription -eq $VSWNICDesc}
                $VSWNICName = $VSWNIC.Name
                $VSWNICSpeed = $VSWNIC.LinkSpeed
                $VSWNICStatus = $VSWNIC.Status
                $vNIC = Get-VMNetworkAdapter -ManagementOS -SwitchName $VSWName -ErrorAction SilentlyContinue
                $VSWvNIC = $vNIC.Count

                Clear-Host
                Write-Host -ForegroundColor White -BackgroundColor DarkGreen "Phase - 4"
                Write-Host `n"-----------------------------"
                Write-Host "-- Selected Virtual Switch --"
                Write-Host "-----------------------------"
                Write-Host `n" - Name: "$VSWName
                Write-Host `n" - Type: "$VSWType
                Write-Host `n" - QoS Mode: "$VSWQoSMode
                Write-Host `n" - QoS Default Weight: "$VSWDefaultQoS
                Write-Host `n" - Default Bandwidth: "$VSWDefaultPerc" %"
                Write-Host `n" - NIC Name: "$VSWNICName
                Write-Host `n" - NIC Description: "$VSWNICDesc
                Write-Host `n" - Link Speed: "$VSWNICSpeed
                Write-Host `n" - Link Status: "$VSWNICStatus
                Write-Host `n" - # of Management vNIC: "$VSWvNIC`n

                Do
                {
                  Write-Host -NoNewline `n"Re"
                  Write-Host -foregroundColor Yellow -NoNewline "[N]"
                  Write-Host -NoNewline "ame, "
                  Write-Host -foregroundColor Yellow -NoNewline "[R]"
                  Write-Host -NoNewline "emove, "
                  Write-Host -foregroundColor Yellow -NoNewline "[C]"
                  Write-Host -NoNewline "hange Default Weight or "
                  Write-Host -foregroundColor Yellow -NoNewline "[M]"
                  Write-Host -NoNewline "anage vNIC (Blank: Cancel): "
                  $VSWTask = Read-Host
                }
                While ($VSWTask -ne "N" -and $VSWTask -ne "R" -and $VSWTask -ne "M" -and $VSWTask -ne "C" -and $VSWTask -ne "")

                If ($VSWTask -eq "")
                {
                  Write-Host `n"Canceled."
                  Start-Sleep 1
                  Break
                }

                Switch ($VSWTask)
                {
                  "N"
                  {
                    $NewVSWName = Read-Host `n"New Virtual Switch Name"
                    If ($NewVSWName -ne "")
                    {
                      $SelectedVSW | Rename-VMSwitch -NewName $NewVSWName
                      $VSWName = $NewVSWName
                      Write-Host `n"Done."
                    }
                    Else
                    {
                      Write-Host `n"Nothing Changed."
                    }
                    Start-Sleep 1
                  }

                  "R"
                  {
                    Do
                    {
                      $VSWtoRemove = $SelectedVSW.Name
                      Write-Host -NoNewline `n"Removing Virtual Switch "
                      Write-Host -NoNewLine -foregroundColor Red $VSWtoRemove
                      Write-Host "."
                      Write-Host -NoNewLine "Are You Sure ? "
                      Write-Host -foregroundColor Yellow -NoNewline "[Y]"
                      Write-Host -NoNewline " or "
                      Write-Host -foregroundColor Yellow -NoNewline "[N]"
                      Write-Host -NoNewline ": "
                      $AUSure = Read-Host
                    }
                    While ($AUSure -ne "Y" -and $AUSure -ne "N")

                    If ($AUSure -eq "Y")
                    {
                      Write-Host `n`n"Removing Virtual Switch. Please Wait..."
                      $SelectedVSW | Remove-VMSwitch -Force
                      Write-Host `n"Done."
                      Start-Sleep 1
                      Break
                    }
                  }

                  "C"
                  {
                    $NewQoSValue = Read-Host `n"New Value of QoS Default Weight (1-100) (Blank: Cancel)"

                    If (! $NewQoSValue)
                    {
                      Write-Host `n"Canceled."
                      Start-Sleep 1
                    }
                    Else
                    {
                      $SelectedVSW | Set-VMSwitch -DefaultFlowMinimumBandwidthWeight $NewQoSValue
                      Write-Host `n"Done."
                      Start-Sleep 1
                    }
                  }

                  "M"
                  {
                    $SelSWName = $SelectedVSW.Name
                    Do
                    {
                      Clear-Host
                      Write-Host `n`n"Retrieving Data. Please Wait..."

                      $SelectedVSW = Get-VMSwitch | Where {$_.Name -eq $SelSWName}
                      If (! $SelectedVSW) {Break}

                      $IndexNum = 0
                      $tmpArr = @()
                      $VSWvNIC = Get-VMNetworkAdapter -ManagementOS -SwitchName $SelSWName -ErrorAction SilentlyContinue
                      foreach ($vNI in $VSWvNIC)
                      {
                        $IndexNum++
                        $IndexStr = [String]$IndexNum+")"
                        $VLANConfig = $vNI.VlanSetting
                        $BWConfig = $vNI.BandwidthSetting

                        $vNICName = $vNI.Name
                        $vNICVLANMode = $VLANConfig.OperationMode
                        $vNICAccessVLANID = $VLANConfig.AccessVlanId
                        $vNICMinBandWeight = $BWConfig.MinimumBandwidthWeight
                        $vNICBandPercentage = $vNI.BandwidthPercentage
                        $Output = New-Object PSObject
                        $Output | Add-Member Noteproperty Index $IndexStr
                        $Output | Add-Member Noteproperty Name $vNICName
                        $Output | Add-Member Noteproperty "VLANMode" $vNICVLANMode
                        $Output | Add-Member Noteproperty "VLAN ID(Access)" $vNICAccessVLANID
                        $Output | Add-Member Noteproperty "MinimumBandwidthWeight" $vNICMinBandWeight
                        $Output | Add-Member Noteproperty "BandwidthPercentage" $vNICBandPercentage
                        $tmpArr += $Output
                      }

                      Clear-Host
                      Write-Host -ForegroundColor White -BackgroundColor DarkGreen "Phase - 5"
                      Write-Host `n"---------------------------------------"
                      Write-Host "-- Manage Virtual Network Interfaces --"
                      Write-Host -NoNewLine "-- Selected Virtual Switch: "
                      Write-Host -ForegroundColor Green $SelSWName
                      Write-Host "---------------------------------------"

                      If (! $VSWvNIC)
                      {
                        Write-Host `n"There is no Virtual Network Interface."
                        Do
                        {
                          Write-Host -NoNewline `n"Add New Virtual Network Interface? "
                          Write-Host -foregroundColor Yellow -NoNewline "[Y]"
                          Write-Host -NoNewline " or "
                          Write-Host -foregroundColor Yellow -NoNewline "[N]"
                          Write-Host -NoNewline ": "
                          $AddvNIC = Read-Host
                        }
                        While ($AddvNIC -ne "Y" -and $AddvNIC -ne "N")

                        If ($AddvNIC -eq "Y")
                        {
                          $NewNICName = Read-Host `n`n"Interface Name (Blank: Cancel)"
                          
                          If (! $NewNICName)
                          {
                            Write-Host `n"Canceled."
                            Start-Sleep 1
                            Break
                          }
                          Else
                          {
                            $NewNICMinBand = Read-Host `n"Minimum Bandwidth Weight (0-100)"
                            $NewNICVlanID = Read-Host `n"VLAN ID (Blank: No VLAN)"

                            Write-Host `n`n"Creating Virtual Network Interface. Please Wait..."
                            Add-VMNetworkAdapter -ManagementOS -Name $NewNICName -SwitchName $SelSWName
                            Set-VMNetworkAdapter -ManagementOS -Name $NewNICName -MinimumBandwidthWeight $NewNICMinBand

                            If ($NewNICVlanID)
                            {Set-VMNetworkAdapterVlan -ManagementOS -VMNetworkAdapterName $NewNICName -Access -VlanId $NewNICVlanID}
                            Else {Set-VMNetworkAdapterVlan -ManagementOS -VMNetworkAdapterName $NewNICName -Untagged}
                            Write-Host `n"Creation Succeeded."
                            Start-Sleep 1
                          }
                        }
                        Else {Break}
                      }
                      Else
                      {
                        $tmpArr | ft -AutoSize
                        Do
                        {
                          Write-Host -foregroundColor Yellow -NoNewline `n"[A]"
                          Write-Host -NoNewline "dd, "
                          Write-Host -foregroundColor Yellow -NoNewline "[R]"
                          Write-Host -NoNewline "emove, "
                          Write-Host -foregroundColor Yellow -NoNewline "[M]"
                          Write-Host -NoNewline "odify Interface or "
                          Write-Host -foregroundColor Yellow -NoNewline "[Q]"
                          Write-Host -NoNewline "uit: "
                          $vNICTask = Read-Host
                        }
                        While ($vNICTask -ne "A" -and $vNICTask -ne "R" -and $vNICTask -ne "M" -and $vNICTask -ne "Q")

                        If ($vNICTask -eq "Q") {Break}

                        Switch ($vNICTask)
                        {
                          "A"
                          {
                            $NewNICName = Read-Host `n`n"Interface Name (Blank: Cancel)"
                            If (! $NewNICName)
                            {
                              Write-Host `n"Canceled."
                              Start-Sleep 1
                              Break
                            }

                            $NewNICMinBand = Read-Host `n"Minimum Bandwidth Weight (0-100)"
                            $NewNICVlanID = Read-Host `n"VLAN ID (Blank: No VLAN)"
                            Write-Host `n`n"Creating Virtual Network Interface. Please Wait..."
                            Add-VMNetworkAdapter -ManagementOS -Name $NewNICName -SwitchName $SelSWName
                            Set-VMNetworkAdapter -ManagementOS -Name $NewNICName -MinimumBandwidthWeight $NewNICMinBand

                            If ($NewNICVlanID)
                            {Set-VMNetworkAdapterVlan -ManagementOS -VMNetworkAdapterName $NewNICName -Access -VlanId $NewNICVlanID}
                            Else {Set-VMNetworkAdapterVlan -ManagementOS -VMNetworkAdapterName $NewNICName -Untagged}
                            Write-Host `n"Creation Succeeded."
                            Start-Sleep 1
                          }

                          "R"
                          {
                            Write-Host -NoNewLine `n`n"Interface "
                            Write-Host -NoNewLine -foregroundColor Yellow "[ID] "
                            Write-Host -NoNewLine "(Blank: Cancel): "
                            $vNICtoRemove = Read-Host

                            If ($vNICtoRemove)
                            {
                              $vNICtoRemove = [Int]$vNICtoRemove-1
                              $vNICtoRemoveName = $tmpArr[$vNICtoRemove].Name
                              Do
                              {
                                Write-Host -NoNewLine `n"Removing Virtual Network Interface "
                                Write-Host -NoNewLine -foregroundColor Red $vNICtoRemoveName
                                Write-Host "."
                                Write-Host -NoNewLine "Are You Sure ? "
                                Write-Host -NoNewLine -foregroundColor Yellow "[Y]"
                                Write-Host -NoNewLine " or "
                                Write-Host -NoNewLine -foregroundColor Yellow "[N]"
                                Write-Host -NoNewLine ": "
                                $ConfirmRemovevNIC = Read-Host
                              }
                              While ($ConfirmRemovevNIC -ne "Y" -and $ConfirmRemovevNIC -ne "N")

                              If ($ConfirmRemovevNIC -eq "Y")
                              {
                                Remove-VMNetworkAdapter -ManagementOS -Name $vNICtoRemoveName
                                Write-Host `n"Removed."
                                Start-Sleep 1
                              }
                              Else
                              {
                                Write-Host `n"Canceled."
                                Start-Sleep 1
                              }
                            }
                            Else
                            {
                              Write-Host `n"Canceled."
                              Start-Sleep 1
                            }
                          }

                          "M"
                          {
                            Write-Host -NoNewLine `n`n"Interface "
                            Write-Host -NoNewLine -foregroundColor Yellow "[ID] "
                            Write-Host -NoNewLine "(Blank: Cancel): "
                            $vNICtoModify = Read-Host
                            If ($vNICtoModify)
                            {
                              $vNICtoModify = [Int]$vNICtoModify-1
                              $vNICtoModifyName = $tmpArr[$vNICtoModify].Name
                              Write-Host -NoNewLine `n"Selected Interface is "
                              Write-Host -NoNewLine -foregroundColor Green $vNICtoModifyName
                              Write-Host "."

                              Do
                              {
                                Write-Host -NoNewLine `n"Modify "
                                Write-Host -NoNewLine -foregroundColor Yellow "[V]"
                                Write-Host -NoNewLine "LAN or "
                                Write-Host -NoNewLine -foregroundColor Yellow "[B]"
                                Write-Host -NoNewLine "andwidth Weight: "
                                $vNICModifyTask = Read-Host
                              }
                              While ($vNICModifyTask -ne "V" -and $vNICModifyTask -ne "B")

                              Switch ($vNICModifyTask)
                              {
                                "V"
                                {
                                  $NewVlanID = Read-Host `n"VLAN ID (Blank: No VLAN)"
                                  Write-Host `n`n"Modifing Virtual Network Interface. Please Wait..."
                                  If ($NewVlanID)
                                  {Set-VMNetworkAdapterVlan -ManagementOS -VMNetworkAdapterName $vNICtoModifyName -Access -VlanId $NewVlanID}
                                  Else {Set-VMNetworkAdapterVlan -ManagementOS -VMNetworkAdapterName $vNICtoModifyName -Untagged}
                                  Write-Host `n"Done."
                                  Start-Sleep 1
                                }

                                "B"
                                {
                                  $NewBW = Read-Host `n"Minimum Bandwidth Weight (0-100)"
                                  Write-Host `n`n"Modifing Virtual Network Interface. Please Wait..."
                                  Set-VMNetworkAdapter -ManagementOS -Name $vNICtoModifyName -MinimumBandwidthWeight $NewBW
                                  Write-Host `n"Done."
                                  Start-Sleep 1
                                }
                              }
                            }
                            Else
                            {
                              Write-Host `n"Canceled."
                              Start-Sleep 1
                            }
                          }
                        }
                      }
                    }
                    While ($True)
                  }
                }
              }
              While ($True)
            }
          }

          If (! $VSW)
          {
            Do
            {
              Write-Host -NoNewline `n"Create New Virtual Switch? "
              Write-Host -foregroundColor Yellow -NoNewline "[Y]"
              Write-Host -NoNewline " or "
              Write-Host -foregroundColor Yellow -NoNewline "[N]"
              Write-Host -NoNewline ": "
              $CreateNewVSW = Read-Host
            }
            While ($CreateNewVSW -ne "Y" -and $CreateNewVSW -ne "N")

            If ($CreateNewVSW -eq "N") {Break}
            Else
            {
              Do
              {
                Clear-Host
                Write-Host `n`n"Searching for Available Network Interfaces. Please Wait..."

                $idx = 0
                $tmpArr = @()
                $IPs = Get-NetIPAddress | Where {$_.AddressFamily -eq "IPv4"}
                $HostNIC = Get-VMNetworkAdapter -ManagementOS
                $NICs = Get-NetAdapterBinding | Where {$_.ComponentID -eq "ms_tcpip" -and $_.Enabled -eq "True"} | Get-NetAdapter | Sort-Object -Property Name

                foreach ($Item in $NICs)
                {
                  $isAvail = 1
                  foreach ($Item1 in $HostNIC)
                  {
                    $tmpMAC = $Item.MacAddress.Replace("-","")
                    If ($tmpMAC -eq $Item1.MacAddress)
                    {
                      $isAvail = 0
                    }
                  }

                  If ($isAvail -eq 1)
                  {
                    $idx++
                    $idxStr = [String]$idx+")"
                    $IPAddress = ""
                    foreach ($Item3 in $IPs)
                    {
                      If ($Item3.InterfaceIndex -eq $Item.InterfaceIndex) {$IPAddress = $Item3.IPAddress+"/"+$Item3.PrefixLength}
                    }
                    $Output = New-Object PSObject
                    $Output | Add-Member Noteproperty Index $idxStr
                    $Output | Add-Member Noteproperty Name $Item.Name
                    $Output | Add-Member Noteproperty Description $Item.InterfaceDescription
                    $Output | Add-Member Noteproperty "IP Address" $IPAddress
                    $Output | Add-Member Noteproperty Speed $Item.LinkSpeed
                    $Output | Add-Member Noteproperty Status $Item.Status
                    $tmpArr += $Output
                  }
                }

                Clear-Host
                Write-Host -ForegroundColor White -BackgroundColor DarkGreen "Phase - 4"
                Write-Host `n"-------------------------------"
                Write-Host "-- Create New Virtual Switch --"
                Write-Host "-------------------------------"
                $tmpArr | ft -AutoSize
                
                Do
                {
                  Write-Host -NoNewline "Select Interface "
                  Write-Host -foregroundColor Yellow -NoNewline "[ID]"
                  Write-Host -NoNewline " or "
                  Write-Host -foregroundColor Yellow -NoNewline "[Q]"
                  Write-Host -NoNewline "uit: "
                  $CreateNewVSNIC = Read-Host
                }
                While ((!$CreateNewVSNIC -or $CreateNewVSNIC -eq 0) -and $CreateNewVSNIC -ne "Q")

                If ($CreateNewVSNIC -eq "Q") {Break}

                $CreateNewVSNIC = [Int]$CreateNewVSNIC-1
                $NICName = $tmpArr[$CreateNewVSNIC].Name
                $VSWName = Read-Host `n"New Virtual Switch Name (Blank: Cancel)"
                If (! $VSWName)
                {
                  Write-Host `n"Canceled."
                  Start-Sleep 1
                  Break
                }

                Write-Host `n"Creating a New Virtual Switch. Please Wait..."
                $CreateVWS = New-VMSwitch -Name $VSWName -NetAdapterName $NICName -AllowManagementOS $False -MinimumBandwidthMode Weight
                $SetVSWBW = $CreateVWS | Set-VMSwitch -DefaultFlowMinimumBandwidthWeight 10
                $CreateVWS = Get-VMSwitch -Name $VSWName
                $CreateVWS | fl *
                Write-Host `n"Creation Succeeded."
                Write-Host `n"Press Any Key to Continue..."
                $x = $host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
                Break
              }
              While ($True)
            }
          }
        }
        While ($True)
      }

      "3"
      {
        Do
        {
          Clear-Host
          Write-Host `n`n"Retrieving Data. Please Wait..."

          $idx = 0
          $tmpArr = @()
          $NICs = Get-NetAdapterBinding | Where {$_.ComponentID -eq "ms_tcpip" -and $_.Enabled -eq "True"} | Get-NetAdapter | Sort-Object -Property Name
          $IPs = Get-NetIPAddress | Where {$_.AddressFamily -eq "IPv4"}

          foreach ($Item in $NICs)
          {
            $idx++
            $idxStr = [String]$idx+")"
            $IfName = $Item.Name
            $IfDesc = $Item.InterfaceDescription
            $Speed = $Item.LinkSpeed
            $Status = $Item.Status
            $IPAddress = ""
            $IfIPConfig = Get-NetIPInterface | Where {$_.InterfaceAlias -eq $IfName}

            If ($IfIPConfig.Dhcp -eq "Enabled") {$IPAddress = "DHCP"}
            ElseIf (! $IfIPConfig) {$IPAddress = "N/A"}
            Else
            {
              foreach ($Item1 in $IPs)
              {
                If ($Item1.InterfaceIndex -eq $Item.InterfaceIndex) {$IPAddress = $Item1.IPAddress+"/"+$Item1.PrefixLength}
              }
            }
            $Output = New-Object PSObject
            $Output | Add-Member Noteproperty Index $idxStr
            $Output | Add-Member Noteproperty Name $IfName
            $Output | Add-Member Noteproperty Description $IfDesc
            $Output | Add-Member Noteproperty "IP Address" $IPAddress
            $Output | Add-Member Noteproperty Speed $Speed
            $Output | Add-Member Noteproperty Status $Status
            $tmpArr += $Output
          }

          Clear-Host
          Write-Host -ForegroundColor White -BackgroundColor DarkGreen "Phase - 3"
          Write-Host `n"-----------------------------------"
          Write-Host "-- Configure IP Addresses (IPv4) --"
          Write-Host "-----------------------------------"
          $tmpArr | ft -AutoSize

          Do
          {
            Write-Host -NoNewline `n"Select Interface "
            Write-Host -foregroundColor Yellow -NoNewline "[ID]"
            Write-Host -NoNewline " or "
            Write-Host -foregroundColor Yellow -NoNewline "[Q]"
            Write-Host -NoNewline "uit: "
            $ConfigIP4NIC = Read-Host
          }
          While ((!$ConfigIP4NIC -or $ConfigIP4NIC -eq 0) -and $ConfigIP4NIC -ne "Q")

          If ($ConfigIP4NIC -eq "Q") {Break}

          $ConfigIP4NIC = [Int]$ConfigIP4NIC-1
          Do
          {
            Clear-Host

            $NIC = $NICs[$ConfigIP4NIC]
            $IfName = $NIC.Name
            $IfDesc = $NIC.InterfaceDescription
            $Speed = $NIC.LinkSpeed
            $Status = $NIC.Status
            $DNS = $NIC | Get-DnsClientServerAddress -AddressFamily IPv4
            $DNS = [String]$DNS.ServerAddresses
            $IPAddress = ""
            $IfIPConfig = Get-NetIPInterface | Where {$_.InterfaceAlias -eq $IfName}

            If ($IfIPConfig.Dhcp -eq "Enabled") {$IPAddress = "DHCP"}
            ElseIf (! $IfIPConfig) {$IPAddress = "N/A"}
            Else
            {
              foreach ($Item1 in $IPs)
              {
                If ($Item1.InterfaceIndex -eq $NIC.InterfaceIndex) {$IPAddress = $Item1.IPAddress+"/"+$Item1.PrefixLength}
              }
            }
            Write-Host -ForegroundColor White -BackgroundColor DarkGreen "Phase - 4"
            Write-Host `n"------------------------"
            Write-Host "-- Selected Interface --"
            Write-Host "------------------------"
            Write-Host `n" - Name: "$IfName
            Write-Host `n" - Description: "$IfDesc
            Write-Host `n" - IP Address: "$IPAddress
            Write-Host `n" - DNS Servers: "$DNS
            Write-Host `n" - Speed: "$Speed
            Write-Host `n" - Status: "$Status`n

            Do
            {
              Write-Host -foregroundColor Yellow -NoNewline `n"[D]"
              Write-Host -NoNewline "HCP or "
              Write-Host -foregroundColor Yellow -NoNewline "[S]"
              Write-Host -NoNewline "tatic (Blank: Cancel): "
              $IPType = Read-Host
            }
            While ($IPType -ne "D" -and $IPType -ne "S" -and $IPType -ne "")

            If (! $IPType)
            {
              Write-Host `n"Canceled."
              Start-Sleep 1
              Break
            }
            ElseIf ($IPType -eq "D")
            {
              $NIC | Remove-NetIPAddress -Confirm:$False -ErrorAction SilentlyContinue
              $NIC | Remove-NetRoute -Confirm:$False -ErrorAction SilentlyContinue
              $NIC | Set-NetIPInterface -Dhcp Enabled
              $NIC | Set-DnsClientServerAddress -ResetServerAddresses
              Write-Host `n"Done."
              Start-Sleep 1
              Break
            }

            $IP = Read-Host `n"New IP Address (Blank: Cancel)"
            If (! $IP)
            {
              Write-Host `n"Canceled."
              Start-Sleep 1
              Break
            }

            $ArrIP = $IP.Split(".")
            $IPClass = [int]$ArrIP[0]
            If ($IPClass -ge 0 -and $IPClass -le 127) {$DefaultSubnet = "255.0.0.0"}
            ElseIf ($IPClass -ge 128 -and $IPClass -le 191) {$DefaultSubnet = "255.255.0.0"}
            ElseIf ($IPClass -ge 192 -and $IPClass -le 224) {$DefaultSubnet = "255.255.255.0"}
            Else {$DefaultSubnet = "255.255.255.255"}
            $Mask = Read-Host `n"Subnet Mask (Default: "$DefaultSubnet")"
            If (! $Mask) {$Mask = $DefaultSubnet}
            $GW = Read-Host `n"Default Gateway (Optional)"

            $ArrMask = $Mask.Split(".")
            $PrefixLen = ""
            foreach ($MaskItem in $ArrMask)
            {
              $tmpPrefix = [Convert]::ToString([int32]$MaskItem,2)
              $PrefixLen = $PrefixLen + $tmpPrefix
            }
            $PrefixLen = $PrefixLen.Replace("0","")
            $PrefixLen = $PrefixLen.Length

            $NIC | Remove-NetIPAddress -Confirm:$False -ErrorAction SilentlyContinue
            $NIC | Remove-NetRoute -Confirm:$False -ErrorAction SilentlyContinue
            $NIC | Set-DnsClientServerAddress -ResetServerAddresses

            If (! $GW) {$tmp = $NIC | New-NetIPAddress -IPAddress $IP -PrefixLength $PrefixLen}
            Else {$tmp = $NIC | New-NetIPAddress -IPAddress $IP -PrefixLength $PrefixLen -DefaultGateway $GW}

            Write-Host `n"Done."`n
            Start-Sleep 1

            $DNSIP1 = Read-Host `n"Primary DNS Server IP Address (Optional)"
            If (! $DNSIP1) {Break}
            $DNSIP2 = Read-Host `n"Secondary DNS Server IP Address (Optional)"
            If (! $DNSIP2) {$NIC | Set-DnsClientServerAddress -ServerAddresses $DNSIP1}
            Else {$NIC | Set-DnsClientServerAddress -ServerAddresses $DNSIP1,$DNSIP2}

            Write-Host `n"Done."
            Start-Sleep 1
            Break
          }
          While ($True)
        }
        While ($True)
      }
    }
  }
  While ($True)
}


Function JumboFrame
{
  Do
  {
    Clear-Host
    Write-Host `n`n"Retrieving Data. Please Wait..."

    $NICs = Get-NetAdapterAdvancedProperty | Where {$_.RegistryKeyword -like "*JumboPacket"} | Sort-Object -Property Name
    $idx = 0
    $tmpArr = @()
    foreach ($Item in $NICs)
    {
      $idx++
      $idxStr = [String]$idx+")"
      $Interface = $Item | Get-NetAdapter

      $Output = New-Object PSObject
      $Output | Add-Member Noteproperty Index $idxStr
      $Output | Add-Member Noteproperty Name $Item.Name
      $Output | Add-Member Noteproperty Description $Interface.InterfaceDescription
      $Output | Add-Member Noteproperty SetValue $Item.DisplayValue
      $Output | Add-Member Noteproperty Speed $Interface.LinkSpeed
      $Output | Add-Member Noteproperty Status $Interface.Status
      $tmpArr += $Output
    }
    Clear-Host
    Write-Host -ForegroundColor White -BackgroundColor DarkGreen "Phase - 2"
    Write-Host `n"--------------------------------------------"
    Write-Host "-- Network Interface Jumbo Frame Settings --"
    Write-Host "--------------------------------------------"
    $tmpArr| ft -AutoSize

    Do
    {
      Write-Host -NoNewline `n"Select Interface "
      Write-Host -foregroundColor Yellow -NoNewline "[ID]"
      Write-Host -NoNewline ", Ping "
      Write-Host -foregroundColor Yellow -NoNewline "[T]"
      Write-Host -NoNewline "est or "
      Write-Host -foregroundColor Yellow -NoNewline "[Q]"
      Write-Host -NoNewline "uit: "
      $NICJumboSet = Read-Host
    }
    While (!$NICJumboSet)
    
    If ($NICJumboSet -eq "T")
    {
      $tmpTargetIP = Read-Host `n`n"Target IP Address (Blank: Cancel)"
      If (!$tmpTargetIP)
      {
        Write-Host `n"Canceled."
        Start-Sleep 1
      }
      Else
       {
          $PingCmd = "Ping -f -l 8000 "+$tmpTargetIP
          Invoke-Expression -Command $PingCmd
          Write-Host `n`n"Press Any Key to Continue..."
          $x = $host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
       }
    }
    
    Clear-Host
    If ($NICJumboSet -eq "Q") {Break}

    $NICJumboSet = [Int]$NICJumboSet-1
    If ($Error) {$Error.Clear()}
    Else
    {
      Write-Host -ForegroundColor White -BackgroundColor DarkGreen "Phase - 3"
      Write-Host `n"------------------------"
      Write-Host "-- Selected Interface --"
      Write-Host "------------------------"

      $Interface = $NICs[$NICJumboSet] | Get-NetAdapter
      $tmpArr = @()

      $Output = New-Object PSObject
      $Output | Add-Member Noteproperty Name $NICs[$NICJumboSet].Name
      $Output | Add-Member Noteproperty Description $Interface.InterfaceDescription
      $Output | Add-Member Noteproperty ConfigName $NICs[$NICJumboSet].DisplayName
      $Output | Add-Member Noteproperty SetValue $NICs[$NICJumboSet].DisplayValue
      $tmpArr += $Output
      $tmpArr| ft -AutoSize

      Do
      {
        Write-Host -foregroundColor Yellow -NoNewline `n"[E]"
        Write-Host -NoNewline "nable or "
        Write-Host -foregroundColor Yellow -NoNewline "[D]"
        Write-Host -NoNewline "isable Jumbo Frame (Blank: Cancel): "
        $EnableJumbo = Read-Host
      }
      While ($EnableJumbo -ne "E" -and $EnableJumbo -ne "D" -and $EnableJumbo -ne "")

      Switch ($EnableJumbo)
      {
        "E"
        {
          If ($NICs[$NICJumboSet].DisplayParameterType -eq 1)
          {
            $NICs[$NICJumboSet] | Set-NetAdapterAdvancedProperty -RegistryKeyword "*JumboPacket" -Registryvalue 9000
            Write-Host `n"Done."
            Start-Sleep 1
          }
          ElseIf ($NICs[$NICJumboSet].DisplayParameterType -eq 5)
          {
            $NICs[$NICJumboSet] | Set-NetAdapterAdvancedProperty -RegistryKeyword "*JumboPacket" -Registryvalue 9014
            Write-Host `n"Done."
            Start-Sleep 1
          }
        }

        "D"
        {
          If ($NICs[$NICJumboSet].DisplayParameterType -eq 1)
          {
            $NICs[$NICJumboSet] | Set-NetAdapterAdvancedProperty -RegistryKeyword "*JumboPacket" -Registryvalue 1500
            Write-Host `n"Done."
            Start-Sleep 1
          }
          ElseIf ($NICs[$NICJumboSet].DisplayParameterType -eq 5)
          {
            $NICs[$NICJumboSet] | Set-NetAdapterAdvancedProperty -RegistryKeyword "*JumboPacket" -Registryvalue 1514
            Write-Host `n"Done."
            Start-Sleep 1
          }
        }
        
        Default
        {
          Write-Host `n"Canceled."
          Start-Sleep 1
          Break
        }
      }
    }
  }
  While ($True)
}



#---------------------------------------------------#
#------------------- Script Main -------------------#
#---------------------------------------------------#
$UI = (Get-Host).UI.RawUI
$UI.BackgroundColor = "Black"
$UI.ForegroundColor = "White"
$Error.Clear()

Do
{
  Do
  {
    Clear-Host
    Write-Host -ForegroundColor White -BackgroundColor DarkGreen "Phase - 1"
    Write-Host `n"------------------------------------"
    Write-Host "-- Hyper-V Initial Configurations --"
    Write-Host "------------------------------------"
    Write-Host `n"1) Essential Settings for Hyper-V"
    Write-Host `n"2) Windows Features for Hyper-V and Failover Clustering"
    Write-Host `n"3) Physical and Virtual Network Configurations"
    Write-Host `n"4) Network Interface Jumbo Frame Settings"
    Write-Host -NoNewline `n`n"Select Task "
    Write-Host -foregroundColor Yellow -NoNewline "[ID]"
    Write-Host -NoNewline " or "
    Write-Host -foregroundColor Yellow -NoNewline "[Q]"
    Write-Host -NoNewline "uit: "
    $FunctionID = Read-Host
  }
  While ((!$FunctionID -or $FunctionID -eq 0 -or $FunctionID -gt 4) -and $FunctionID -ne "Q")

  Switch ($FunctionID)
  {
  "1" {Essential}
  "2" {WindowsFeatures}
  "3" {VirtualNetworks}
  "4" {JumboFrame}
  "Q" {
        Write-Host `n`n"Script Ended."`n`n
        Exit 0
      }
  }
}
While ($True)

 
:
Posted by 커널64
예전에 어떤 블로그의 글을 메모장으로 저장해 놓았던 글을 기록해 놓습니다.

Windows Server 2012 기반, 즉 Hyper-V 기반의 서버 가상화 인프라 구성 시 권장 구성에 대한 체크 리스트입니다. 어디까지나 권장 구성이기 때문에 실제 인프라의 상황에 따라 달라질 수 있습니다.


1. 하드웨어 펌웨어 업데이트 설치
호스트 서버 및 기타 하드웨어 장치(NIC, HBA 등)에 대한 펌웨어를 최신 버전으로 업데이트 합니다. 안정성 향상, 또는 SLAT, NPIV, ODX 등의 기능을 활용하기 위해 펌웨어 업데이트가 필요할 수 있으므로, 설치 전에 한 번 체크해 보도록 합니다.


2. Windows 2012 권장 업데이트 설치
반드시 가상 머신을 운영하기 전에 인프라 구성 시 아래 링크를 참고해 필요한 업데이트들을 설치할 것을 권장합니다.

Looking for Windows Server 2012 Clustering and Hyper-V Hotfixes?
Validating Hyper-V 2012 and Failover Clustering 2012 Hotfixes and updates with Powershell
http://blogs.technet.com/b/cedward/archive/2013/05/24/validating-hyper-v-2012-and-failover-clustering-2012-hotfixes-and-updates-with-powershell.aspx


3. 프린터 매핑 해제
도메인 그룹 정책 또는 로컬 그룹 정책을 사용해 Hyper-V 호스트에 대한 클라이언트 프린터 매핑 해제를 설정합니다. 운영자가 호스트 서버에 터미널 연결 시 드라이버 설치로 인해 예기치 않게 문제가 발생하지 않기 위해 설정을 권장합니다.

컴퓨터 구성 -> 관리 템플릿 -> Windows 구성 요소 -> 터미널 서비스 -> 원격 데스크톱 세션 호스트 -> 프린터 리디렉션
클라이언트 프린터의 리디렉션을 허용하지 않음: 사용


4. 필수 역할/기능 외 설치 금지
당연한 얘기지만 Hyper-V 호스트에는 필수적인 역할과 기능을 제외한 다른 기능을 설치하지 말 것을 권장합니다.
일반적인 구성 시 - 역할: Hyper-V,  기능: 장애 조치 클러스터, 다중 경로 IO
VDI 환경 구성 시 - 위 목록 외에 추가적으로 원격 데스크톱 서비스 역할


5. 백신 프로그램 예외 설정
보안 상의 이유로 Hyper-V 호스트 서버에 백신 프로그램을 설치하는 경우 아래 링크를 참고해 검사 예외 설정을 합니다.

- VHD, VHDX, AVHD, VSV, ISO 및 스냅샷 파일이 위치하는 모든 디렉터리
- 가상 머신 구성 디렉터리(기본 값: C:\ProgramData\Microsoft\Windows\Hyper-V 및 하위 디렉터리)
- 클러스터 환경의 경우 C:\Clusterstorage 및 하위 디렉터리
- vmms.exe, vmwp.exe 프로세스



6. TCP Chimney 기능 해제
Windows Server 2012의 자체 Teaming 기능을 사용하는 경우 네트워크 스택을 하드웨어(NIC)로 오프로드 하는 기능인 TCP Chimney Offload 기능을 해제하도록 합니다. 이외에 간혹 NIC의 특정 기능에 의해 예기치 않은 네트워크 관련 이상 증상이 발생하는 경우가 있습니다. 이런 경우 네트워크 인터페이스의 모든 Offload 기능들과 RSS 기능을 해제한 후 점검해 보시길 바랍니다.(TCP Connection Offload (IPV4), TCP Connection Offload (IPV6), TCP/UDP Checksum Offload (IPV4), TCP/UDP Checksum Offload (IPV4), Large Send Offload V2 (IPV4), Large Send Offload V2 (IPV6), Receive Side Scaling)

netsh int tcp set global chimney=disabled


7.  Jumbo Frame 설정
실시간 마이그레이션, 스토리지(iSCSI), CSV 리디렉션 용도의 네트워크 인터페이스에는 Jumbo Frame을 설정할 것을 권장합니다. 설정 방법은 제조사마다 조금씩 다를 수 있으나 보통 설정을 Enable, Disable하거나, MTU 설정을 9000 또는 9014로 설정하면 됩니다. 주의할 점은 네트워크 스위치 및 iSCSI 대상(스토리지)에 대해서도 설정이 되어야 합니다. 설정이 제대로 되었는지 확인하는 방법은 ping 명령을 이용합니다.

PING <대상 IP> -f -l 8000


8. CSV Cache 설정
Hyper-V 인프라가 VDI 환경에 사용되는 경우 CSV Cache 설정을 하도록 합니다. CSV Cache 기능을 메모리의 일부를 CSV 볼륨의 캐시로 활용해 비슷한 디스크 블록들이 다수 존재하는 VDI 환경에서 성능 향상을 기대할 수 있습니다. 기본적으로는 사용하지 않도록 설정되어 있으며, PowerShell에서 다음 명령을 통해 설정이 가능합니다.

- 메모리 설정 확인
Get-Cluster | fl *Cache*

- 캐시를 1GB로 설정(설정 후 각 호스트 재부팅)
(Get-Cluster).SharedVolumeBlockCacheSizeInMB = 1024

- CSV 볼륨 별 설정 확인
Get-ClusterSharedVolume | Get-ClusterParameter CsvEnableBlockCache

- CSV 볼륨에 대해 사용으로 설정(설정 후 디스크 리소스 Offline -> Online)
Get-ClusterSharedVolume <CSV 볼륨 이름> | Set-ClusterParameter CsvEnableBlockCache 1

 
 
:
Posted by 커널64

Windows Server 2012가 출시되면서 Hyper-V 네트워크 구성에 변화가 생겼습니다.
이전보다 유연하게 구성이 가능해졌다고 할 수 있겠는데요. 여러 블로그에도 구성에 대한 많은 글이 올라와 있지만 정리하는 차원에서 다시 한번 정리해 봅니다.

먼저, 기존 Windows Server 2008 R2까지의 Hyper-V 네트워크 구성을 보면 보통 이러한 구성이었습니다.
대략 4~6개 정도의 NIC를 장착한 후 Teaming 구성한 NIC를 가상 스위치로 구성해 가상 머신들이 사용하고, 나머지 인터페이스들을 관리 용도로 사용했었죠. 관리 용도라하면 도메인, 클러스터, 라이브 마이그레이션, 백업 등의 용도가 되겠습니다.
여기에 만약 스토리지가 iSCSI 방식이라면 네트워크 인터페이스가 더 늘어나게 되겠습니다. 그렇기 때문에, 보통 관리 용도의 네트워크를 합쳐서 사용했었던 것이 일반적이었습니다. 즉, 클러스터+라이브마이그레이션 등의 구성이 되겠습니다. 기존 버전(2008 R2)까지는 이렇게 밖에 구성할 수가 없었습니다. 이렇다보니 네트워크 구성도 복잡하고 케이블 수가 많이짐에 따라 관리도 어려운 것이 사실입니다.




그렇다면 Windows Server 2012 기반의 Hyper-V 구성에는 어떠한 다른 점이 있을까요?
Windows Server 2012에서는 10Gb NIC, Infiniband 지원 등 네트워크 관련된 여러 많은 기능들이 추가되었습니다. 또한, 가상 스위치와 관련해서 기존에는 가상 스위치에 관리용 인터페이스(가상 NIC)를 하나만 생성할 수 있었지만, 이제는 관리 용도의 인터페이스를 여러 개 생성할 수 있게 되었으며, QoS 기능을 통해 각각의 인터페이스 별로 네트워크 트래픽에 대한 관리(제한)가 가능해졌습니다.


그럼, 아래 구성들을 살펴 보겠습니다. 스토리지 연결은 제외하고 나머지 인터페이스들만 생각하시면 되겠습니다. Hyper-V 네트워크 구성은 네트워크에 대한 변경 작업이기 때문에 구성도에는 표시되어 있지 않지만, iLO와 같은 IP 기반 KVM 구성을 거의 필수적으로 해 두는 것이 좋습니다.


1. 2개의 10Gb 인터페이스와 1개 또는 2개의 1Gb 인터페이스, 네트워크 케이블 수 3 또는 4
Teaming 구성한 10Gb 인터페이스를 가상 스위치로 사용하고 관리 용도로는 별도의 1Gb 인터페이스를 사용하는 구성입니다. 관리용 인터페이스는 선택적으로 Teaming 구성을 할 수 있겠습니다. 관리용 인터페이스를 Teaming 구성하는 경우에는 기존 구성과 네트워크 케이블 수에는 차이가 없겠네요.



2. 4개의 10Gb 인터페이스, 네트워크 케이블 수 4
아주 부유한 구성지요. 10Gb 인터페이스를 2개씩 Teaming 구성하고 각각의 Teaming된 인터페이스를 가상 스위치와 관리용 인터페이스로 사용합니다.



3. 2개의 10Gb 인터페이스, 네트워크 케이블 수 2
만약, 10Gb 인프라로의 마이그레이션을 고려하시고 계시거나 이미 10Gb 인프라를 갖추고 계신 경우 가장 비용 효율적인 구성이 될 것으로 생각됩니다. 2개의 10Gb 인터페이스를 Teaming 구성해 가상 스위치로 사용하고, 여기서 관리용 인터페이스를 가상 NIC로 생성해 구성합니다.



기존의 구성 절차와의 차이점은 가상 스위치에 관리용 인터페이스를 추가하고, QoS 정책을 설정하는 내용이 추가된다는 것이 되겠습니다. 전체적인 구성 절차는 다음과 같습니다.


1. Hyper-V 역할 설치
서버 관리자 GUI를 통해 설치하셔도 되고, PowerShell을 사용한다면 다음 명령을 사용합니다. GUI로 설치하는 경우 가상 스위치는 생성하지 않습니다.
Add-WindowsFeature Hyper-V -IncludeManagementTools -Restart

2. 다중 경로 IO 설치
마찬가지로, 서버 관리자 GUI를 통해 설치하셔도 되고, PowerShell을 사용한다면 다음 명령을 사용합니다. 설치된 후에는 iSCSI 인터페이스에 IP 주소를 할당하고 mpiocpl 명령을 실행해 다중 경로 설정을 합니다.
Add-WindowsFeature Multipath-IO

3. NIC Teaming 구성
Teaming 모드는 네트워크 인프라 상황에 따라 달라질 수 있으나 일반적으로 팀 구성 모드는 SwitchIndependent, 부하 분산 모드(알고리즘)는 HyperVPort로 설정합니다. 한글판의 표시 이름은 '독립 전환', 'Hyper-V 포트' 입니다.


4. Virtual Switch 생성
PowerShell을 이용해 가상 스위치를 생성하고, 대역폭 설정 방법은 Weight로 설정합니다. 관리용 인터페이스는 아직 생성하지 않으며, 기본 최소 가중치(Weight)를 10 또는 20으로 설정합니다.
New-VMSwitch -Name <스위치 이름> -NetAdapterName <Teaming 인터페이스 이름> -AllowManagementOS $False -MinimumBandwidthMode Weight
Set-VMSwitch <스위치 이름> -DefaultFlowMinimumBandwidthWeight 10

5. 관리용 네트워크 어댑터(vNIC) 추가
Add-VMNetworkAdapter -ManagementOS -Name "Mgmt" -SwitchName <스위치 이름>
Add-VMNetworkAdapter -ManagementOS -Name "Cluster" -SwitchName <스위치 이름>
Add-VMNetworkAdapter -ManagementOS -Name "LM" -SwitchName <스위치 이름>


6. QoS 정책 설정(MinimumBandwidthWeight는 상대적인 값입니다. 값은 0에서 100 사이의 값을 입력할 수 있습니다.)
Set-VMNetworkAdapter -ManagementOS -Name "Mgmt" -MinimumBandwidthWeight 10
Set-VMNetworkAdapter -ManagementOS -Name "Cluster" -MinimumBandwidthWeight 20
Set-VMNetworkAdapter -ManagementOS -Name "LM" -MinimumBandwidthWeight 20

선택적으로 최대 사용 가능 대역폭을 제한할 수 있으며, bps로 입력합니다. 아래 예를 참고하세요.
Set-VMNetworkAdapter -ManagementOS -Name "LM" -MaximumBandwidth 1000000000
1000000000(1,000,000,000)을 입력하면 1Gb을 의미하며, 다들 아시다시피 125MB/sec을 의미압니다.

7. (Optional)관리 NIC VLAN 설정
Set-VMNetworkAdapterVlan -ManagementOS -VMNetworkAdapterName "Mgmt" -Access -VlanId 100
Set-VMNetworkAdapterVlan -ManagementOS -VMNetworkAdapterName "Cluster" -Access -VlanId 200
Set-VMNetworkAdapterVlan -ManagementOS -VMNetworkAdapterName "LM" -Access -VlanId 300

8. IP 주소 할당


:
Posted by 커널64
Windows Server 2012와 함께 릴리즈된 Hyper-V Server 2012에서 설치 가능한 역할과 기능 목록입니다. Windows Server 2012 부터는 에디션 간의 기능 차이가 없어졌습니다. 즉, Hyper-V와 관련된 향상되거나 추가된 모든 기능(확장성, 네트워크 가상화, RemoteFX 등)을 동일하게 사용하실 수 있습니다.

Hyper-V (Hyper-V)
원격 데스크톱 서비스 (Remote-Desktop-Services)
  > 원격 데스크톱 가상화 호스트 (RDS-Virtualization)
파일 및 저장소 서비스 (FileAndStorage-Services)
  > 저장소 서비스 (Storage-Services)
  > 파일 및 iSCSI 서비스 (File-Services)
    > 파일 서버 (FS-FileServer)
.NET Framework 3.5 기능 (NET-Framework-Features)
  > .NET Framework 3.5(.NET 2.0 및 3.0 포함) (NET-Framework-Core)
.NET Framework 4.5 기능 (NET-Framework-45-Features)
  > .NET Framework 4.5 (NET-Framework-45-Core)
  > ASP.NET 4.5 (NET-Framework-45-ASPNET)
BitLocker 드라이브 암호화 (BitLocker)
BITS(Background Intelligent Transfer Service) (BITS)
  > Compact 서버 (BITS-Compact-Server)
Media Foundation (Server-Media-Foundation)
SNMP 서비스 (SNMP-Service)
  > SNMP WMI 공급자 (SNMP-WMI-Provider)
Windows PowerShell (PowerShellRoot)
  > Windows PowerShell 3.0 (PowerShell)
  > Windows PowerShell 2.0 엔진 (PowerShell-V2)
Windows Server 백업 (Windows-Server-Backup)
Windows 표준 기반 저장소 관리 (WindowsStorageManagementService)
Windows 피드백 전달자 (WFF)
WoW64 지원 (WoW64-Support)
강화된 저장소 (EnhancedStorage)
다중 경로 I/O (Multipath-IO)
데이터 센터 브리징 (Data-Center-Bridging)
원격 서버 관리 도구 (RSAT)
  > 기능 관리 도구 (RSAT-Feature-Tools)
    > BitLocker 드라이브 암호화 관리 유틸리티 (RSAT-Feature-Tools-BitLocker)
    > 장애 조치(failover) 클러스터링 도구 (RSAT-Clustering)
      > Windows PowerShell용 장애 조치(failover) 클러스터 모듈 (RSAT-Clustering-PowerShell)
      > 장애 조치(failover) 클러스터 명령 인터페이스 (RSAT-Clustering-CmdInterface)
      > 장애 조치(failover) 클러스터 자동화 서버 (RSAT-Clustering-AutomationServer)
  > 역할 관리 도구 (RSAT-Role-Tools)
    > Hyper-V Management Tools (RSAT-Hyper-V-Tools)
      > Hyper-V Module for Windows PowerShell (Hyper-V-PowerShell)
장애 조치(failover) 클러스터링 (Failover-Clustering)
텔넷 클라이언트 (Telnet-Client)

목록에서 보시는 것과 같이 원격 데스크톱 가상화 호스트 역할을 설치할 수 있습니다. 그러므로, VDI 시나리오와 같이 클라이언트 운영 체제를 가상 머신으로 운영하는 경우 굳이 Standard 또는 Datacenter Edition을 사용하실 필요가 없겠습니다.

위 목록 중 서버 설치 중 자동으로 설치되는 항목들은 다음과 같습니다.
(Hyper-V 역할 외에도 PowerShell이 기본적으로 설치됩니다. 클러스터링은 기본 설치되지 않습니다.)
- Hyper-V
- 파일 및 저장소 서비스
  > 저장소 서비스
- .NET Framework 4.5 기능
  > .NET Framework 4.5
- Windows PowerShell
  > Windows PowerShell 3.0
- WoW64 지원

설치 후 GUI 버전의 Windows Server 2012 또는 원격 서버 관리 도구를 설치한 Windows 8을 통해 관리하실 수 있습니다. 원격으로 관리하기 위해 필요한 설정은 아래 링크를 확인하시기 바랍니다.
Manage Hyper-V Server 2012 Remotely
http://technet.microsoft.com/en-us/library/jj647785.aspx


:
Posted by 커널64

Windows Server 2012에서는 VDI 구성 절차가 좀 더 쉬워졌으며 풀 또는 전용 모드의 데스크톱 가상화 구성 시 템플릿 기반 배포 기능이 추가되었습니다.

그런데, 이 템플릿 기반의 이미지(가상 머신) 생성 시 한 번에 하나의 VM이 생성되는 것을 확인하셨을 겁니다. 소수의 가상 머신을 생성한다면 문제가 없겠지만 다수 사용자를 위한 가상 머신 생성 시 시간이 너무 오래 걸릴 수 있겠지요.




이러한 동작은 데스크톱 가상화 호스트 서버 역할의 기본 설정 값이 한 대씩 생성하도록 설정되어 있기 때문입니다. 이러한 동작은 GUI 상에서는 확인 또는 수정하실 수 없고 각각의 호스트 서버에서 설정/수정 하실 수 있습니다. 해당 레지스트리 값의 위치는 다음과 같습니다.


HKLM\SYSTEM\CurrentControlSet\Services\VmHostAgent\Parameters 키의 Concurrency DWORD 값

기본 값은 1(한 번에 한 대씩 생성)이며, 환경(호스트 및 스토리지의 성능)에 따라 설정하시면 되겠습니다.




:
Posted by 커널64
2012. 10. 30. 12:49

Windows Server 2012 Hyper-V CPU 지원 개수 Virtualization2012. 10. 30. 12:49

Windows Server 2012의 Hyper-V에서 지원되는 가상 머신 운영 체제와 각 운영 체제 별로 지원되는 최대 CPU 개수를 정리합니다. 최대 메모리 크기는 1TB로 동일합니다.

 

VM 운영 체제

vCPU 개수(코어 수)

Windows Server 2012

64

Windows Server 2008 R2 RTM / SP1

64

Windows Server 2008 SP2

8

Windows Server 2003 R2 SP2

2

Windows 8

32

Windows 7 RTM / SP1

4

Windows Vista SP2

2

Windows XP SP3

2

CentOS 5.7, 5.8, 6.0, 6.1, 6.2, 6.3

64

RHEL 5.7, 5.8, 6.0, 6.1, 6.2, 6.3

64

SLES 11 SP2

64

Open Suse 12.1

64

Ubuntu 12.04

64

 

참고로, CentOS와 RHEL(Red Hat Enterprise Linux)는 Linux Integration Service(ICS) 3.4를 설치하여야 합니다. 그 외 Linux 배포판은 운영 체제에 ICS가 포함되어 있으므로 따로 설치하실 필요가 없습니다.

2012/09/16 - [Virtualization] - Hyper-V Linux ICS 3.4 릴리즈
 

:
Posted by 커널64
2012. 9. 16. 11:39

Hyper-V Linux ICS 3.4 릴리즈 Virtualization2012. 9. 16. 11:39

Linux Integration Services 3.4 for Hyper-V 가 릴리즈 되었습니다.
Hyper-V ICS Linux Integration Service 3.4

지원되는 하이퍼바이저는 다음과 같습니다.
Windows Server 2012 / Hyper-V Server 2012 / Windows 8 Pro
Windows Server 2008 R2 / Hyper-V Server 2008 R2
Windows Server 2008 / Hyper-V Server 2008

지원되는 게스트 Linux 운영 체제는 다음과 같습니다.
- Red Hat Enterprise Linux 5.7, 5.8 및 6.0 ~ 6.3
- CentOS 5.7, 5.8 및 6.0 ~ 6.3

참고로, 이전 버전인 3.3 부터는 더 이상 마우스 드라이버를 따로 설치하실 필요가 없습니다.

다운로드 링크
http://www.microsoft.com/en-us/download/details.aspx?id=34603


:
Posted by 커널64

Windows Server 2012와 VMware vSphere 5.1 비교 자료

먼저, 무료 버전인 Hyper-V Server 2012와 2개의 VOSE 권한을 포함하는 Windows Server 2012 Standard Edition, 무제한의 VOSE 권한을 포함하는 Windows Server 2012 Datacenter Edition 이 세가지 버전의 Windows Server 에디션은 모두 동일한 기능을 가집니다.

아래는 Windows Server 2012 Hyper-V와 VMware vSphere 5.1에 대한 비교표입니다.


















자세한 내용은 첨부된 pdf 파일을 참고하시기 바랍니다.



:
Posted by 커널64
2012. 6. 8. 16:07

Linux Integration Service 3.3 릴리즈 Virtualization2012. 6. 8. 16:07

Linux Integration Service 3.3 릴리즈

Linux Integration Service ICS 버전 3.3이 릴리즈되었습니다. 이 버전에서 지원되는 운영 체제는 다음과 같습니다.
- Red Hat Enterprise Linux 6.0 ~ 6.2 x86, x64 (4 vCPU)
- CentOS 6.0 ~ 6.2 x86, x64 (4 vCPU) 
- Red Hat Enterprise Linux 6.0 ~ 6.2 x86, x64 (32 vCPU, Windows Server 2012)
- CentOS 6.0 ~ 6.2 x86, x64 (32 vCPU, Windows Server 2012)

이 버전은 Windwos Server 2008 뿐만 아니라 Windows Server 2012 기반의 Hyper-V 역할에서도 지원됩니다.

다운로드 링크
:
Posted by 커널64