White paper – Building High Performance Storage for Hyper-V Cluster on Scale-Out

A few days ago, Microsoft published a whitepaper how to build High Performance Storage for Hyper-V Cluster on Scale-Out File Servers using Violin Windows Flash Arrays.

To take a look on, please click here.

#PowerShell script – create converged network (incl. IPs, VLAN, DNS etc.)

I’m still working on some more automation parts of that script but it is working in the current state. So please be gently. :)

Thanks to Thomas Maurer. His blockpost about convered networking, did most of the job here.

#Define variable - please make changes below 
Write-Host "Start to collect variables" -ForegroundColor Green

#Define NIC Team Name & Count
$TN1 = "Team#01" 
Write-Host "Got Team Name $TN1"

#Define NICs 
$TN1NIC = "LOM#01","LAN#01","LAN#02" 
Write-Host "Got Network Interfaces $TN1NIC which will be included in $TN1"

#Define variable for vSwitch
$SW1 = "CVMSWExt#1" 
Write-Host "Got Name for converged switch $SW1"

#Define Default FlowMinimum Bandwidth Weight 
$FMBWW ="3"
Write-Host "Got Default FlowMinimum Bandwidth Weight $FMBWW for converged switch $SW1"

#Define variable for vNICs
$MGM = "Management" 
Write-Host "Got Name for Management Network "$MGM""
$LM = "LiveMigration"
Write-Host "Got Name for Livemigration Network "$LM""
$CSV = "CSV"
Write-Host "Got Name for Cluster Shared Volume & Heartbeat Network "$CSV""
$SAN = "SAN"
Write-Host "Got Name for Storage Area Network "$SAN""

#Define VLAN IDs
$VLANMGM = "99"
Write-Host "Got VLAN ID $VLANMGM for $MGM Network Interface"
$VLANLM = "20"
Write-Host "Got VLAN ID $VLANLM for $LM Network Interface"
$VLANCSV = "30"
Write-Host "Got VLAN ID $VLANCSV for $CSV Network Interface"
$VLANSAN = "40"
Write-Host "Got VLAN ID $VLANSAN for $SAN Network Interface"

#Define IPs
$IPMGM = "10.11.150.150"
Write-Host "Got IPv4 Address $IPMGM for $MGM Network Interface"
$IPLM = "10.11.152.150"
Write-Host "Got IPv4 Address $IPLM for $LM Network Interface"
$IPCSV = "10.11.153.150"
Write-Host "Got IPv4 Address $IPCSV for $CSV Network Interface"
$IPSAN = "10.11.151.150"
Write-Host "Got IPv4 Address $IPSAN for $SAN Network Interface"

#Define Subnetmask 
$SNMGM = "24"
Write-Host "Got Subnetmask $SNMGM for $MGM Network Interface"
$SNLM = "24"
Write-Host "Got Subnetmask $SNLM for $LM Network Interface"
$SNCSV = "24"
Write-Host "Got Subnetmask $SNCSV for $CSV Network Interface"
$SNSAN = "24"
Write-Host "Got Subnetmask $SNSAN for $SAN Network Interface"

#Define DNS Server Management LAN
$DNSMGM1 = "10.11.150.10"
$DNSMGM2 = "10.11.150.11"
Write-Host "Got DNS Server IPv4 Address $DNSMGM1 & $DNSMGM2 for $MGM Network Interface"

#Define Default Gateway
$DGMGM = "10.11.150.254" 
Write-Host "Got Default Gateway IPv4 Address $DGMGM for $MGM Network Interface"

#Define Bandwidth Weight
$BWMGM = "10"
Write-Host "Got got minimum Bandweigth $BWMGM for $MBM Network Interface"
$BWLM = "30"
Write-Host "Got got minimum Bandweigth $BWLM for $LM Network Interface"
$BWCSV = "10"
Write-Host "Got got minimum Bandweigth $BWCSV for $CSV Network Interface"
$BWSAN = "30"
Write-Host "Got got minimum Bandweigth $BWSAN for $SAN Network Interface"

#Consisten names
$VE ="vEthernet"

