my personal blog about systemcenter

Enabling AzureStack test enviroment using Nested Hyper-V

Categories: AzureStack, Hyper-V, Nested, Unsupported
Comments Off on Enabling AzureStack test enviroment using Nested Hyper-V

So with preview software the 2nd thing to do is go down the unspported/untested path

So after baremetal deployment on a few different host we move on to do nested AzureStack install , this is to enable faster deployment and rollback when we break something on purpose to test.

But always follow support guide lines for testing and use a dedicated phsycial machine , (we does this on mutiple other install in our testing setup)

Time from VM creation to AzureStack running 2 hours 15 minutes Smile

NOTE : Do not count this as stability testing always use supported hardware for that

So say Hello to our Little VM

image

16 Cores , 256Gb Memory , 5 drives at 300G

Invoke-WebRequest https://raw.githubusercontent.com/Microsoft/Virtualization-Documentation/master/hyperv-tools/Nested/Enable-NestedVm.ps1 -OutFile ~/Enable-NestedVm.ps1

~/Enable-NestedVm.ps1 -VmName “STACK10”

Enable it for nesting Hyper-V

image

Install a Windows Server TP4 with US locales

image

For now GUI only (Sorry Snover)

image

And we can see all our drives

image

Add a static IP address and add DNS/Gateway for access to Azure Active Directory

image

And rename to the next stack install Smile

image

I prefeer to online the drives and initialize them

image

image

Time to jump to Azure Active Directory and create a tenant admin user

image

Extract the 9GB file and run the Azure Stack Installer

image

This leaves us with a few files Smile

image

Add local credentials , and verify that all prereq are met , note the space warning is not seen on bare metal installs , need to see if its because the drives are initialised but everything is fine for install

image

Sign in with the Azure Active Directory Admin user

image

And accept the AAD

image

And we are ready to install

image

Installer is a very very cool powershell scripts series that does everything for us , it reboots a few times but signing on gives us the progress bar

image

First off is creating a domain , and joining the host to it

image

After that a Virtual Disk is created through storage spaces

image

And 2 hours later we are done Smile

image

And ready to roll

and while we are playing we might as well dedupe it

image

Smile , not really fair as there are many other installs on the same host but still fun Smile

Upgrading Microsoft Advanced Threat Analytics from 1.4 to version 1.5

Categories: AD, ATA, Microsoft Advanced Threat Analytics
Comments Off on Upgrading Microsoft Advanced Threat Analytics from 1.4 to version 1.5

Our experience upgrading Microsoft ATA to version 1.5

Following

https://msdn.microsoft.com/en-us/library/mt612814.aspx

Follow these steps to update to ATA version 1.5:

1.Download update 1.5

2.Update the ATA Center

3.Download the updated ATA Gateway package

4.Update the ATA Gateways

We did a prodcution upgrade of our ATA installation , and ratined data to avoid relearing everything

After the upgrade of the central ATA server we jumped into the ATA console

clip_image002

Health Center says System Healthy but a drill down to configuration shows that all gateways are outdated as step 4 wasn’t completed

clip_image003

So configuration shows all gateways needs a update

clip_image005

And since this is one of the first upgrades everything is handled manually

clip_image007

Update is 30 seconds in our environment

clip_image009

Gateways goes into not synced and after a few seconds its synced correctly and we can continue with the next gateways

clip_image010

And repeat times 4 , we had one gateway that needed a reboot

clip_image012

And we now have ATA running version 1.5 ready to detect once again

Overall very smooth installation and in our small environment we have less than an hour downtime for upgrading to a never and better install.

Personally I would love the system heath to report on the main screen that gateways needs update , if this is handled from separate teams in a large org it could be help full on the main screen

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
}