Posts tonen met het label Hyper-V. Alle posts tonen
Posts tonen met het label Hyper-V. Alle posts tonen

maandag 15 mei 2017

Failover Cluster Settings 2012r2 VS 2016 (Hyper-V)

Below an overview of all the differences of the available settings of a Windows failover cluster between a 2012r2 cluster and a 2016 cluster.

Hyper-v 2012 R2 Cluster settings
Hyper-V 2016 Cluster settings
Remark
AddEvictDelay                           : 60
AddEvictDelay                           : 60

AdministrativeAccessPoint               : ActiveDirectoryAndDns
AdministrativeAccessPoint               : ActiveDirectoryAndDns

BackupInProgress                        : 0
BackupInProgress                        : 0

BlockCacheSize                          : 0
BlockCacheSize                          : 0

ClusSvcHangTimeout                      : 60
ClusSvcHangTimeout                      : 135
New value
ClusSvcRegroupOpeningTimeout            : 5

Depricated
ClusSvcRegroupPruningTimeout            : 5

Depricated
ClusSvcRegroupStageTimeout              : 10
ClusSvcRegroupStageTimeout              : 10

ClusSvcRegroupTickInMilliseconds        : 300
ClusSvcRegroupTickInMilliseconds        : 300

ClusterEnforcedAntiAffinity             : 0
ClusterEnforcedAntiAffinity             : 0

ClusterGroupWaitDelay                   : 120
ClusterGroupWaitDelay                   : 120

ClusterLogLevel                         : 3
ClusterLogLevel                         : 3

ClusterLogSize                          : 300
ClusterLogSize                          : 300

CrossSubnetDelay                        : 1000
CrossSubnetDelay                        : 1000

CrossSubnetThreshold                    : 20
CrossSubnetThreshold                    : 20

CsvBalancer                             : 1
CsvBalancer                             : 1

DatabaseReadWriteMode                   : 1
DatabaseReadWriteMode                   : 0
New value
DefaultNetworkRole                      : 2
DefaultNetworkRole                      : 3
New value
Description                             :
Description                             :

Domain                                  : Name.local
Domain                                  : Name.LOCAL

DrainOnShutdown                         : 1
DrainOnShutdown                         : 1

DynamicQuorum                           : 1
DynamicQuorum                           : 1

EnableSharedVolumes                     : Enabled
EnableSharedVolumes                     : Enabled

FixQuorum                               : 0
FixQuorum                               : 0

HangRecoveryAction                      : 3
HangRecoveryAction                      : 3

Id                                      :
Id                                      :

IgnorePersistentStateOnStartup          : 0
IgnorePersistentStateOnStartup          : 0

LogResourceControls                     : 0
LogResourceControls                     : 0

LowerQuorumPriorityNodeId               : 0
LowerQuorumPriorityNodeId               : 0

MessageBufferLength                     : 50
MessageBufferLength                     : 50

MinimumNeverPreemptPriority             : 3000
MinimumNeverPreemptPriority             : 3000

MinimumPreemptorPriority                : 1
MinimumPreemptorPriority                : 1

Name                                    : CLU03
Name                                    : CLU03

NetftIPSecEnabled                       : 1
NetftIPSecEnabled                       : 1

PlumbAllCrossSubnetRoutes               : 0
PlumbAllCrossSubnetRoutes               : 0

PreventQuorum                           : 0
PreventQuorum                           : 0

QuorumArbitrationTimeMax                : 90
QuorumArbitrationTimeMax                : 90

RecentEventsResetTime                   : 10-5-2017 09:07:41
RecentEventsResetTime                   : 9-5-2017 07:42:18

RequestReplyTimeout                     : 60
RequestReplyTimeout                     : 60

RootMemoryReserved                      : 512

Depricated
RouteHistoryLength                      : 10
RouteHistoryLength                      : 10

SameSubnetDelay                         : 1000
SameSubnetDelay                         : 1000

SameSubnetThreshold                     : 10
SameSubnetThreshold                     : 10

SecurityLevel                           : 1
SecurityLevel                           : 1

SharedVolumeCompatibleFilters           : {}
SharedVolumeCompatibleFilters           : {}

SharedVolumeIncompatibleFilters         : {}
SharedVolumeIncompatibleFilters         : {}