#Create NIC Team
Write-Host "Creating NIC $TN1 with $TN1NIC" -ForegroundColor Green
New-NetLbfoTeam -Name $TN1 -TeamMembers $TN1NIC -LoadBalancingAlgorithm HyperVPort -TeamingMode SwitchIndependent
Write-Host "NIC Team $TN1 created" -ForegroundColor Yellow

#Create VMSwitch ext for convered network
Write-Host "Creating vSwitch $SW1" -ForegroundColor Green
New-VMSwitch -Name $SW1 -NetAdapterName $TN1 -AllowManagementOS $false -MinimumBandwidthMode Weight
Set-VMSwitch $SW1 -DefaultFlowMinimumBandwidthWeight $FMBWW
Write-Host "vSwitch $SW1 created" -ForegroundColor Yellow

#Create vNICs on VMSwitch
Write-Host "Creating VM Network Adapter in Management OS $MGM, $LM, $CSV & $SAN" -ForegroundColor Green
Add-VMNetworkAdapter -ManagementOS -Name $MGM -SwitchName $SW1
Write-Host "Creating VM Network Adapter $MGM created" -ForegroundColor Yellow
Add-VMNetworkAdapter -ManagementOS -Name $LM -SwitchName $SW1
Write-Host "Creating VM Network Adapter $LM created" -ForegroundColor Yellow
Add-VMNetworkAdapter -ManagementOS -Name $CSV -SwitchName $SW1
Write-Host "Creating VM Network Adapter $CSV created" -ForegroundColor Yellow
Add-VMNetworkAdapter -ManagementOS -Name $SAN -SwitchName $SW1
Write-Host "Creating VM Network Adapter $SAN created" -ForegroundColor Yellow

#Set vNIC VLAN to switch
Write-Host "Configuring VLANs for $MGM, $LM, $CSV & $SAN" -ForegroundColor Green
Set-VMNetworkAdapterVlan -ManagementOS -VMNetworkAdapterName $MGM -Access -VlanId $VLANMGM
Write-Host "VLAN ID $VLANMGM assigned to VM Network Adapter $MGM" -ForegroundColor Yellow
Set-VMNetworkAdapterVlan -ManagementOS -VMNetworkAdapterName $LM -Access -VlanId $VLANLM
Write-Host "VLAN ID $VLANLM assigned to VM Network Adapter $LM" -ForegroundColor Yellow
Set-VMNetworkAdapterVlan -ManagementOS -VMNetworkAdapterName $CSV -Access -VlanId $VLANCSV
Write-Host "VLAN ID $VLANCSV assigned to VM Network Adapter $LM" -ForegroundColor Yellow
Set-VMNetworkAdapterVlan -ManagementOS -VMNetworkAdapterName $SAN -Access -VlanId $VLANSAN
Write-Host "VLAN ID $VLANSAN assigned to VM Network Adapter $SAN" -ForegroundColor Yellow

#Set Bandwidth to switch
Write-Host "Configuring Bandwidth Weight for $MGM, $LM, $CSV & $SAN" -ForegroundColor Green
Set-VMNetworkAdapter -ManagementOS -Name $MGM -MinimumBandwidthWeight $BWMGM
Write-Host "Assigned minimum Bandwidth to $MGM is $BWMGM" -ForegroundColor Yellow
Set-VMNetworkAdapter -ManagementOS -Name $LM -MinimumBandwidthWeight $BWLM
Write-Host "Assigned minimum Bandwidth to $LM is $BWLM" -ForegroundColor Yellow
Set-VMNetworkAdapter -ManagementOS -Name $CSV -MinimumBandwidthWeight $BWCSV
Write-Host "Assigned minimum Bandwidth to $CSV is $BWCSV" -ForegroundColor Yellow
Set-VMNetworkAdapter -ManagementOS -Name $SAN -MinimumBandwidthWeight $BWSAN
Write-Host "Assigned minimum Bandwidth to $SAN is $BWSAN" -ForegroundColor Yellow

