Windowsserver
-
S2D and CSV balancer - my take on things
The question: To enable or disable CSV balancer in S2D? Before we continue, I want to clarify the Cluster AutoBalancer and CSV Balancer are separate things. Cluster Autobalancer is relating to cluster roles, or in this case the VMâs. CSV balancer is about the CSV storage. Info on each can be found here: Cluster Autobalancer aka VM Load balancing:Â Clustering and High-Availability CSV Balancer, i.e. what we are talking about here:Â Automatic SMB Scale-Out Rebalancing (this is related to SOFS and 2012R2 but gets the info across) -
Installing Azure Site Recovery Agent (i.e. running an exe/script) on a Hyper-V host using SCVMM
From time to time I have the requirement to deploy/update a basic app or run a script on my Hyper-V hosts. This is relatively simple using remote PS session or if you have SCCM managing your fleet. But sometimes you need to just push something out fast and luckily SCVMM can assist. My use case is to run an update for the Microsoft Site Recovery Services Agent on my hosts. I would do this periodically. -
Another S2D build blog... with a SCVMM twist (public draft)
WORK IN PROGRESS Editors Note: this is still a working document as my priorities have to be on other work right now, but in the interest of sharing I have made this available now⌠If you find any issues or errors let me know - thanks for reading! There are many S2D build blogs out there and I donât want to just add to the list but given Iâm doing this build with SCVMM and SCOM integration I thought Iâd run through the additional steps. -
SCVMM console crashes when opening VM host properties
Error: âVMM cannot use [Logical Switch] to create a virtual switch a there are no uplink port profile sets present on this logical switchâ Environment: SCVMM 1801. Symptom, right click on a Hyper-V host and after a couple of seconds the below error. After clicking OK, VMM crashes. The fix that worked for me. First check the host group of the problematic hosts. In this deployment, they live in host group âTenant HCIâ -
S2D on HPE Gen10 LFF - The BOM
A few months ago we placed an order for some slick HPE Gen10 hardware to replace our existing storage service. Our trusty Server 2012 R2 Storage Spaces with DL360 Gen8âs and DataON enclosures has served us well, very well, but itâs time to move on to the latest and greatest⌠âThe SANKillerâ At the time of writing this (10 of April 2018), although theyâve very recently added 2 more SFF configs, HPE have not published a WSSD certified solution for Gen10 LFF chassis. -
Unable to delete duplicate cluster resource for Hyper-V VM
Quick tip: You find yourself with duplicate HA roles for a virtual machine and youâre unable delete the problematic resource⌠Symptoms: Duplicate cluster roles for a virtual machine. When attempting to delete, you get the error: Error code: 0x8007012f The file cannot be opened because it is in the process of being deleted. Firstly, why does this happen? This can happen if an admin uses Failover Cluster Manager (even after theyâve been specifically instructed many times not too) to enable HA for a VM, then goes to SCVMM and uses the Migrate Virtual Machine and enable HA. -
All-Flash and Storage Spaces Direct
An interesting solution brief of Hyper-Converged Infrastructure from DataOn got my cogs ticking on a topic that has bugged me for a while⌠All-Flash storage. Firstly, this DataON solution is a seriously slick contender⌠a 3M IOPS 4-node HCI in 8U. The tech geek in me would be quite pleased to have that bad boy driving services on my platform. But is it necessary? Ultimately, that is a question that only you can answer based on your requirements, but after deploying several Hyper-Converged Infrastructure (HCI) and Storage Spaces Direct (S2D) solutions from various vendors over the last 12 months, I wanted to share my thoughts on this All-Flash phenomenon. -
Quick tip - Disabling ISO Media Sharing in SCVMM
Hello there! I often get asked if itâs possible to disable VMM users from âsharingâ ISOâs from the library when attaching to a VM. You can do this via applying a pre-configured Capability Profile and the Cloud and Virtual Machines. Note: Capability Profiles can only be assigned to Clouds, not to Host Groups Create a Capability Profile Name that means something to you Tip: In the capabilities we can scope the settings or range of many items within the profile. -
Managing a Hyper-V Datacenterâ Converged Networking and RDMA
Server 2016 brings great new feature called Switch Embedded Teaming (SET). A great overview of SET can be found in this TechNet article. But to summarize, SET basically allows a Virtual Network Adapter to access the features available by RDMA. I wonât go into too much detail on RDMA, there are essentially three types RoCE, iWarp and Infiniband. RoCE is the most common and requires that Datacenter Bridging (DCB) be enabled on your switches as well as the windows feature with the same name being installed. -
Managing a Hyper-V Datacenter - Extra thoughts & tuning
I will add to this post over time with anything I can recall that has helped in the tuning of the many environments Iâve worked on⌠Edited: 30/11 - Thoughts on Dynamic Optimization Before I continue, as usual Iâll try not to repeat what you can already find out there, so here are some tips that have been helpful over the years. Be sure to investigate whether each of the tips mentioned are valid for your version of hypervisor as a couple of these posts have aged: -
Managing a Hyper-V Datacenter - Host Networking - Teaming
There are many discussion topics around host networking that need to be considered. I will extend this post over time to include what I can, but many of these are dependent on your requirements. Some of the considerations include: Teaming options (this post) Converged design QoS policies SDN architecture Security & Edge Networking Switch high availability VMQâs and RSS Teaming options Typically when discussion teaming options we need to determine our teaming mode and the algorithm used. -
Managing a Hyper-V Datacenter - overview
I have been wanting to put a series together for a while now on the many aspects to consider when running a Hyper-V platform. So here we are.. As usual I want to avoid step-by-step installs as there are plenty on the internet, so I will link the useful ones and comment on any variances I recommend or points that need a little more consideration. This series will be organic and I will evolve over time. -
Mythbusting: The truth about blades
Hi all, this has been a long time coming but I wanted to share my thoughts and experiences on virtualization, Hyper-V and blades. Before we get started, I wanted to put this in context and give some reasoning as to the purpose of this post. Over the last 5 or 6 years, Iâve been closely working with many service providers and enterprises in designing, configuring and supporting Hyper-V and System Center environments, and an interesting and often polarising discussion topic that regularly surfaces is blades vs racks. -
Quick tip: Add second NIC to ARM VM using PowerShell
This is one I use regularly, so thought it might come in handy for you.. Assumption here is you are connected via PowerShell to your intended subscription.. A few key points: The VM will need to be stopped to execute Check the Azure VM sizing to see how many NICs you can attach I have a pre-created Network Interface with my desired settings #Using OGV to target your objects $RG = Get-AzureRmResourceGroup | ogv -PassThru $NIC = Get-AzureRmNetworkInterface | ogv -PassThru $VM = Get-AzureRmVm | ogv -PassThru #The actual adding of the NIC to the VM $VM = Add-AzureRmVMNetworkInterface -VM $VM -Id $NIC. -
S2D performance: 2-way mirror vs 3-way mirror
How many mirrors? Over the past few months weâve deployed several Storage Spaces Direct solutions, and one question that seems to pop up is the expected performance difference for a 2-way mirror vs a 3-way mirror. The obvious answer is a 2-way will out-perform a 3-way, but by how much? I wonât go into the resiliency or design decisions or when either option is preferred, this is purely from a performance based perspective. -
Export DHCP and import Reverse DNS zones using PowerShell
Had a fun one for a client recently whereby they were standing up some new DNS servers for a segment of their network. The forward lookup zones were very easy, import csv and PowerShell them in without much fuss at all.. Next came the Reverse DNS Zones. Now letâs just say that their documentation wasnât as up-to-date as it could have been, so the fun began when trying to go about importing them without having a reliable source of truth to go by. -
DPM 2016 and SQL 2016 - Error 4387
Scenario: SQL01 - SQL 2016 RTM install (At this point in time I still recommend SQL2014 for DPM2016) DPM01 â Data Protection Manager 2016 RTM install When âcheck and installâ get the below error. Clicking on OK then closes the installer How did we get here? Install SQL 2016 RTM on SQL01. Setup remote access for DPM01. Install DPM Prereqâs on SQL01. attempt to Install DPM 2016 RTM⌠and baboom⌠Error 4387. -
SMA Runbook: SCVMM Logical Networks into HP OneView
This SMA Runbook will add any new or missing logical network definitions (i.e. VLANâs) in SCVMM and to HP OneView appliance. As well as having a âworking SMA deploymentâ, the prerequisites for this Runbook are 5 SMA Variables (Assets) which are: VMMServer HPOneViewAppliance HPOneViewUsername HPOneViewPassword HPOneViewLoginDomain We use Active Directory to authenticate to our OneView. If you use local credentials you can remove this from the Runbook or set the variable to âLocalâ. -
SCVMM and Datastores
Was cleaning out some old PS scripts recently and found this one in my toolkit. This one will appease some of those out there who came to Hyper-V from another virtualization technology and are familiar with the term datastore⌠We use SOFS storage so our VM paths are all SMB shares but Iâve included the CSV path split for those still running CSVâs to the nodes. What this gives you is a quick view into which storage device each VM lives on: -
Applying updates (cab & msu) by batch file
Another one from my toolkit.. Basically run this batch file from a folder with the required update files and it will install them all. Once it is finished it will prompt for any input to restart the server. Enjoy! Dan @ECHO OFF SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION FOR /R "%~dp0" %%A IN (-KB.msu) DO ( CALL :SUB %%~nA ECHO= Installing KB!KB_NUM! >NUL TIMEOUT /t 3 WUSA "%%A" /quiet /norestart) ECHO= == Press any key to restart == >NUL PAUSE SHUTDOWN. -
Hyper-V Cluster LBFO method for VM Guest switches â Hyper-V Port is best!
Just a quick note to share my experience in NIC teaming algorithm with 2012 R2 hosts and Hyper-V and hopefully dispel some myths.. Many documents/blogs recommend the load balancing algorithm to be Dynamic by default. In my experience this is not the optimal configuration. For NIC teams that are used for VM Guest networking, the Load Balancing Algorithm should be set to Hyper-V Port by default. Every Hyper-V environment I have built in the last few years has performed significantly better using Hyper-V Port as the preferred load balancing algorithm. -
Azure Connector for WAP(Pheonix) fails to create VM âError in CheckCheckVmCreation()â
Another quick one (becoming a habit..) In deploying and testing Azure Connector for Windows Azure Pack found here, deploying a virtual machine can sometimes fail with an obscure status message of: âError in CheckCheckVmCreation()â This is because the parameters of the resource creation are rejected. In the below example, I faced this because my lab password did not meet the required complexities. Running the the process using the same account in Azure, I am faced with a minimum password complexity error -
NVGRE Rebuild â Warning 26926
Had a quirky one recently where by a client was rebuilding a NVGRE gateway (as per this post) failed with the below warning. Warning (26926) Unable to set up Remote Access server to support multi-tenancy mode. (Remote Access server and the host are not configured for multi-tenancy. Fix the issue in Remote Access server and retry the operation.). Recommended Action Fix the issue in Remote Access server and retry the operation. -
Hyper-V 2012 R2 NVGRE Gateways Rebuild
Fast publish⌠will revisit later Scenario: Existing NVGRE gateways manual deployed. Working fine for ages. NAT resources failed to come online HyperV Network Virtualization Gateway role failed FOCM below Cluster resource xxxxxxxxxxxxxxxxxx of type âNatâ in clustered role âHyperV Network Virtualization Gatewayâ failed The Windows NAT Driver service failed to start due to the following error: The property set specified does not exist on the object So, I decided I wanted to rebuild my gateways and reconnect them⌠but how? -
SCOM - Service Monitor & Remediation
How to create a custom service monitor and automatically restart it For this little demo, we will be using the Print Spooler service and targeting Windows Operating System This will target all version of Server and Client OS but I wonât go into rollups here In SCOM Console Authoring > Monitors > Create a Monitor > Unit Monitor Take a look at the varying out of the box options, many different monitor types available. -
WAP - Deploying a VM Role, some VM's prompt for product key
Simple one that new WAP users often miss when deploying VHDâs for VM Roles. When deploying a VM role with multiple instances, some instances get stuck during deployment with the VM waiting for a product key to be entered. Although the solution is clearly discussed here on TechNet I find that new WAP admins typically overlook this setting when importing a new vhd/vhdx template and loose a bit of time troubleshooting. -
Quick migrate multiple VM's using PowerShell
As users of System Center Virtual Machine Manager would know, trying to quickly live migrate multiple VMâs can be a slow and tedious task. Whilst I always recommend to user of VMM to use the Migrate Virtual Machine function or the Start Maintenance Mode options, sometimes I need to react quickly and the normal VMM way isnât fast enough. This is where PowerShell comes in⌠$VMS = Get-SCVirtualMachine | ogv -passthru $VMHost = Get-SCVMHost | ogv -passthru ForEach ($VM in $VMS) { Move-SCVirtualMachine -VM $VM -VMHost $VMHost -HighlyAvailable $true -RunAsynchronously -UseDiffDiskOptimization } Hope this helps! -
Migrate Logical Networks from VMM to VMM with PowerShell - The Export
Fast publish! Had to migrate logical networks from an existing VMM 2012 instance into a new shiny VMM 2012 R2 deployment. This is the export from the existing VMM. The import script will follow shortly: Import-Module virtualmachinemanager # all Logical network definitions $LogicalNetsdef = Get-SCLogicalNetworkDefinition Foreach ($def in $LogicalNetsdef){ foreach ($SubnetVlan in $def.SubnetVLans){ $data=[ordered]@{ LogicalNetworkName = $def.LogicalNetwork.Name Name=$def.Name Subnet=$SubnetVlan.Subnet VlanID=$SubnetVlan.VLanID } $Obj=New-Object -TypeName PSObject -Property $data Write-Output $Obj } } Enjoy! -
Install Windows Features in Bulk with PowerShell
Quick Tip: Install Windows Features with PowerShell in bulk Using my current favourite PowerShell feature, Out-GridView, we can easily and quickly install windows features with a little gui.. The command: Get-WindowsFeature | Out-GridView âpassthru | Install-WindowsFeature You will get an ogv window with the ability to select items to âpassthruâ Select a single or multiple item (via ctrl + click) and hit OK. When done, all your new features will be installed. -
Deleting Virtual Network fails due to assigned IP address - SCVMM
Had a request today where a tenant was trying to delete a virtual network but they received an error saying there were dependent IP addresses but they have no IP addresses listed in the network. Using my current favourite PowerShell feature, Out-GridView, we can quickly script the revocation of the naughty IP address.. Note: Change the VMM variable to suit your environment So I ran the below to find the IP. -
Physical, Logical & Virtual Networks in a Microsoft Cloud OS Environment
I had to give an overview of our Cloud OS network topology to our support and engineering guys to help them understand at high levels how it all fitted together. The below diagram hopefully demonstrates the 3 layers â physical, logical and virtual â and more importantly how the fit together. Some notes: We have a dedicated Hyper-V cluster for the fabric management domain. We also have a standalone Hyper-V host that has a VM for DC and DPM. -
Adding existing VMâs to WAP Subscription using PowerShell
Edit: added Cloud parameter to the script. Deploying WAP for clients, they start creating new clouds, plans and subscriptions which is great!! But how do they add existing VMâs to new users in WAP? EasyâŚ.. you guessed itâŚ. PowerShell! So I canât take the credit here, my sources are found here & here. Ok, thatâs out of the way.. here it is⌠Requirements: You must have an existing tenant account That tenant must have an existing VM (I usually just kick off a quick VM deployment in WAP and delete it once done) I like to use Out-GridView to keep the script portable. -
Change default PHP settings in Windows Azure Pack (IIS WebFarm)
Had a user try to upload a theme to a Wordpress site they had published using Windows Azure Pack but were getting a file exceeded size limit error as exampled below. âThe uploaded file exceeds the upload_max_filesize directive in php.iniâ Typically you would just go into the php.ini located on the local webserver but how do I do this in a WAP Websites WebFarm? PowerShell of course!!! Ok, I do this from the websites controller server: -
Migrate multiple VMâs from one Hyper-V cluster to another Hyper-V cluster with different Logical Switch using PowerShell.
Another fast publish! (I really should get back and clean these upâŚ) Recently upgraded one of our Hyper-V clusters and had to migrate workloads to a new Hyper-V cluster. The naming conventions of our logical switches etc were different so when migrating a VM using Hyper-V manager we were prompted to choose the new logical switch. Handling this via PowerShell in isolation is simple enough using this script but I wanted to do a whole stack of VMâs at once. -
VM Template network settings for WAP
Quick scribble: add images and detail 3 steps Template > NIC > Set Connected > Set static IP & Static MAC > OK Template > NIC > Set No Connected > Confirm static IP & Static MAC > OK Template > NIC > Set Connected > VM Network None > Confirm static IP & Static MAC > OK Do in each template AND hardware profile Deploying in WAP should work with or without a virtual network. -
SCVMM 2012 R2 - Refresh Host Cluster - Error (25122)
Fast publish (this is becoming a common phrase) so be kind⌠When refreshing host cluster in VMM, for some reason we started to see the below error in VMM: Error (25122) The specified address ((AllocatedIPAddressData#e449) { id = 6ea8ddba-b8a7-43f6-856e-0a4d35076681, LastUpdatedTimestamp = 3/24/2015 5:55:17 AM }) is already allocated by the pool (IPPool-LNet-Mgmt). This address should be assigned to only a single entity. Recommended Action Resolve to which entity this address is allocated. -
Live Migrating VMâs with Powershell from VMM to VMM with different Logical Switch
Another quick & dirty fast publish: When live migrating a VM from one Hyper-V to another Hyper-V when the virtual switch names are different, using the GUI you get a prompt to select the swtich on the target host. Using Powershell âMove-VMâ fails and there is no option to specify the target switch name. A way around this is using the Compare-VM cmdlet. Below is part of a quick and dirty script that achieved my goal. -
Setting the URLâs for WAP Admin & Tenant sites with PowerShell using variables
Edit: have updated the script This is a PowerShell script I use as a template when building WAP instances. Essentially, either edit variables in the script or use the read-host option. I prefer the set variables but the read-host is handy⌠well, it was onceâŚ
Collect URLS & Ports $URL = read-host "Domain Name?" Write-Host -ForegroundColor Yellow "Specify hostnames for each service" $TenantSite = read-host "Tenant host? (i.e. wap)" $TenantAuth = read-host "TenantAuth host?
-
Windows Azure Pack - URLs & Ports
This is for editing the Windows Azure Pack URLâs and Ports. Works as of WAP for Server 2012 R2 UR5. Modify your variables accordingly. I have each WAP site on an individual server for a scaled deployment so this sets all the sites to use the 443. #Set Variables $WAPDB = "WAPDB" $AdminSite = "wapadmin.domain.com" $AdminAuth = "wapauth.domain.com" $Tenant = "wap.domain.com" $TenantAuth = "waplogon.domain.com" #Run on Tenant Site Import-Module -Name MgmtSvcConfig Set-MgmtSvcFqdn -Namespace "TenantSite" -FullyQualifiedDomainName $Tenant -Port 443 -Server $WAPDB #Run on Tenant Auth Site Set-MgmtSvcFqdn -Namespace "AuthSite" âFullyQualifiedDomainName $TenantAuth -Port 443 -Server $WAPDB $ConnectionString = "Data Source=$WAPDB;Initial Catalog=Microsoft. -
Set Agent Proxy Default setting - SCOM 2012 R2
Run this on any server that has the SCOM Console installed. add-pssnapin "Microsoft.EnterpriseManagement.OperationsManager.Client"; new-managementGroupConnection -ConnectionString:scomserver.domain.com; set-location "OperationsManagerMonitoring::"; Set-DefaultSetting -Name HealthService\ProxyingEnabled -Value True Totally stole this from the SCOM aficionado - Kevin Holman. His post is here Cheersâ Dan -
Hyper-V - Create VM powershell script
Hi, Powershell script to create a VM after prompting the user for various settings. The script then attaches an ISO which is a boot media for an MDT server that is built tp push a particular task sequence resulting in a failry automated VM deployment. I normally do this type of stuff with VMM etc but the client only has Hyper-V and wanted it automated as much as possible. $VMName = Read-Host "Enter VM Name (Press [Enter] to choose Server01)" if ($VMName -eq "") { $VMName = "Server01" } ; if ($VMName -eq $NULL) { $VMName = "Server01" } $StartupMem = Read-Host "Enter VM Startup Memory in GB's (Press [Enter] to choose 1GB)" if ($StartupMem -eq "") { $StartupMem = 1024MB } ; if ($StartupMem -eq $NULL) { $StartupMem = 1024MB } if ($StartupMem -ne 1024MB) { $StartupMem = [int]$StartupMem * 1073741824 } $MinimumMem = Read-Host "Enter VM Minimum Memory in GB's (Press [Enter] to choose 512MB)" if ($MinimumMem -eq "") { $MinimumMem = 512MB } ; if ($MinimumMem -eq $NULL) { $MinimumMem = 512MB } if ($MinimumMem -ne "512MB") { $MinimumMem = [int]$MinimumMem * 1073741824 } $MaximumMem = Read-Host "Enter VM Maximum Memory in GB's (Press [Enter] to choose 4GB)" if ($MaximumMem -eq "") { $MaximumMem = 4096MB } ; if ($MaximumMem -eq $NULL) { $MaximumMem = 4096MB } if ($MaximumMem -ne 4096MB) { $MaximumMem = [int]$MaximumMem * 1073741824 } do { $Storage = Read-Host "Which storage do you want, SATA 'D' or SSD 'H' (Press [Enter] to choose 'D')" if ($Storage -eq "") { $Storage = "D" } ; if ($Storage -eq $NULL) { $Storage = "D" } if (($Storage -ne "D") -and ($Storage -ne "H")) { Write-Host "Incorrect valude entered, please enter 'D' or 'H'" } } until ($Storage -eq "D" -or $storage -eq "H") $VDisk1 = Read-Host "Enter VM System (C:) Hard Drive in GB's (Press [Enter] to choose 60GB)" if ($VDisk1 -eq "") { $VDisk1 = 60GB } ; if ($VDisk1 -eq $NULL) { $VDisk1 = 60GB } if ($VDisk1 -ne 60GB) { $VDisk1 = [int]$VDisk1 * 1073741824 } $VDisk2 = Read-Host "Enter VM Data (D:) Hard Drive in GB's (Press [Enter] to choose 60GB)" if ($VDisk2 -eq "") { $VDisk2 = 60GB } ; if ($VDisk2 -eq $NULL) { $VDisk2 = 60GB } if ($VDisk2 -ne 60GB) { $VDisk2 = [int]$VDisk2 * 1073741824 } $VMSwitches = @(get-vmswitch) #clear variable for testing $VMSwitch = "" $VMNetwork = "" do { For ($i = 0; $i -le $VMSwitches. -
SCVMM 2012 R2 - Refresh Host Cluster - Error (2912)
- Fast publish post - be nice.. In my Cloud OS demonstration environment recently I had a host in the cluster reporting âNeeds Attentionâ status and refreshing the host cluster failed with âerror 2912â. The Hyper-V Host was in âNeeds Attentionâ status and performing any functions from VMM were failing. Job summary example below: _Error (2912) An internal error has occurred trying to contact the server.domain.net server: : . WinRM: URL: [http://server.
-
SCOM 2012 R2 - Moving the operationsmanager DB from SQL server to new SQL Cluster
Moving SCOM 2012 R2 operationsdatabase to SQL Cluster. Process derived from this TechNet article http://technet.microsoft.com/en-au/library/hh278848.aspx Quick overview of the environment Versioning of my environment: System Center Operations Manger 2012 R2 w/ Update Rollup 4 SQL Server 2012 SP1 CU8 Windows Server 2012 R2 Existing servers and role: OM01 - Management Server OM02 - Management Server OM03 - Management Server OMSDB\OMDB - Operations Database Server / SQL Server 2012 SP1 OMSDW\OMDW - Data Warehouse Server / SQL Server 2012 SP1