SharedVolumeSecurityDescriptor          : {1, 0, 4, 128...}
SharedVolumeSecurityDescriptor          : {1, 0, 4, 128...}

SharedVolumesRoot                       : C:\ClusterStorage
SharedVolumesRoot                       : C:\ClusterStorage

SharedVolumeVssWriterOperationTimeout   : 1800
SharedVolumeVssWriterOperationTimeout   : 1800

ShutdownTimeoutInMinutes                : 24
ShutdownTimeoutInMinutes                : 24

UseClientAccessNetworksForSharedVolumes : 0
UseClientAccessNetworksForSharedVolumes : 2
New value
WitnessDatabaseWriteTimeout             : 300
WitnessDatabaseWriteTimeout             : 300

WitnessDynamicWeight                    : 1
WitnessDynamicWeight                    : 1

WitnessRestartInterval                  : 15
WitnessRestartInterval                  : 15


AutoAssignNodeSite                      : 0
New

AutoBalancerLevel                       : 1
New

AutoBalancerMode                        : 2
New

ClusterFunctionalLevel                  : 9
New

ClusterUpgradeVersion                   : 8
New

CrossSiteDelay                          : 1000
New

CrossSiteThreshold                      : 20
New

DumpPolicy                              : 34672921
New

GroupDependencyTimeout                  : 600
New

PlacementOptions                        : 0
New

PreferredSite                           :
New

QuarantineDuration                      : 7200
New

QuarantineThreshold                     : 3
New

ResiliencyDefaultPeriod                 : 240
New

ResiliencyLevel                         : AlwaysIsolate
New

S2DBusTypes                             : 0
New

S2DCacheBehavior                        : Default
New

S2DCacheDesiredState                    : Enabled
New

S2DCacheMetadataReserveBytes            : 34359738368
New

S2DCachePageSizeKBytes                  : 16
New

S2DEnabled                              : 0
New

S2DIOLatencyThreshold                   : 10000
New

S2DOptimizations                        : 0
New

dinsdag 17 januari 2017

VHDX files not removed after storage move

Sometimes after doing a storage move in SCVMM 2012 the source will not be removed from the CSV LUN after completion.
Not always but sometimes you will get the following message:
 
As the warning states you have to manually delete the contents, but if you delete the VHDX file it will be gone but after hitting f5 the file is still there.
There are some people saying you have to change the owner of the CSV disk and delete the files on the owner node of the CSV.
 
But there is a simpler way to delete the files. Just rename the folder where the files are located, normally is this like c:\clusterstorage\volumex\servername\
So just rename the folder servername to servernameold, then go 1 folder up to volume 1 and go back, et voila the files are gone!

dinsdag 4 oktober 2016

Correct CSV Owner node

In my case not all CSV Lun’s had the right owners, I had 2 LUN’s with only 1 owner. In a cluster every Hyper-v node needs to be an owner of all CSV’s in the cluster, to check this run command below

Get-ClusterSharedVolume -Cluster clustername | Get-ClusterOwnerNode

Output:



To correct it run in a admin powershell:
Set-ClusterownerNode -Cluster "clustername" -Owners "Hyper-v01"," Hyper-v02"," Hyper-v03"," Hyper-v04” -Resource "Cluster Disk 2"


Check it again, et voila!

dinsdag 20 september 2016

Remove recovery type snapshot Hyper-V

Soms komt het voor dat een backup pakket een snapshot laat staan van een Hyper-v Machine, dit kan verschillende oorzaken hebben, als je deze weg wilt halen dan kan dit helaas niet via de GUI.
Je zult hiervoor met powershell aan de slag moeten, ga naar de Hyper-v node waar de VM op draait, en start een powershell CLI.
 
Vraag eerst de VM op en welke snapshot er nog staat: Get-VMSnapshot -VMName (naam vm)
 
 
Zoals je ziet staat er een recovery type snapshot, om deze weg te krijgen gebruik je het volgende commando:
 
Get-VMSnapshot -VMName (naam vm) | Remove-VMSnapshot
 
Je kunt nu binnen Hyper-v Manager zien dat er een merge in process is en check nadat deze klaar is of de disken netjes weer terug in 1 VHDX staan i.p.v. AVHDX.
 

 

