my personal blog about systemcenter

All posts in Windows Server 2016

Storage Replica Windows Server 2016 TP5 Server to Server Replication

Categories: Datacenter, License, Storage, Storage Replica, Windows Server 2016
Comments Off on Storage Replica Windows Server 2016 TP5 Server to Server Replication

Microsoft added Storage Replica in Windows Server 2016 , and this post will cover the smallest deployment that is server to server replication

https://technet.microsoft.com/en-us/library/mt126183.aspx

image

First off is the licensing part , Storage Replica require Windows Datacenter edition

But if this is to protect a small branch office with a bunch of VM the host is most likely licensend with datacente either way

PS C:\Users\administrator.COFFEE> $Servers = ‘SR01′,’SR02’
PS C:\Users\administrator.COFFEE>
PS C:\Users\administrator.COFFEE> $Servers | ForEach { Install-WindowsFeature –ComputerName $_ –Name Storage-Replica,FS-
FileServer –IncludeManagementTools -restart }

Success Restart Needed Exit Code      Feature Result
——- ————– ———      ————–
True    Yes            SuccessRest… {File and iSCSI Services, File Server, Rem…
WARNING: You must restart this server to finish the installation process.
True    Yes            SuccessRest… {File and iSCSI Services, File Server, Rem…
WARNING: You must restart this server to finish the installation process.

Adding the WindowsFeature required to use storage replica Smile

image

Then we need to ensure we have the drives adding a data and a log drive to use with replication

After drives have been created we can then run the Test-SRTopology powershell that checks all the bits to see if everyone is configured correctly

Test-SRTopology -SourceComputerName SR01 -SourceVolumeName E: -SourceLogVolumeName F: -DestinationComputerName SR02 -DestinationVolumeName E: -DestinationLogVolumeName F: -DurationInMinutes 30 -ResultPath c:\temp

image

image

This will stress the networking but lays the foundation of how this will perform in production after being enabled

So let it sit for the default 30 mins Smile

image

20 Test Run , 1 warning

image

and lack of ICMP in firewall rule ended up with a warning for latency test not completed

Time to enable replication

New-SRPartnership -SourceComputerName SR01 -SourceRGName rg01 -SourceVolumeName e: -SourceLogVolumeName f: -DestinationComputerName SR02 -DestinationRGName rg02 -DestinationVolumeName e: -DestinationLogVolumeName f:

image

On my little test setup with 2 cores we can push 6gb/s with resonable cpu usage (not with RDMA adapters)

After initial sync is done we are now in sync

E: is available for use on server SR01 , F: is the log drive where the default 8gb is reserved

And we can reverse replication from SR02 to SR01 instead

Set-SRPartnership -NewSourceComputerName SR02 -SourceRGName rg02 -DestinationComputerName SR01 -DestinationRGName rg0

image

And we are now mounted on SR with with the active E:

Playing with Data Protection Manager and Deduplication in Widows Server 2016

Categories: Data Protection Manager, Deduplication, Hyper-V, Windows Server 2016
Comments Off on Playing with Data Protection Manager and Deduplication in Widows Server 2016

In this perfect world setup i created 100VM using powershell and powershell direct , they each have a roughtly 10gb disk usage

Due to the way DPM currently uses disk space we have consumed 2tb disk space

image

image

We have assigned 5 drives at 512gb each and usage is now at 80%

image

The drives are thin provisioned through Hyper-V so data fill isnt anywhere near whats reported in DPM

image

And we can see that DPM allocated alot of whitespace so there is room to grov

So just with using virtual DPM servers we have roughly 1tb disk usage compated to 2tb , so virtual gives us a 50% saving

image

image

And we now enable deduplication and start the process

image

again perfect world , 100->1 in deduplication Smile

Create mutiple VM from powershell in Hyper-V 2016 and powershell direct

Categories: Powershell, Windows Server 2016
Comments Off on Create mutiple VM from powershell in Hyper-V 2016 and powershell direct

For our test enviroment / playground i needed to create 400 domain joined Windows 2016 TP4 Servers , this being a enviroment without systemcenter i needed a helping hand in creating the VM’s as i didnt have Virtual Machine Manager or Configuration Manager ready

This is not a pretty script , uses write-host and odd loops to work around my lack of powershell skills , also uses hardcode credentials but will try to make it pretty later

The script creates the VM from a master template , renames and domain join though powershell direct , there is no error handling so it will sit and wait forever for powershell direct input if something goes wrong

Feel free to use and or laugh Smile and thank you to Charbel for his parameter syntax

Right now it just creates the VM ‘s under a CSV but does not cluster enable them

comments at [email protected]

#Demo Script to deploy Sequencial VM off a base template
#Script parts from https://charbelnemnom.com/2015/10/powershell-direct-deep-dive-hyperv-ws2016-powershell/

$Howmany = 100

$domain = “fabric.azurestack.coffee”

$localCred = new-object -typename System.Management.Automation.PSCredential `
  -argumentlist “Administrator”, (ConvertTo-SecureString “addpassword” -AsPlainText -Force)

$domainCred = new-object -typename System.Management.Automation.PSCredential `
  -argumentlist “Fabric\Administrator”, (ConvertTo-SecureString “asspassword” -AsPlainText -Force)

function rebootVM([string]$VMName) { Write-Output “[$($VMName)]:: Is Rebooting”; stop-vm $VMName; start-vm $VMName }

function waitForPSDirect([string]$VMName, $cred)
  {
  Write-Output “[$($VMName)]:: Waiting for PowerShell Direct (using $($cred.username))”
  while ((Invoke-Command -VMName $VMName -Credential $cred -ScriptBlock { “Test” } -ea SilentlyContinue) -ne “Test”) { Sleep -Seconds 1 }
  }

1..$Howmany | % {

$VMName = “WS2016-VM00$_”

Write-Host “Create VM $VMName” -BackgroundColor Black -ForegroundColor White

New-VHD -Path “C:\ClusterStorage\Volume1\$VMName\$VMName.vhdx” -ParentPath “C:\ClusterStorage\Volume1\BASEVHD\VMServerBase.vhdx” -Differencing

New-VM -Name $VMName -MemoryStartupBytes 1GB -SwitchName VM -Path C:\ClusterStorage\Volume1\$VMName -Generation 2

Set-VM -Name $VMName -DynamicMemory -MemoryMaximumBytes 2GB -MemoryMinimumBytes 512MB -ProcessorCount 2

Add-VMHardDiskDrive -VMName $VMName -ControllerType SCSI -ControllerNumber 0 -Path “C:\ClusterStorage\Volume1\$VMName\$VMName.vhdx”

Set-VM -VMName $VMName -AutomaticStopAction ShutDown

start-vm $VMName
}

1..$Howmany | % {

$DCGuestOSName = “WS2016-VM00$_”
$VMName = “WS2016-VM00$_”

# Set IP address, rename guest
  Write-Output “[$($VMName)]:: Starting Config  ”
  waitForPSDirect $VMName -cred $localCred
  Invoke-Command -VMName $VMName -Credential $localCred -Scriptblock {
  param ($VMName, $DCGuestOSName,$IPNumber,$subnet,$ip,$ipnum)

Write-Output “[$($VMName)]:: Prepare Network  “
  Rename-NetAdapter -InterfaceDescription “Microsoft Hyper-V Network Adapter” -NewName “ACCESS”
 

  Write-Output “[$($VMName)]:: Renaming OS to `”$($DCGuestOSName)`””
  Rename-Computer -NewName $DCGuestOSName

} -ArgumentList $VMName, $DCGuestOSName,$subnet,$IpNumber,$IP

  rebootVM $VMName
  waitForPSDirect $VMName -cred $localCred

#Domain Join
  Write-Output “[$($VMName)]:: Domain Join to  `”$($domain)`””
  Invoke-Command -VMName $VMName -Credential $localCred -Scriptblock {
  param ($domaincred,$domain)
  Add-Computer -DomainName $domain -Credential $domaincred
 

  } -ArgumentList $domaincred,$domain
  rebootVM $VMName
}

Create mutiple VM from powershell in Hyper-V 2016 and powershell direct

Categories: Powershell, Windows Server 2016
Comments Off on Create mutiple VM from powershell in Hyper-V 2016 and powershell direct

For our test enviroment / playground i needed to create 400 domain joined Windows 2016 TP4 Servers , this being a enviroment without systemcenter i needed a helping hand in creating the VM’s as i didnt have Virtual Machine Manager or Configuration Manager ready

This is not a pretty script , uses write-host and odd loops to work around my lack of powershell skills , also uses hardcode credentials but will try to make it pretty later

The script creates the VM from a master template , renames and domain join though powershell direct , there is no error handling so it will sit and wait forever for powershell direct input if something goes wrong

Feel free to use and or laugh Smile and thank you to Charbel for his parameter syntax

Right now it just creates the VM ‘s under a CSV but does not cluster enable them

comments at [email protected]

#Demo Script to deploy Sequencial VM off a base template
#Script parts from https://charbelnemnom.com/2015/10/powershell-direct-deep-dive-hyperv-ws2016-powershell/

$Howmany = 100

$domain = “fabric.azurestack.coffee”

$localCred = new-object -typename System.Management.Automation.PSCredential `
  -argumentlist “Administrator”, (ConvertTo-SecureString “addpassword” -AsPlainText -Force)

$domainCred = new-object -typename System.Management.Automation.PSCredential `
  -argumentlist “Fabric\Administrator”, (ConvertTo-SecureString “asspassword” -AsPlainText -Force)

function rebootVM([string]$VMName) { Write-Output “[$($VMName)]:: Is Rebooting”; stop-vm $VMName; start-vm $VMName }

function waitForPSDirect([string]$VMName, $cred)
  {
  Write-Output “[$($VMName)]:: Waiting for PowerShell Direct (using $($cred.username))”
  while ((Invoke-Command -VMName $VMName -Credential $cred -ScriptBlock { “Test” } -ea SilentlyContinue) -ne “Test”) { Sleep -Seconds 1 }
  }

1..$Howmany | % {

$VMName = “WS2016-VM00$_”

Write-Host “Create VM $VMName” -BackgroundColor Black -ForegroundColor White

New-VHD -Path “C:\ClusterStorage\Volume1\$VMName\$VMName.vhdx” -ParentPath “C:\ClusterStorage\Volume1\BASEVHD\VMServerBase.vhdx” -Differencing

New-VM -Name $VMName -MemoryStartupBytes 1GB -SwitchName VM -Path C:\ClusterStorage\Volume1\$VMName -Generation 2

Set-VM -Name $VMName -DynamicMemory -MemoryMaximumBytes 2GB -MemoryMinimumBytes 512MB -ProcessorCount 2

Add-VMHardDiskDrive -VMName $VMName -ControllerType SCSI -ControllerNumber 0 -Path “C:\ClusterStorage\Volume1\$VMName\$VMName.vhdx”

Set-VM -VMName $VMName -AutomaticStopAction ShutDown

start-vm $VMName
}

1..$Howmany | % {

$DCGuestOSName = “WS2016-VM00$_”
$VMName = “WS2016-VM00$_”

# Set IP address, rename guest
  Write-Output “[$($VMName)]:: Starting Config  ”
  waitForPSDirect $VMName -cred $localCred
  Invoke-Command -VMName $VMName -Credential $localCred -Scriptblock {
  param ($VMName, $DCGuestOSName,$IPNumber,$subnet,$ip,$ipnum)

Write-Output “[$($VMName)]:: Prepare Network  “
  Rename-NetAdapter -InterfaceDescription “Microsoft Hyper-V Network Adapter” -NewName “ACCESS”
 

  Write-Output “[$($VMName)]:: Renaming OS to `”$($DCGuestOSName)`””
  Rename-Computer -NewName $DCGuestOSName

} -ArgumentList $VMName, $DCGuestOSName,$subnet,$IpNumber,$IP

  rebootVM $VMName
  waitForPSDirect $VMName -cred $localCred

#Domain Join
  Write-Output “[$($VMName)]:: Domain Join to  `”$($domain)`””
  Invoke-Command -VMName $VMName -Credential $localCred -Scriptblock {
  param ($domaincred,$domain)
  Add-Computer -DomainName $domain -Credential $domaincred
 

  } -ArgumentList $domaincred,$domain
  rebootVM $VMName
}

Deduplication and Compression vs Encrypted VM’s

Categories: Bitlocker, Compression, Deduplication, Hyper-V, Windows Server 2016
Comments Off on Deduplication and Compression vs Encrypted VM’s

So with 2016 server we now have the ability to enable virtual TPM inside fhe VM to help protect data from threats from anywhere to a rouge san snapshots to a stolen backup tape.

D:\New folder>ddpeval.exe “D:\UNSECURE”
Data Deduplication Savings Evaluation Tool
Copyright (c) 2013 Microsoft Corporation.  All Rights Reserved.

Evaluated folder: D:\UNSECURE
Evaluated folder size: 17,38 GB
Files in evaluated folder: 6

Processed files: 6
Processed files size: 17,38 GB
Optimized files size: 4,52 GB
Space savings: 12,87 GB
Space savings percent: 74

Optimized files size (no compression): 7,93 GB
Space savings (no compression): 9,46 GB
Space savings percent (no compression): 54

Default VM 54% deduplication with 2 default installed guests , sure this number will screw when data is added but just to give a small example

D:\New folder>ddpeval.exe “D:\SECURE”
Data Deduplication Savings Evaluation Tool
Copyright (c) 2013 Microsoft Corporation.  All Rights Reserved.

Evaluated folder: D:\SECURE
Evaluated folder size: 20,41 GB
Files in evaluated folder: 6

Processed files: 6
Processed files size: 20,41 GB
Optimized files size: 19,36 GB
Space savings: 1,06 GB
Space savings percent: 5

Optimized files size (no compression): 19,46 GB
Space savings (no compression): 981,13 MB
Space savings percent (no compression): 4

Files excluded by policy: 0
Files excluded by error: 0

The same 2 VM now with inguest bitlocker , almost all of the effect from deduplication is now gone , so secured VM’s will hurt storage cost if you rely on array based compression and or deduplication.

Sure not all VM’s will be encrypted but seeing this from a hoster perspective I can see all VM’s being encrypted