#Set IP Address Management
Write-Host "Configuring IPv4, Subnetmask, Default Gateway and DNS Servers for $MGM" -ForegroundColor Green
New-NetIPAddress -InterfaceAlias "$VE ($MGM)" -IPAddress $IPMGM -PrefixLength "$SNMGM" -DefaultGateway $DGMGM
Write-Host "Set IPv4 Address $IPMGM, Subnet Mask /$SNMGM & Default Gateway $DGMGM to $VE ($MGM)" -ForegroundColor Yellow
Set-DnsClientServerAddress -InterfaceAlias "$VE ($MGM)" -ServerAddresses $DNSMGM1, $DNSMGM2
Write-Host "DNS Server $DNSMGM1 & $DNSMGM2 were configured on $VE ($MGM)"


#Set IP SAN, Livemigration & CSV
Write-Host "Configuring IPv4 & Subnetmask for $MGM, $LM, $CSV & $SAN" -ForegroundColor Green
New-NetIPAddress -InterfaceAlias "$VE ($LM)" -IPAddress $IPLM -PrefixLength "$SNLM"
Write-Host "Set IPv4 Address $IPLM & Subnet Mask /$SNLM to $VE ($LM)" -ForegroundColor Yellow
New-NetIPAddress -InterfaceAlias "$VE ($CSV)" -IPAddress $IPCSV -PrefixLength "$SNCSV"
Write-Host "Set IPv4 Address $IPCSV & Subnet Mask /$SNCSV to $VE ($CSV)" -ForegroundColor Yellow
New-NetIPAddress -InterfaceAlias "$VE ($SAN)" -IPAddress $IPSAN -PrefixLength "$SNSAN"
Write-Host "Set IPv4 Address $IPSAN & Subnet Mask /$SNSAN to $VE ($SAN)" -ForegroundColor Yellow

 

New free eBook “The Altaro PowerShell Hyper-V Cookbook”

Altaro recently published a free Hyper-V book. They cover following areas of interest:

    • Understand the basics of Hyper-V Cmdlets and how to create a Hyper-V VM
    • How to display and discover information about your VMs and Hyper-V host
    • Get mounted ISO files & identify orphaned VHD/VHDX files
    • How to delete obsolete snapshots and query Hyper-V event logs

I read the book a few days ago and I can really recommend it. To download the book, click here.

 

What you should also try out is Altaro Hyper-V Backup. You have a free licences that enables you to backup two VMs. To download the free edition please click on the banner below.

Banner-for-altaro_com_KS_11-06-2014_225x154-v2

 

Virtualization Fabric Design Considerations Guide via @Technet

Microsoft recently published a very helpful design guide regarding fabric and network design for you Hyper-V / Microsoft private Cloud environment.

To take a look on the guide please click here.

Free Script: Fixing Hyper-V Folder Security via @AltaroHyperV

Eric Siron Senior Systems Administrator at The University of Iowa Hospitals and Clinics and blogger on Altaros Hyper-V Hub recently published a powershell script to fix folder Hyper-V folder security.

Click here to view the original blog with the script.

What you should also try out is Altaro Hyper-V Backup. You have a free licences that enables you to backup two VMs. To download the free edition please click on the banner below.

Banner-for-altaro_com_KS_11-06-2014_225x154-v2

New blog page – document library

During some lazy minutes I sometimes create some sample documents for friends and customers. Normally those documents are basics for demo environments.

Today I thought I could provide some of those documents to all of you. So check out my new document library.

1

Now blogging together with Brocade Germany

As some of you already know, I have some prefered vendors, I work very near with.

A few months ago, I got a call from Brocade. They asked me, if I would like to blog together with them on the Brocade Germany Community. For me very unsual because I will blog in german which is my mother toungh but not prefered language. So in a few weeks, the day will be there. I will publish my first blog there. :) Can’t wait to get your feedback.

The first topic will be Brocade Vyatta 5400 vRouter in conjuntion with Microsoft Hyper-V converged Network. So feel free and follow the “Brocade Deutschland Blog

Hyper-V VHD files inaccessable after reinstallation from Hyper-V host