donderdag 6 augustus 2015

Hyper-v / SCVMM Powershell commands

Enter maintenance mode van een Hyper-v node
Disable-SCVMHost -VMHost “VMHOST””  -MoveWithinCluster -RunAsynchronously
 
Stop maintenance mode:
param($VMHost)
Enable-SCVMHost -VMHost $VMHost -RunAsynchronously
 
Een VHDX disk aanmaken op het cluster
New-VHD -Path "C:\ClusterStorage\Volume1\DISK.vhdx" -Fixed -SizeBytes 25GB
 
Zien of er ISO’s zijn gemount op het cluster:
param([string] $VMMServer = $(throw “Please specify a VMM-Server to connect to.”))
Get-VirtualDVDDrive -All | Where-object {$_.ISO -ne $null} | select-object Name, ISO, ISOLinked | Sort-object -Property Name
 
ISO unmounten:
param([string] $VMServer = $(throw “Please specify a VM to dismount media from.”))
get-virtualDVDDrive -VM $VMServer | set-VirtualDVDDrive -NoMedia
 
Zien of er checkpoints zijn op het cluster:
Get-SCVMCheckpoint -VMMServer localhost
 
Checkpoint maken:
New-SCVMCheckpoint -VMVMName” -Name ”Naam checkpoint” -Description ”description”
 
Laatst aangemaakte checkpoint weggooien:
param([string] $VM = $(throw “Please specify a VM”))
$Checkpoint = Get-VMCheckpoint -VM $VM -MostRecent
Remove-SCVMCheckpoint -VMCheckpoint $Checkpoint -Confirm
 
Geheugen aanpassen van een VM:
param($VMachine, $MB)
$VM = Get-SCVirtualMachine -Name $VMachine
if($VM.Status -ne "PowerOff"){Stop-SCVirtualMachine -VM $VM}
Set-SCVirtualMachine -VM $VM -MemoryMB $MB
Start-SCVirtualMachine $VMachine
 
Processor aanpassen van een VM:
param($VMachine, $Proc)
$VM = Get-SCVirtualMachine -Name $VMachine
if($VM.Status -ne "PowerOff"){Stop-SCVirtualMachine -VM $VM}
Set-SCVirtualMachine -VM $VM -ProcessorCount $Proc
Start-SCVirtualMachine $VMachine
 
Shared VHDX toevoegen aan een VM:
Add-VMHardDiskDrive -VMName “VMname” -Path "C:\ClusterStorage\DISK.vhdx" -ShareVirtualDisk
 
Remove Shared disks van meerdere servers tegelijk:
##Run dit script op de Hyper-v node waar de VM op draait!
 
$Servers =@("server1","server2","server3")
foreach ($Vmname in $Servers)
{
    Add-VMHardDiskDrive -VMName $Vmname -Path "C:\ClusterStorage\Volume1\DISK1.vhdx" -ShareVirtualDisk
    Add-VMHardDiskDrive -VMName $VMname -Path "C:\ClusterStorage\Volume1\DISK2.vhdx" -ShareVirtualDisk
    Add-VMHardDiskDrive -VMName $VMname -Path "C:\ClusterStorage\Volume1\DISK3.vhdx " -ShareVirtualDisk
    Add-VMHardDiskDrive -VMName $VMname -Path "C:\ClusterStorage\Volume1\DISK4.vhdx " -ShareVirtualDisk
 
 
Remove Shared disks van meerdere servers tegelijk: (let op kijk van te voren welke controllernumber en controllerlocation de disk heeft!!)
##Run dit script op de Hyper-v node waar de VM op draait!
 
$Servers =@("server1","server2","server3")
foreach ($Vmname in $Servers)
{
    Remove-VMHardDiskDrive -VMName $Vmname  -ControllerType SCSI -ControllerNumber 0 -ControllerLocation 2
    Remove-VMHardDiskDrive -VMName $Vmname  -ControllerType SCSI -ControllerNumber 0 -ControllerLocation 3
    Remove-VMHardDiskDrive -VMName $Vmname  -ControllerType SCSI -ControllerNumber 0 -ControllerLocation 4
    Remove-VMHardDiskDrive -VMName $Vmname  -ControllerType SCSI -ControllerNumber 0 -ControllerLocation 5