Today I had a funny session with my coworker Jens Nilsson. Last week we encountert an issue with his Hyper-V cluster and we needed reinstall one of his hosts.

After we reinstalled the host and tried to import some of his no clustered VMs, stored on a local drive, we encounter follwing issue.

Log Name:      Microsoft-Windows-Hyper-V-VMMS-Admin
Source:        Microsoft-Windows-Hyper-V-VMMS
Date:          9/19/2014 4:11:06 AM
Event ID:      12620
Task Category: None
Level:         Error
Keywords:

User: SYSTEM
Computer: HV02.test.local
Description:
”: Cannot get information for attachment ‘D:\virtualmachines\VHD\CLY01.vhdx’. (Virtual machine ID )

Microsoft-Windows-Hyper-V-VMMS-Admin
HV02.test.local

D:\virtualmachines\VHD\CLY01.vhdx
%%2147944320
0x80070780

So at first we thought it was an security issue and we checked those. They were fine and no services were blocking the access. During our discussion, Jens told me, he was using Windows Server 2012 R2 data deduplication on that drive with the old installation.

Ok that was the information I needed. In our case that meas, the file was still on the disk but when you tried to open it, Windows was missing the index to reassemble the blocks belonging to the file.

Now comes the issue, how can we fix that. Our first and for us both studid idea. Lets install data depluction again. Maybe he will be able to find his index again. Aehm … you know what happens with stupid ideas? They often work, in that moment too.

Next we wanted to find out why, the only possible solution was, the index for dedup is stored in the system volume information of the drive where it is configured. Which means, when you backup a drive where you use dedup, do not forget to save the system volume information too.

New free Hyper-V Book from Altaro “Explored: 7 Key Areas of Hyper-V”

Altaro recently published a free Hyper-V book. They cover following areas of interest:

  • How to secure your Hyper-V deployment beyond the basics, managing access to Virtual Machine functions, applying Group Policy, best practices on antimalware, and more
  • How to get the most out of Hyper-V Manager, setting up Native Network Teams and how Hyper-V’s Virtual Switches work
  • Understanding the concept of vCPUs and how to undertake capacity planning for Hyper-V
  • Learn the proper use of Hyper-V Dynamic Disks, how they operate and common myths surrounding the topic
  • How to connect storage to Hyper-V, including a variety of options as well as best practices.

I read the book a few days ago and I can really recommend it. To download the book, click here.

 

What you should also try out is Altaro Hyper-V Backup. You have a free licences that enables you to backup two VMs. To download the free edition please click on the banner below.

Banner-for-altaro_com_KS_11-06-2014_225x154-v2

 

Hyper-V VMs not starting after startup repair

After a lazy friday and some try and distroy with my test Hyper-V cluster. I needed to do a startup repair with my Hyper-V testcluster. After that I encountered a funny surprise, when I tried to startup my virtual machines.

They were telling me they are not able to start because my Hypervisor was not running.

1

 

2

 

In the first step I thought “Ok could be possible that VT is disabled in BIOS”. That was possible because I made some Firmware and BIOS updates during the session and my old collegues from Dell like to joke and to enable and disable BIOS features during updates. So I checked BIOS. OK … everything fine.

I restarted my host and check the services. No, everything fine here either.

After that I did a few minutes research via web and what did I found? An article from Ben Armstrong himself, encountering the same issue.

 

So what was the reason why my VMs do not want to start? As you all know, when you startup a Hyper-V host, you don’t see the Hyper-V on your desktop, you see the management OS. Which means, you have something like a VM running, which manages the Hypevisor below it. What happens when you do a startup repair? You recreate the boot storage and link it directly to the installed operating system. The issue is, the startup repair don’t know that you use a Hypervisor. Which means, it doesn’t set the parameter to startup the Hypervisor first bevor it starts the management OS.

Th fix this, you need to do some easy steps.

1. Start a command promt (cmd.exe) as administrator

2. Type bcdedit /set hypervisorlauchtype auto

3. reboot your system

If you use dual boot or something, you need to specify the bootloader identifier. How that works, is shown in a blog from Keith Combs.

3