Hyper-V – Tech-Coffee //www.tech-coffee.net Fri, 15 Jun 2018 13:47:37 +0000 en-US hourly 1 https://wordpress.org/?v=5.2.11 65682309 Convert VMs with StarWind V2V converter //www.tech-coffee.net/convert-vms-with-starwind-v2v-converter/ //www.tech-coffee.net/convert-vms-with-starwind-v2v-converter/#comments Fri, 15 Jun 2018 13:47:37 +0000 //www.tech-coffee.net/?p=6409 StarWind V2V converter is a free tool provided by StarWind to convert virtual hard drive. You can convert Hyper-V virtual hard drive (VHDX) to VMware ESXi virtual hard drive (VMDK) and vice versa. Other virtual hard drive formats are supported such as qcow2. Because StarWind V2V convert only the virtual hard drive, you can’t automate ...

The post Convert VMs with StarWind V2V converter appeared first on Tech-Coffee.

]]>
StarWind V2V converter is a free tool provided by StarWind to convert virtual hard drive. You can convert Hyper-V virtual hard drive (VHDX) to VMware ESXi virtual hard drive (VMDK) and vice versa. Other virtual hard drive formats are supported such as qcow2. Because StarWind V2V convert only the virtual hard drive, you can’t automate the migration between hypervisor. So, this tool is not appropriated if you have hundred or thousand VM. Usually, with this number of virtual machines, a smarter product is required (so a paid product). But if you have a small amount of VM these smarter products are overkill and StarWind V2V can help you. In this topic, we’ll see how to convert a Hyper-V VM to VMware VM.

Convert a Hyper-V VM with StarWind V2V

You can download StarWind V2V Converter from this link. Once you have downloaded and installed the product, you can launch it. To convert a Hyper-V VM, select Microsoft Hyper-V Server.

Then specify the name of the Hyper-V Host and credentials. Unfortunately, you can’t specify a cluster name.

Then select the virtual hard drive you want to convert and click on Next.

Next, select VMware direct conversion to ESXi. The description sysa that only ESXi 5.0, 5.5 and 6.0 are supported. But I have successfully converted a VHDX to an ESXi 6.7.

In the next window, specify the IP address and credentials of the target ESXi server.

Next select the datastore where you want to store the converted virtual hard drive.

When the VM is converting, you can get a progress bar.

When the migration is finished, you can connect to your ESXi and create a new VM with the same features. Remove the default hard disk Then add an existing hard disk and select the disk you’ve just converted.

Now you can start the VM. As you can see the VM is working (The VM I have converted was also on License terms). Once you are logged into operating system, you can install the VMware Tools.

Convert VMware VM to Hyper-V VM.

This time we want to convert a VMware VM to a Hyper-V VM. So I choose VMware ESXi Server.

Then specify the IP address and credentials of the source VMware ESXi server.

N.B: The migration from a VMware ESXi 6.7 doesn’t work with StarWind V2V Converter. I had to use a VMware ESXi 6.5 to make the screenshot.

Next select the VMDK you want to convert and click on Next. As you can see in the following screenshot, you can’t convert two VMDK in the same time. It’s a shame.

In the next window, choose Microsoft VHDX image.

Specify the hostname and credentials of the Hyper-V host. You can’t specify a cluster.

To finish choose the destination folder and click on next to start the convert process.

Conclusion

StarWind V2V is not the smartest converter product on the market. Some features are missing. But if you have a small amount of VM and you don’t want to pay a converter product, StarWind V2V can help you. You can migrate VM per VM from a lot of hypervisor. Thanks to this tool you can plan to migrate from Hyper-V to VMware or vice versa. However if you have hundred of VMs, don’t use this tool, it is not made for that.

The post Convert VMs with StarWind V2V converter appeared first on Tech-Coffee.

]]>
//www.tech-coffee.net/convert-vms-with-starwind-v2v-converter/feed/ 2 6409
Use Honolulu to manage your Microsoft hyperconverged cluster //www.tech-coffee.net/use-honolulu-to-manage-your-microsoft-hyperconverged-cluster/ //www.tech-coffee.net/use-honolulu-to-manage-your-microsoft-hyperconverged-cluster/#comments Wed, 21 Feb 2018 11:09:19 +0000 //www.tech-coffee.net/?p=6194 Few months ago, I have written a topic about the next gen Microsoft management tool called Honolulu project. Honolulu provides management for standalone Windows Server, failover clustering and hyperconverged. Currently hyperconverged management works only on Windows Server Semi-Annual Channel (SAC) versions (I cross finger for Honolulu support on Windows Server LTSC). I have upgraded my ...

The post Use Honolulu to manage your Microsoft hyperconverged cluster appeared first on Tech-Coffee.

]]>
Few months ago, I have written a topic about the next gen Microsoft management tool called Honolulu project. Honolulu provides management for standalone Windows Server, failover clustering and hyperconverged. Currently hyperconverged management works only on Windows Server Semi-Annual Channel (SAC) versions (I cross finger for Honolulu support on Windows Server LTSC). I have upgraded my lab to latest technical preview of Windows Server SAC to show you how to use Honolulu to manage your Microsoft hyperconverged cluster.

In part of my job, I deployed dozen of Microsoft hyperconverged cluster and to be honest, the main disadvantage of this solution is the management. Failover Clustering console is archaic and you have to use PowerShell to manage the infrastructure. Even if the Microsoft solution provides high-end performance and good reliability, the day-by-day management is tricky.

Thanks to Honolulu project we have now a modern management which can compete with other solutions on the market. Currently Honolulu is still in preview version and some of features are not yet available but it’s going to the right direction. Moreover, Honolulu project is free and can be installed on your laptop or on a dedicated server. As you wish !

Honolulu dashboard for hyperconverged cluster

Once you have added the cluster connection to Honolulu, you get a new line with the type Hyper-Converged Cluster. By clicking on it, you can access to a dashboard.

This dashboard provides a lot of useful information such as latest alerts provided by the Health Service, the overall performance of the cluster, the resource usage and information about servers, virtual machines, volumes and drives. You can see that currently the cluster performance charts indicate No data available. It is because the Preview of Windows Server that I have installed doesn’t provide information yet.

From my point of view, this dashboard is pretty clear and provides global information about the cluster. At a glance, you get the overall health of the cluster.

N.B: the memory usage indicated -35,6% because of a custom motherboard which not provide memory installed on the node.

Manage Drives

By clicking on Drives, you get information about the raw storage of your cluster and your storage devices. You get the total drives (I know I don’t follow the requirements because I have 5 drives on a node and 4 on another, but it is a lab ). Honolulu provides also the drive health and the raw capacity of the cluster.

By clicking on Inventory, you have detailed information about your drives such as the model, the size, the type, the storage usage and so on. At a glance, you know if you have to run an Optimize-StoragePool.

By clicking on a drive, you get further information about it. Moreover, you can act on it. For example, you can turn light on, retire the disk or update the firmware. For each drive you can get performance and capacity charts.

Manage volumes

By clicking on Volumes, you can get information about your Cluster Shared Volume. At a glance you get the health, the overall performance and the number of volumes.

In the inventory, you get further information about the volumes such as the status, the file system, the resiliency, the size and the storage usage. You can also create a volume.

By clicking on create a new volume, you get this:

By clicking on a volume, you get more information about it and you can make action such as open, resize, offline and delete.

Manage virtual machines

From Honolulu, you can also manage virtual machines. When you click on Virtual Machines | Inventory, you get the following information. You can also manage the VMs (start, stop, turn off, create a new one etc.). All chart values are in real time.

vSwitches management

From the Hyper-Converged cluster pane, you have information about virtual switches. You can create a new one, delete rename and change settings of an existing one.

Node management

Honolulu provides also information about your nodes in the Servers pane. At a glance you get the overall health of all your nodes and resource usage.

In the inventory, you have further information about your nodes.

If you click on a node, you can pause the node for updates or hardware maintenance. You have also detailed information such as performance chartsm drives connected to the node and so on.

Conclusion

Project Honolulu is the future of Windows Server in term of management. This product provides great information about Windows Server, Failover Clustering and Hyperconverged cluster in a web-based form. From my point of view, Honolulu eases the Microsoft hyperconverged solution management and can help administrators. Some features are missing but Microsoft listen the community. Honolulu is modular because it is based on extensions. Without a doubt, Microsoft will add features regularly. Just I cross finger for Honolulu support on Windows Server 2016 released in October 2016 but I am optimistic.

The post Use Honolulu to manage your Microsoft hyperconverged cluster appeared first on Tech-Coffee.

]]>
//www.tech-coffee.net/use-honolulu-to-manage-your-microsoft-hyperconverged-cluster/feed/ 1 6194
Storage Spaces Direct dashboard //www.tech-coffee.net/storage-spaces-direct-dashboard/ //www.tech-coffee.net/storage-spaces-direct-dashboard/#comments Thu, 14 Dec 2017 10:17:42 +0000 //www.tech-coffee.net/?p=6015 Today I release a special Christmas gift for you. For some time, I’m writing a PowerShell script to generate a Storage Spaces Direct dashboard. This dashboard enables you to validate each important setting for a S2D cluster. I decided to write this PowerShell script to avoid to run hundred of PowerShell cmdlet and check manually ...

The post Storage Spaces Direct dashboard appeared first on Tech-Coffee.

]]>
Today I release a special Christmas gift for you. For some time, I’m writing a PowerShell script to generate a Storage Spaces Direct dashboard. This dashboard enables you to validate each important setting for a S2D cluster.

I decided to write this PowerShell script to avoid to run hundred of PowerShell cmdlet and check manually returned value. With this dashboard, you get almost all the information you needs.

Where can I download the script

The script is available on github. You can download the documentation and the script from this link. Please read the documentation before running the script.

Storage Spaces Direct dashboard

The below screenshot shows you a dashboard example. This dashboard has been generated from my 2-node cluster in lab.

Roadmap

I plan to improve the script next year by adding the support for disaggregated S2D deployment model and to add information such as the cache / capacity ratio and the reservation space.

Special thanks

I’d like to thanks Dave Kawula, Charbel Nemnom, Kristopher Turner and Ben Thomas. Thanks for helping me to resolve most of the issues by running the script on your S2D infrastructures

The post Storage Spaces Direct dashboard appeared first on Tech-Coffee.

]]>
//www.tech-coffee.net/storage-spaces-direct-dashboard/feed/ 10 6015
Next gen Microsoft management tool: Honolulu //www.tech-coffee.net/next-gen-microsoft-management-tool-honolulu/ //www.tech-coffee.net/next-gen-microsoft-management-tool-honolulu/#respond Mon, 25 Sep 2017 06:10:47 +0000 //www.tech-coffee.net/?p=5791 Since the beginning of the year, Microsoft is working on a new management tool based on modern web languages such as HTML5, Angular and so on. This tool is called Honolulu. Honolulu is a user-friendly web interface that enables to manage Windows Server, Failover Clustering and Hyperconverged cluster. Currently, to manage hyperconverged cluster, Honolulu requires ...

The post Next gen Microsoft management tool: Honolulu appeared first on Tech-Coffee.

]]>
Since the beginning of the year, Microsoft is working on a new management tool based on modern web languages such as HTML5, Angular and so on. This tool is called Honolulu. Honolulu is a user-friendly web interface that enables to manage Windows Server, Failover Clustering and Hyperconverged cluster. Currently, to manage hyperconverged cluster, Honolulu requires Semi-Annual Windows Server release.

Honolulu is currently in public preview release which means that the product is under construction :). Honolulu is built in a modular way where you can add or remove extensions. Each management feature is included in an extension that you can add or remove. Microsoft expects later that vendors develop third party extensions. To be honest with you, this is the set of tools I’m waiting for a while ago. Microsoft was in late in management tools compared to other companies such as VMware. I hope that Honolulu will close the gap with VMware vCenter and Nutanix Prism.

Microsoft listens customers and feedback to improve this product. So you can download the product here and report feedback in this user voice.

In this topic, we will see an overview of Honolulu. I’ll dedicate a topic about Honolulu and Microsoft hyperconverged solution because Honolulu requires Windows Server 2016 RS3 release (in Semi-Annual Channel) to work with and I have not yet upgraded my lab.

Getting started with Honolulu

In the below screenshot, you can see Honolulu home page. You get all your connections (and the type) and you can add more of them.

By clicking on arrow next to Project Honolulu, you can filter the connection type on Server Manager, Failover Cluster Manager and Hyper-Converged Cluster Manager.

By clicking on the wheel (top right), you can access to extension manager and you get installed extensions. For example you have extensions for firewall management, Hyper-V, failover clustering and so on. You can remove extensions you don’t want.

Sever Manager

As you have seen before, you can manage a single server from Honolulu. I will not show you all management tools but just an overview of Honolulu. By adding and connecting to a server, you get the following dashboard. In this dashboard you can retrieve real-time metrics (CPU, memory and network) and information, you can restart or shutdown the system or edit RDP access and environment variables. For the moment you can’t resize columns and tables and I think in near future that Microsoft will add this feature.

An interesting module is the Events. In this pane, you get the same thing as this good old Event Viewer. You can retrieve all the events of your system and you can filter them. Maybe a checkbox enabling real-time events could be interesting :).

The devices pane is also available. In a single view, you have all hardware installed in the system. If Microsoft adds the ability to install drivers from there, Honolulu can replace DevCon for Core servers.

You can also browse the system files and manage file and folders.

Another pane enables to manage the network adapters as you can see below. For the moment this pane is limited because it doesn’t allow to manage advanced feature such as RDMA, RSS, VMMQ and so on.

You can also add or remove roles and features from Honolulu. It is really cool that you can manage this from a Web service.

If you use Hyper-V, you can manage VMs from Honoulu. The dashboard also is really nice because there is counters about VMs and last events.

Another super cool feature is the ability to manage updates from Honolulu. I hope Microsoft will add WSUS configuration from this pane with some scheduling.

Failover Cluster management

Honolulu enables also to manage failover cluster. You can add a failover cluster connection from Honolulu home page. Just click on Add.

Then specify the cluster name. Honolulu asks if you want to add also the servers member of the cluster.

One it is added, you can select it and you get this dashboard. You get cluster core ressource states, and some information about the cluster such as the number of roles, networks and disks.

By clicking on disks, you can get a list of Cluster Shared Volumes in the cluster and information about them.

If your cluster hosts Hyper-V VMs (not in hyperconverged way), you can manage VMs from there. You get the same pane than in Honolulu server manager. The VMs and related metrics are shown and you can create or delete virtual machines. A limited set of option is currently available.

You can also get the vSwitches deployed in each node. It’s pitty that Switch Embedded Teaming is not yet supported but I think the support will be added later.

Hyperconverged cluster management

As I said earlier, hyperconverged cluster is supported but only for Windows Server Semi-Annual channel (for the moment). I’ll dedicate a topic about Honolulu and hyperconverged cluster once I’ll upgrade my lab.

Update Honolulu

When a Honolulu update is released, you get notified by Update Available mention. Currently, the update process is not really user-friendly because when you click on Update Available, an executable is downloaded and you have to run again the Honolulu installation (specify installation path, certificate thumbprint etc.). I hope in the future that the update process will be a self-update.

When I have downloaded the executable, I checked the package size and it is amazing: only 31MB.

Conclusion

Finally, they did it! A true modern management tool. I try for Microsoft this tool for 3 months and I can say you that developers work really quickly and they make a great job. Features are added quickly and Microsoft listens customers. I recommend you to post in the user voice the features you want. The tool is currently not perfect, some features are missing but Honolulu is still in preview release ! Microsoft is in the right direction with Honolulu and I hope this tool will be massively used. I hope also that Honolulu will help to install more Windows Server in Core edition, especially for Hyper-V and storage server.

The post Next gen Microsoft management tool: Honolulu appeared first on Tech-Coffee.

]]>
//www.tech-coffee.net/next-gen-microsoft-management-tool-honolulu/feed/ 0 5791
Deploy Hyper-V from USB stick with unattended file //www.tech-coffee.net/deploy-hyper-v-from-usb-stick-with-unattended-file/ //www.tech-coffee.net/deploy-hyper-v-from-usb-stick-with-unattended-file/#respond Tue, 14 Mar 2017 15:18:13 +0000 //www.tech-coffee.net/?p=5242 When you have few Hyper-V hosts and when you have not the System Center products, you have to deploy your nodes from a USB stick or from PXE services such as WDS. These deployment methods often imply manual steps to configure the operating system. However, it is possible to automate most of the steps thanks ...

The post Deploy Hyper-V from USB stick with unattended file appeared first on Tech-Coffee.

]]>
When you have few Hyper-V hosts and when you have not the System Center products, you have to deploy your nodes from a USB stick or from PXE services such as WDS. These deployment methods often imply manual steps to configure the operating system. However, it is possible to automate most of the steps thanks to deployment tools (part of ADK) and some PowerShell scripts. This topic shows you how I deploy Hyper-V from USB stick with unattended file and scripts.

Requirements

To follow this topic, you need Windows Assessment and Deployment Kit (ADK). To make this topic, I have deployed the following feature:

You need also the ISO of Windows Server 2016. I have copied the install.wim (folder Sources of the ISO) on my local drive.

Prepare the USB stick

To prepare the USB stick, I use Rufus. Once you have run the tool, just select your ISO file, the USB Stick and the boot mode (Bios or UEFI). This topic is based on an UEFI configuration.

Prepare the unattended file

Once you have installed deployment tools, you can open it from start menu. Then click file | select Windows Image.

Next, browse your local drive to select install.wim.

Select the edition you want. For Hyper-V, I choose Windows Server 2016 Datacenter in Core edition.

Next create an answer file as below.

Select amd64_Microsoft-Windows-International-Core-WinPE (documentation here), and place it in 1. WindowsPE. Then specify language settings:

  • InputLocale: Keyboard layout
  • SystemLocale: system locale language
  • UILanguage: User Interface language
  • UserLocale: per-user settings for currency, time, numbers and so on

Next navigate to SetupUILanguage to specify the language used during Windows Setup.

Next, select amd64_Microsoft-Windows-Setup (documentation here) and place it in 1. WindowsPE.

Navigate to DiskConfiguration and right click on it and select add disk.

To create a partition, right click on CreatePartitions and select insert New CreatePartition.

To make the below configuration, I have followed this guide of Microsoft (because I have an UEFI):

Microsoft-Windows-Setup\DiskConfiguration\Disk DiskID = 0
WillWipeDisk = true
Microsoft-Windows-Setup\DiskConfiguration\Disk\ CreatePartitions\CreatePartition Order = 1
Size = 300
Type = Primary
Microsoft-Windows-Setup\DiskConfiguration\Disk\ CreatePartitions\CreatePartition Order = 2
Size = 260
Type = EFI
Microsoft-Windows-Setup\DiskConfiguration\Disk\ CreatePartitions\CreatePartition Order = 3
Size = 128
Type = MSR
Microsoft-Windows-Setup\DiskConfiguration\Disk\ CreatePartitions\CreatePartition Extend = true
Order = 4
Type = Primary
Microsoft-Windows-Setup\DiskConfiguration\Disk\ ModifyPartitions\ModifyPartition Format = NTFS
Label = WINRE
Order = 1
PartitionID = 1
Microsoft-Windows-Setup\DiskConfiguration\Disk\ ModifyPartitions\ModifyPartition Format = FAT32
Label = System
Order = 2
PartitionID = 2
Microsoft-Windows-Setup\DiskConfiguration\Disk\ ModifyPartitions\ModifyPartition Order = 3
PartitionID = 3
Microsoft-Windows-Setup\DiskConfiguration\Disk\ ModifyPartitions\ModifyPartition Format = NTFS
Label = HostOS
Letter = C
Order = 4
PartitionID = 4
Microsoft-Windows-Setup\ImageInstall\OSImage\InstallTo DiskID = 0
PartitionID = 4

In a single install.wim, there are multiple Windows images. So, we have to specify from which image Windows will be deployed. It is a little tricky but we can retrieve this information with the following dism command:

Dism /Get-ImageInfo /ImageFile:<Path/to/install.wim>

Thanks to this command, we can list images in install.wim and the index. In the below screenshot, the Windows Server 2016 Datacenter in Core edition is the index 3.

So, in InstallFrom node, I add the following metadata:

  • Key: /IMAGE/INDEX
  • Value: 3

Next navigate to ProductKey node (in UserData) and specify a product key.

In UserData node, set AcceptEula to true and provide FullName and Organization name.

Next add amd64_Microsoft-Windows-Shell-Setup (documentation here) to specialize and oobeSystem section.

In Specialize section, specify the timezone and the computer name. You can find here the allowed timezone format.

Move to oobeSystem section. In UserAccounts | AdministratorPassword node, specify an Administrator password as below

In the above screenshot, I configure an Auto Logon that will run 5 times. I make this configuration because later, I’ll run a PowerShell script with some reboots. We will see that in the next section.

In FirstLogonCommands, I add a SynchronousCommand. I specify the script that will customize my operating system. This cmd script calls a PowerShell script. We will see that in the next section.

Next add amd64_Microsoft-Windows-TerminalServices-LocalSessionManager (documentation here). I set fDenyTSConnections to false to enable the RDP connection.

Once you have finished to edit the answer file, you can save it on USB stick. You must name it autounattend.xml.

Post deployment scripts

In the USB Stick, I create a folder called Deploy. In this folder I have also created a folder called Binaries and Agent. In binaries, I have copied the drivers (as Dell, Mellanox and so on). In Deploy folder I have the following script:

  • ConfigureOS.cmd
  • Autodeploy.ps1
  • NodeConfiguration.xml

ConfigureOS.cmd

This script creates c:\temp\Deploy folder and copy the content of Deploy from USB stick to c:\temp\Deploy. Then the script AutoDeploy.ps1 is run.

mkdir c:\temp\Deploy
xcopy D:\Deploy\* C:\temp\Deploy /H /F /E
PowerShell -file c:\temp\deploy\AutoDeploy.ps1

NodeConfiguration.xml

This XML file contains network configurations (IP Address, netmask, Active Directory and so on). This XML is called in AutoDeploy.ps1.

<?xml version="1.0" encoding="UTF-8" />
<NodeConfiguration>
    <Network vSwitchName="SW-1G">
        <Management name="MGMT-22" ipaddr="10.138.22.12" netmask="24" gateway="10.138.22.1" dns="10.139.16.15,10.138.23.15" type="Untagged" vlanid=""/>
        <Cluster name="Cluster-100" ipaddr="192.168.100.12" netmask="24" type="Access" vlanid="100"/>
    </Network>
    <ActiveDirectory name="homecloud.net" />
</NodeConfiguration>

AutoDeploy.ps1

The AutoDeploy.ps1 script install drivers, features, agent, configure networks, MPIO and join Active Directory. A scheduled task is created to run the script after each reboot. The script knows where it is after each reboot thanks to step file. The script reads the step file and regarding the value, it runs a part of the script.


# Variables
$DeployPkg = "C:\temp\Deploy"
$ScriptDir = Split-Path $script:MyInvocation.MyCommand.Path
$StepFile  = $($DeployPkg + "\step.cfg")
$DellPkg   = $DeployPkg + "\Binaries\Dell\suu.cmd"
$XMLPath   = $DeployPkg + "\NodeConfiguration.xml"

if ((Test-Path $XMLPath) -like $False){
    Write-Host "Can't find the XML file located to $XMLPath. Exiting" -ForegroundColor Red
    Exit
}

# Get XML content
$XML = Get-Content $XMLPath

Write-Host "The AutoDeploy script is located in $ScriptDir" -ForegroundColor Green
Write-Host "The step file is $StepFile" -ForegroundColor Green

#### INITIALIZATION OF STEP FILE ####
if ((Test-Path $StepFile) -like $False){
    Write-Host "The step file doesn't exist. Creating it with 0 value" -ForegroundColor Green
    Set-Content -LiteralPath $StepFile -Value 0
}

# Get Step
$Step = Get-Content $StepFile
Write-Host "Current Step: 0. Deploying Dell Drivers and firmware" -ForegroundColor Green

#### DELL DRIVERS INSTALLATION R630 + FIRMWARE ####

if ($Step -like 0){

    # Set a schedule task to run this script on each OS start
    $action = New-ScheduledTaskAction -Execute 'Powershell.exe' -Argument '-command "& C:\temp\Deploy\Autodeploy.ps1"'
    $trigger =  New-ScheduledTaskTrigger -Atlogon
    Register-ScheduledTask -Action $action -Trigger $trigger -TaskName "AutoDeploy" -Description "Server Deployment"

    # Test if dell drivers are found
    if ((Test-Path $DellPkg) -like $False){
        Write-Host "Can't find Dell package. Please update the variable DellPkg. Exiting." -ForegroundColor Red
        Exit
    }

     #Change the Power schema to high performance
    Write-Host "Change power schema to high performance" -ForegroundColor Green
    POWERCFG.EXE /S SCHEME_MIN
    
    #Change the value of step file
    Set-Content -LiteralPath $StepFile -Value 1
    
    # Driver installation
    cmd /c "$DellPkg -e"
    Restart-Computer
}

#### ROLE AND FEATURE INSTALLATION ####
if ($Step -like 1){
    Write-Host "Installing the current Windows Roles and Features:" -ForegroundColor Green
    Write-Host "           - Hyper-V + PowerShell cmdlets" -ForegroundColor Blue
    Write-Host "           - Failover Clustering + PowerShell cmdlets" -ForegroundColor Blue
    Write-Host "           - MPIO" -ForegroundColor Blue
    Write-Host "           - Active Directory PowerSHell cmdlets" -ForegroundColor Blue
    Install-WindowsFeature Hyper-V, Failover-Clustering, MultiPath-IO, RSAT-CLustering-Powershell, Hyper-V-PowerShell, RSAT-AD-PowerShell
    Set-Content -LiteralPath $StepFile -Value 2
    Restart-Computer -Force
}

#### NETWORK CONFIGURATION, MPIO AND AD ####
if ($Step -like 2){

    $SwitchName  = $XML.NodeConfiguration.Network.vSwitchName

    $MGMTNicName  = $XML.NodeConfiguration.Network.Management.Name
    $MGMTNicIP    = $XML.NodeConfiguration.Network.Management.ipaddr
    $MGMTNicMask  = $XML.NodeConfiguration.Network.Management.netmask
    $MGMTNicGW    = $XML.NodeConfiguration.Network.Management.gateway
    $MGMTNicDNS   = $XML.NodeConfiguration.Network.Management.dns
    $MGMTNicvType = $XML.NodeConfiguration.Network.Management.type
    $MGMTNicVlan  = $XML.NodeConfiguration.Network.Management.vlanid

    $ClusNicName  = $XML.NodeConfiguration.Network.Cluster.Name
    $ClusNicIP    = $XML.NodeConfiguration.Network.Cluster.ipaddr
    $ClusNicMask  = $XML.NodeConfiguration.Network.Cluster.netmask
    $ClusNicvType = $XML.NodeConfiguration.Network.Cluster.type
    $ClusNicVlan  = $XML.NodeConfiguration.Network.Cluster.vlanid

    # Creating vSwitch (SET)
    Write-Host "Creating Switch Embedded Teaming (name: $SwitchName) vSwitch with all physical NIC" -ForegroundColor Green
    New-VMSwitch -Name $SwitchName -NetAdapterName NIC1, NIC2, NIC3, NIC4 -EnableEmbeddedTeaming $True -AllowManagementOS $False > $Null

    # Creating vNIC Management
    Write-Host "Creating Management NIC (NIC name: $MGMTNicName)" -ForegroundColor Green
    Add-VMNetworkAdapter -SwitchName $SwitchName -ManagementOS -Name $MGMTNicName
    
    if ($MGMTNicvType -like "Untagged"){
        Write-Host "Configure vNIC $MGMTNicName to untagged" -ForegroundColor Green
        Set-VMNetworkAdapterVLAN -ManagementOS -VMNetworkAdapterName $MGMTNicName -Untagged
    }
    Elseif ($ClusNicvType -like "Access"){
        Write-Host "Configure vNIC $MGMTNicName to tagged (VID: $MGMTNicVlan)" -ForegroundColor Green
        Set-VMNetworkAdapterVLAN -ManagementOS -VMNetworkAdapterName $MGMTNicName -Access -VlanId $MGMTNicVlan
    }

    # Creating vNIC Cluster (Hearbeat + Live-Migration)
    Write-Host "Creating Cluster NIC (NIC name: $ClusNicName)" -ForegroundColor Green
    Add-VMNetworkAdapter -SwitchName $SwitchName -ManagementOS -Name $ClusNicName
    Write-Host "Tagging the $ClusNicName NIC" -ForegroundColor Green
    if ($ClusNicvType -like "Untagged"){
        Write-Host "Configure vNIC $ClusNicName to untagged" -ForegroundColor Green
        Set-VMNetworkAdapterVLAN -ManagementOS -VMNetworkAdapterName $ClusNicName -Untagged
    }
    Elseif ($ClusNicvType -like "Access"){
        Write-Host "Configure vNIC $ClusNicName to tagged (VID: $ClusNicVlan)" -ForegroundColor Green
        Set-VMNetworkAdapterVLAN -ManagementOS -VMNetworkAdapterName $ClusNicName -Access -VlanId $ClusNicVlan
    }

    # Disable VMQ because 1GB NIC
    Write-Host "Disabling VMQ on all NICs" -ForegroundColor Green
    Disable-NetAdapterVMQ -Name *

    # Enable Jumbo Frame on all NICs
    Write-Host "Enabling JumboFrame on all vNICs" -ForegroundColor Green
    Get-NetAdapterAdvancedProperty -Name * -RegistryKeyword "*jumbopacket" | Set-NetAdapterAdvancedProperty -RegistryValue 9014

    # Set IP addresses
    Write-Host "Set IP Address on vNICs $MGMTNicName ($MGMTNicIP/$MGMTNicMask, GW: $MGMTNicGW)" -ForegroundColor Green
    New-NetIPAddress -InterfaceAlias "vEthernet ($MGMTNicName)" -IPAddress $MGMTNicIP -PrefixLength $MGMTNicMask -Type Unicast -DefaultGateway $MGMTNicGW | Out-Null
    
    Write-Host "Set DNS on $MGMTNicName (DNS: $MGMTNicDNS)" -ForegroundColor Green
    Set-DnsClientServerAddress -InterfaceAlias "vEthernet ($MGMTNicName)" -ServerAddresses $MGMTNicDNS | Out-Null
    
    Write-Host "Set IP Address on vNICs $ClusNicName ($ClusNicIP/$ClusNicMask)" -ForegroundColor Green
    New-NetIPAddress -InterfaceAlias "vEthernet ($ClusNicName)" -IPAddress $ClusNicIP -PrefixLength $ClusNicMask -Type Unicast | Out-Null
 
    #Disable DNS registration of Storage and Cluster network adapter 
    Write-Host "Disabling register in DNS for $ClusNicName" -ForegroundColor Green
    Set-DNSClient -InterfaceAlias *$ClusNicName* -RegisterThisConnectionsAddress $False

#### CONFIGURE MPIO ####
    Write-Host "Activate SAS claim for MPIO" -ForegroundColor Green
    Enable-MSDSMAutomaticClaim -BusType SAS

#### ADD TO DOMAIN ####

    Write-Host "Add computer to the domain $($XML.NodeConfiguration.ActiveDirectory.name)" -ForegroundColor Green
    New-MSDSMSupportedHW -allApplicable
    $Credential = Get-Credential -Message "Credential for $($XML.NodeConfiguration.ActiveDirectory.name)"
    Add-Computer -DomainName $($XML.NodeConfiguration.ActiveDirectory.name) -Credential $Credential
    Set-Content -LiteralPath $StepFile -Value 3
    Restart-Computer
}

#### INSTALLATION AGENT ####
if ($Step -like 3) {

    # Add here the Agent installation
    ################################
    Set-Content -LiteralPath $StepFile -Value 4
    Restart-Computer
}

#### REMOVE AUTOLOGON , CHANGE ADMIN PWD ####
if ($Step -like 4){

    Write-Host "Delete automatic run script at startup" -ForegroundColor Green
    Unregister-ScheduledTask AutoDeploy

    Restart-Computer
}


Conclusion

This topic shows you an example of how we can automate the Hyper-V host’s deployment with free tools. If you have not System Center, you can use this method. With automation, you can get a consistent deployment more easily than manual deployment.

The post Deploy Hyper-V from USB stick with unattended file appeared first on Tech-Coffee.

]]>
//www.tech-coffee.net/deploy-hyper-v-from-usb-stick-with-unattended-file/feed/ 0 5242
Specialize Windows Server Hyper-V guest OS automatically //www.tech-coffee.net/specialize-windows-server-hyper-v-guest-os-automatically/ //www.tech-coffee.net/specialize-windows-server-hyper-v-guest-os-automatically/#respond Tue, 07 Feb 2017 10:15:31 +0000 //www.tech-coffee.net/?p=5071 If you have not SC Virtual Machine Manager, you have no access to VM Template to deploy standard virtual machines. But SC Virtual Machine Manager leverages existing mechanisms to deploy and specialize Windows Server such as unattend file, custom scripts or PowerShell. The specialization of the operating system enables to configure the license key, the ...

The post Specialize Windows Server Hyper-V guest OS automatically appeared first on Tech-Coffee.

]]>
If you have not SC Virtual Machine Manager, you have no access to VM Template to deploy standard virtual machines. But SC Virtual Machine Manager leverages existing mechanisms to deploy and specialize Windows Server such as unattend file, custom scripts or PowerShell. The specialization of the operating system enables to configure the license key, the computer name, the IP address, the keyboard layout and so on. With a good OS specialization, you can deploy your VM in one click and when it is finished, you just have to deploy your application.

Once the VM is deployed and ready, you can also deploy automatically application with features such as PowerShell DSC. But this is not covered by this topic.

Last year I have written a topic on Starwind to create VMs from PowerShell. That enables to automate the creation process without using a GUI, either from Virtual Machine Manager or Hyper-V Manager. But a VM deployment is not finished when the VM is created but when the application is deployed. Before deploying the application, the OS must also be installed and specialized. This topic shows you the method I use to deploy and specialize a VM without a single click.

You can read the complete topic by following this link.

The post Specialize Windows Server Hyper-V guest OS automatically appeared first on Tech-Coffee.

]]>
//www.tech-coffee.net/specialize-windows-server-hyper-v-guest-os-automatically/feed/ 0 5071
Restore a Hyper-V 2016 VM with Veeam instant VM recovery //www.tech-coffee.net/restore-a-hyper-v-2016-vm-with-veeam-instant-vm-recovery/ //www.tech-coffee.net/restore-a-hyper-v-2016-vm-with-veeam-instant-vm-recovery/#comments Mon, 16 Jan 2017 10:44:53 +0000 //www.tech-coffee.net/?p=5008 Instant VM Recovery is a Veeam feature that enable to recover immediately a virtual machine. This feature enables to run the virtual machine from the backup repositories. When you have checked that the VM is running from a backup, you can migrate the VM in the production storage volume. Thanks to this powerful feature, the ...

The post Restore a Hyper-V 2016 VM with Veeam instant VM recovery appeared first on Tech-Coffee.

]]>
Instant VM Recovery is a Veeam feature that enable to recover immediately a virtual machine. This feature enables to run the virtual machine from the backup repositories. When you have checked that the VM is running from a backup, you can migrate the VM in the production storage volume.

Thanks to this powerful feature, the RTO is small. Moreover, you can restore quickly your data from recovery points. Before restoring the VM in production, you can verify the integrity of your data. It’s useful against ransomware. In this topic, we will see how to perform an instant VM Recovery. This feature is available from the Standard edition to Enterprise Plus.

Architecture overview

For this topic, I use a 2-node Hyper-V cluster based on Windows Server 2016. The storage is managed my Storage Spaces Direct. I have created two virtual disks called CSV-01 and CSV-02. Each node manages a CSV. I have also deployed a VM called VMBCK01 where I have installed Veeam Backup & Replication 9.5. I have created a share folder in the NAS and I have connected it with Veeam by using SMB protocol.

To write this topic, I have protected with Veeam a VM called VMCTN01 (my container lab). To create a Veeam backup, you can read this topic.

Run the VM from backup repository with Instant VM recovery

To run an instance VM recovery from Veeam, navigate to Virtual Machines, then choose the VM and right click on it. Select Restore and Instant VM recovery.

In the first screen, you should see the VM that you want to restore. You can add other VMs or choose another recovery point.

As you can see below, I can restore my VM from older recovery points.

Next, you can choose if you want to restore the initial VM or if you want change some settings. For this topic, I choose Restore to the original location.

Then you can specify a reason for your recovery. I’m sure you can specify something more useful than my reason :).

Veeam checks if the VM already exists in the virtual infrastructure. If Veeam sees the VM, it informs you that the object exists and it will be deleted.

In summary screen, you can choose to power on the VM after the recovery. Once you have reviewed your settings, you can click on finish to run the instant VM recovery process.

When Veeam says Waiting for user action, you can connect to the VM. In the below screenshot, I have clicked on Open console and I have specified my credentials. From this moment, you can connect to your VM to check if the services work well or if you have recovered your data. Users can connect to the VM as before recovery.

Migrate data to production storage volume

Now you may want to migrate the VM in the production storage volume. While the migration occurs, you still have access to your VM. But it’s useful to recover your VM in production storage volume for maintenance and performance. To migrate the VM to production, navigate to Backup & Replication, and open Instant Recovery. Right click on your VM and select Migrate to production.

Once you have run the migration process, the recovery process continues. The VM data are copied in the production storage volume and will be added to the cluster automatically.

When the recovery process is finished, you can see your VM in the cluster. The VM is running and the service works well.

Conclusion

Veeam provides powerful features with Backup & Replication product. With instant VM recovery, you can restart your service in 2mn. Ok, it is in degraded state, but your service is up! What I love in Veeam software is the ease of the tool. The graphical interface is really good and even if you don’t know Veeam, you can start quickly.

The post Restore a Hyper-V 2016 VM with Veeam instant VM recovery appeared first on Tech-Coffee.

]]>
//www.tech-coffee.net/restore-a-hyper-v-2016-vm-with-veeam-instant-vm-recovery/feed/ 3 5008
Quick start with Veeam Backup & Replication 9.5 //www.tech-coffee.net/quick-start-with-veeam-backup-replication-9-5/ //www.tech-coffee.net/quick-start-with-veeam-backup-replication-9-5/#respond Mon, 12 Dec 2016 16:20:33 +0000 //www.tech-coffee.net/?p=4916 Veeam Backup & Replication 9.5 has been released last month and supports Windows Server 2016. Veeam Backup & Replication is mainly a backup solution for virtual machines hosted on VMware or Hyper-V infrastructure. In this topic, I’ll focus on Hyper-V (and VMM). Veeam works at the host level to backup VM. That means that an ...

The post Quick start with Veeam Backup & Replication 9.5 appeared first on Tech-Coffee.

]]>
Veeam Backup & Replication 9.5 has been released last month and supports Windows Server 2016. Veeam Backup & Replication is mainly a backup solution for virtual machines hosted on VMware or Hyper-V infrastructure. In this topic, I’ll focus on Hyper-V (and VMM).

Veeam works at the host level to backup VM. That means that an agent must be installed in each hypervisor but no agent is installed inside the VM. Even if there is no agent in the VM, Veeam is able to backup Active Directory or SQL Server workloads.

For this topic, I’ll backup the workloads on a Synology NAS (RS815). This backup will be in a share SMB3.

Backup infrastructure overview

To make this topic, I have deployed the following infrastructure:

  • 2x Hyper-V hosts in hyperconverged cluster (Storage Spaces Direct)
  • 1x VM called VMBCK01 which host Veeam
  • 1x Synology NAS RS815 to store backups

My Hyper-V cluster hosts several VM such as Domain Controllers, SQL Servers (AlwaysOn Availability Group), System Center, PKI and so on. In this topic, I’ll will create a backup job for Domain Controllers.

Add Hyper-V hosts to Veeam

Install VMM agent

Because I will discover Hyper-V hosts across VMM, I have to install the VMM console on the Veeam server. So I run the VMM wizard to install the VMM console as below.

Discover Hyper-V hosts

Once the VMM console is installed, we can discover Hyper-V hosts across VMM. This configuration is not recommended in large environment. VMM can slow down the Veeam interface when they are hundred hosts and thousand VM. In large infrastructure, it is recommended to connect Veeam directly to the Hyper-V clusters. To add either standalone Hyper-V, cluster or VMM server, navigate to Virtual Machines and right click on Microsoft Hyper-V. Next select Add server.

In the next screen, specify the IP or the DNS of the VMM instance (or the standalone Hyper-V or the Hyper-V cluster).

Next choose the type of the server. Is this example, this is a Microsoft System Center Virtual Machine Manager.

Then specify a credential that has right in VMM.

In the next screen, you should have the Hyper-V host that you have added in VMM.

Once you have clicked on next, the agent is deployed on Hyper-V hosts.

Once the agents are installed and the refresh done, you can retrieve the same hierarchy than VMM and the hosted virtual machines.

To compare, you can see that the hierarchies are the same in VMM than in Veeam.

Add a backup repository

Create the share in the Synology NAS

Before adding the backup repository in Veeam, I create a share in the Synology NAS. I call it HomeCloud-Backup and I hide this share.

Then I have created a user called Veeam which has full permission on HomeCloud-Backup share.

Add backup repository in Veeam

Once the share is created, I add the backup repository in Veeam. Navigate to Backup Infrastructure and right click on Backup Repositories. Then select Add Backup Repository.

Give a name to your backup repository and click on next.

Then choose the type of the backup repository. In this example, choose Shared folder.

Next, specify the shared folder and the credentials that ave access in read/write in the share.

If the settings that you have specified previously are good, the wizard should show you the free space in the storage device. Then you can set the maximum concurrent tasks and limite the bandwidth. You can set advanced settings by clicking on Advanced.

Then you can enable or disable the vPower NFS. This feature is not useful in Hyper-V environment.

To finish, review the summary and click on next to create the repository.

Create the first backup job

To create a backup job, navigate to Backup & Replication and click on Backup Job.

In the first screen, give a name to your backup job. In this backup job, I’ll backup two domain controllers.

Then, choose the VM that will be in this backup job. To add VM, click on Add and select them.

Choose the backup repository where will be located the backup files. In this example, I choose the NAS.

I enable the application-aware processing because I backup an Active Directory. Choose this option also for SQL Server to truncate logs. I use also Guest OS credentials which have administrator right in the VM.

Then, set the schedule of the backup job and click on next.

To finish, review the backup job summary and if all settings are good, click on finish to create the job.

Below, you can find information of the first full backup of both virtual machines.

As you can see below, Veeam 9.5 leverages the new Hyper-V backup capability which use Resilient Change Tracking. This is why some mrt and rct file are created in the VM folder.

Conclusion

Veeam Backup & Replication 9.5 is a great tool to backup your infrastructure. Veeam has a user-friendly interface and it is easy to understand how to add a backup repository or how to create a backup job. This quick start has shown you how to create a first backup job from scratch. There are three main steps to make your first backup: add the Hyper-V hosts to Veeam, add a backup repository and create the backup job. Veeam 9.5 leverages new Windows Server 2016 such as Hyper-V Resilient Change Tracking or PowerShell direct.

The post Quick start with Veeam Backup & Replication 9.5 appeared first on Tech-Coffee.

]]>
//www.tech-coffee.net/quick-start-with-veeam-backup-replication-9-5/feed/ 0 4916
How to deploy a converged network with Windows Server 2016 //www.tech-coffee.net/how-to-deploy-a-converged-network-with-windows-server-2016/ //www.tech-coffee.net/how-to-deploy-a-converged-network-with-windows-server-2016/#comments Mon, 05 Sep 2016 13:10:54 +0000 //www.tech-coffee.net/?p=4771 If you read the news regularly, you probably have heard something about converged network. This is a model where the same network adapters are used to handle several kinds of traffics such as storage, live-migration, virtual machine networks and so on. This design brings flexibility, simplicity and is cost effective. First of all, this design ...

The post How to deploy a converged network with Windows Server 2016 appeared first on Tech-Coffee.

]]>
If you read the news regularly, you probably have heard something about converged network. This is a model where the same network adapters are used to handle several kinds of traffics such as storage, live-migration, virtual machine networks and so on. This design brings flexibility, simplicity and is cost effective.

First of all, this design is flexible because you can add and remove networks easily. Let’s assume that you need to connect your virtual machines to a new network. To make the new configuration you just have to set the switch to add the right VLAN ID (VID) and reconfigure the VM with the right VID. It is easier than add a new network adapter and move the VM to a new virtual switch and this is why I said that network convergence brings simplicity.

Because you don’t need to buy a lot of network adapters, this design is also cost effective. With Windows Server 2016, we are able to converge almost everything, especially SMB traffics. So you can buy two network adapters faster than 10GB/s and converged all your traffics. Thanks to this design, you can have only three network cables plugged into each server (one for the Baseboard Management Controller and two for the networks). Can you imagine the simplicity of your cable management in your datacenter?

Converged Network overview

To understand the network convergence, it is important to apprehend some network technologies. To deploy this kind of design, you need to understand the difference between an Access mode and a Trunk mode.

When you plug a standard server (I mean not a hypervisor) to a switch, this server doesn’t need to manage several VLAN. This server belongs to a specific VLAN and I don’t want that it can communicate in another VLAN. From switch perspective, you have to configure the related switch port to Access mode with a single VID.

On the other hand, some hardware need to communicate in several VLAN. The first example is the link between two switches. The second example is the hypervisor. When you deploy a hypervisor, it must communicate with several networks such as heartbeat, live-migration, management, storage and so on. From switch perspective, you have to configure the related port in Trunk mode.

Network convergence is based on switch ports configured to trunk mode. Each switch port connected to the hypervisor is set to trunk mode and with the required VLAN. Then all the configuration is done from the operating system. So let’s assume you need 20 hypervisors with two 25GB/s Network Interface Controllers (NICs) each. All you need is two dedicated switches with 24 ports at least and configure all switch ports in trunk mode. Then you just have to plug the servers and to configure the operating systems.

From the operating system perspective, Windows Server 2016 brings Switch Embedded Teaming (SET) which enables to converge almost everything. Before Windows Server 2016, you had to create a teaming and then create the virtual switches bound to the teaming virtual NIC. Some features were not supported in the parent partition as RDMA, vRSS and so on. So it was difficult to converge every networks. Now with SET, the teaming is managed inside the virtual switch and more features are supported especially vRSS and RDMA.

Once the SET is created, you just have to create virtual NICs in order to the hypervisor can communicate with the required networks (such as storage, live-migration, management and so on).

Design of the example

To explain you with more details the converged network, I’ll make a deployment example. Please find below the required network configuration:

  • Management network (VID 10) – Native VLAN (1x vNIC)
  • Live-Migration network: (VID 11) – require RDMA (1x vNIC)
  • Storage network (VID 12) – Require RDMA (2x vNIC)
  • Heartbeat network (VID 13) – (1x vNIC)
  • VM Network 1 (VID 100)
  • VM Network 2 (VID 101)

The Storage and live-migrations NICs are used for SMB Direct traffics.

The server where I make the example has a Mellanox ConnectX-3 Pro network adapter with two controllers.

Deploy a converged network

Create the virtual switch

First of all, I run a Get-NetworkAdapter to get the network adapters that I want to add to the Switch Embedded Teaming:

Then I create a Switch Embedded Teaming with these both network adapters:

New-VMSwitch -Name CNSwitch -AllowManagementOS $True -NetAdapterName CNA01,CNA02 -EnableEmbeddedTeaming $True

Now I gather virtual switch information with Get-VMSwitch cmdlet to verify that my network adapters are bound to this vSwitch:

Create virtual NICs

Next I create the virtual NICs for management, live-migration, storage and heartbeat. To create vNICs, I use the cmdlet add-VMNetworkAdapter with -ManagementOS parameter. If you don’t use -ManagementOS, you create a vNIC for a virtual machine.

I verify that my vNICs are created:

Now that we have created the vNICs, we have to associate them to the right VLAN ID. To make this configuration, I run the Set-VMNetworkAdapterVLAN cmdlet. I configure the vNIC in access mode in order to they tag packets:

$Nic = Get-VMNetworkAdapter -Name Live-Migration-11 -ManagementOS
Set-VMNetworkAdapterVlan -VMNetworkAdapter $Nic -Access -VlanId 11

$Nic = Get-VMNetworkAdapter -Name Storage01-12 -ManagementOS
Set-VMNetworkAdapterVlan -VMNetworkAdapter $Nic -Access -VlanId 12

$Nic = Get-VMNetworkAdapter -Name Storage02-12 -ManagementOS
Set-VMNetworkAdapterVlan -VMNetworkAdapter $Nic -Access -VlanId 12

$Nic = Get-VMNetworkAdapter -Name Heartbeat-13 -ManagementOS
Set-VMNetworkAdapterVlan -VMNetworkAdapter $Nic -Access -VlanId 13

The management vNIC requires a specific configuration because we want configure the native VLAN on this port. The native VLAN enables to send packets untagged and leave the switch make the tagging when the packet comes into the port. The switch tags the packet with the native VLAN ID. It is really useful especially for deploying your servers with PXE / DHCP. In order to vNIC leaves packet untagged, we have to use the special VID 0.

$Nic = Get-VMNetworkAdapter -Name Management-10 -ManagementOS
Set-VMNetworkAdapterVlan -VMNetworkAdapter $Nic -Access -VlanId 0

Enable RDMA

Now that vNICs are deployed, we can enable RDMA. We have seen that storage and live-migration requires this feature. To enable RDMA on vNICs Storage01-12, Storage02,12 and Live-Migration-11, you can run the following cmdlets:

Get-NetAdapterRDMA -Name *Storage* | Enable-NetAdapterRDMA
Get-NetAdapterRDMA -Name *Live-Migration* | Enable-NetAdapterRDMA

Then I verify if the feature is enabled:

Deal with QoS

Because storage and live-migration are converged with the other traffics, we need to give the priority over the others. If you are using a RoCE (RDMA over Converged Ethernet), you can run the following script (taken from Microsoft):

# Turn on DCB
Install-WindowsFeature Data-Center-Bridging

# Set a policy for SMB-Direct
New-NetQosPolicy "SMB" -NetDirectPortMatchCondition 445 -PriorityValue8021Action 3

# Turn on Flow Control for SMB
Enable-NetQosFlowControl -Priority 3

# Make sure flow control is off for other traffic
Disable-NetQosFlowControl -Priority 0,1,2,4,5,6,7

# Apply policy to the target adapters
Enable-NetAdapterQos -InterfaceAlias "CNA01"
Enable-NetAdapterQos -InterfaceAlias "CNA02"


# Give SMB Direct 50% of the bandwidth minimum
New-NetQosTrafficClass "SMB" -Priority 3 -BandwidthPercentage 50 -Algorithm ETS

Priority Flow Control (PFC), must also be configured in switches. With this script, the SMB traffic has 50% of the bandwidth at least and the other traffic will share the remaining 50%.

Set affinity between a vNIC and a physical NIC

In this example, I have deployed two vNICs dedicated for storage. Because these vNICs are bound to a SET, I am not sure that the storage traffic will be well spread across the two physical NICs. So I create an affinity rule between vNIC and physical NIC. While the physical NIC is online, the associated vNIC will use this specific physical NIC:

Set-VMNetworkAdapterTeamMapping –VMNetworkAdapterName Storage01-12 –ManagementOS –PhysicalNetAdapterName CNA01
Set-VMNetworkAdapterTeamMapping –VMNetworkAdapterName Storage02-12 –ManagementOS –PhysicalNetAdapterName CNA02

If CNA01 fails, the Storage01-12 vNICs will be bound to CNA02 physical NIC. When the CNA01 will be online again, the Storage01-12 vNIC will be reassociated to CNA01.

Configure the IP addresses

Now you can configure the IP Addresses for each vNICs:

New-NetIPAddress -InterfaceAlias "vEthernet (Management-10)" -IPAddress 10.10.0.5 -PrefixLength 24 -Type Unicast
Set-DnsClientServerAddress -InterfaceAlias "vEthernet (Management-10)" -ServerAddresses 10.10.0.20

New-NetIPAddress -InterfaceAlias "vEthernet (Live-Migration-11)" -IPAddress 10.10.11.5 -PrefixLength 24 -Type Unicast
New-NetIPAddress -InterfaceAlias "vEthernet (Storage01-12)" -IPAddress 10.10.12.5 -PrefixLength 24 -Type Unicast
New-NetIPAddress -InterfaceAlias "vEthernet (Storage02-12)" -IPAddress 10.10.12.6 -PrefixLength 24 -Type Unicast
New-NetIPAddress -InterfaceAlias "vEthernet (Heartbeat-13)" -IPAddress 10.10.13.5 -PrefixLength 24 -Type Unicast

The both storage adapter IP addresses belong to the same network. Since Windows Server 2016 we can add two SMB NICs to the same network. It is possible thanks to Simplified SMB MultiChannel feature.

Connect virtual machines

Now that your Hyper-V is configured, you can create a VM and connect it to the virtual switch. All you have to do is to configure the VID and the vSwitch.

Conclusion

With Windows Server 2016, the network convergence is easier to deploy than with Windows Server 2012R2. Network convergence brings you, flexibility, simplicity, a better cable management and quick deployment. Because you need less network adapters, this design reduces the cost of the solution. As we have seen with this example, the network convergence is easy to deploy and can be fully automated with PowerShell. If you have Virtual Machine Manager, you can also make this kind of configuration from the VMM console.

The post How to deploy a converged network with Windows Server 2016 appeared first on Tech-Coffee.

]]>
//www.tech-coffee.net/how-to-deploy-a-converged-network-with-windows-server-2016/feed/ 33 4771
Shared virtual hard disks in Hyper-V 2016 //www.tech-coffee.net/shared-virtual-hard-disks-in-hyper-v-2016/ //www.tech-coffee.net/shared-virtual-hard-disks-in-hyper-v-2016/#comments Mon, 01 Aug 2016 12:52:00 +0000 //www.tech-coffee.net/?p=4703 Microsoft brings a new feature to Hyper-V in Windows Server 2016 called VHD Set. This type of disk enables to share virtual hard disks between several servers to implement guest cluster. In this topic we will see why using VHD Set, and how to implement it. Why using VHD Set instead of shared VHDX As ...

The post Shared virtual hard disks in Hyper-V 2016 appeared first on Tech-Coffee.

]]>
Microsoft brings a new feature to Hyper-V in Windows Server 2016 called VHD Set. This type of disk enables to share virtual hard disks between several servers to implement guest cluster. In this topic we will see why using VHD Set, and how to implement it.

Why using VHD Set instead of shared VHDX

As VHD Set, Shared VHDX enables to share a virtual hard disk between multiple virtual machines. This feature is useful to implement a guest cluster where shared disks are required (as SQL Server AlwaysOn FCI or File Servers). Shared VHDX and VHD Set are great to avoid the use of virtual HBA and virtual SAN to present a LUN to the VMs. They are also necessary if you have implemented a SMB3 based storage solution. However shared VHDX feature as some limitation:

  • Resizing and migrating a shared VHDX is not supported
  • Make a backup or a replica of a shared VHDX is not supported

The VHD Set feature has not these limitations. However, VHD Set is available only for Windows Server 2016 guest operating system. When creating a VHD Set, two files are created:

  • A .avhdx file that contains data. This file is fixed or dynamic;
  • A .vhds file that contains metadata to coordinate information between guest cluster nodes. The size of this file is almost 260KB.

Create a VHD Set

To create a VHD Set, you can use the Graphical User Interface (GUI) or PowerShell cmdlets. From the GUI, open the Hyper-V Manager, select New and then Virtual Disk. As below screenshot, select VHD Set.

Then select the type of disk (fixed or dynamic), the name, the location and the size. By using PowerShell, you can run the below cmdlet:

Below you can find the result of these last two actions:

As you can see, the “blue” VHD Set is fixed and the AVHDX file size is 40GB. The “red” one is dynamic and so AVHDX file will expend its size dynamically.

Add VHD Set to virtual machines

To try VHD Set, I have created two virtual machines called VMFLS01 & VMFLS02. Each VM will be connected to two VHD Sets:

  • Quorum: for the cluster Witness disk
  • Shared: for the data

To mount the shared disk into the VM, edit the VM properties and navigate to a SCSI controller. Then select Shared drive.

Next, specify the location of the VHDS file.

You can also mount the VHDS in VM by using PowerShell:

Add-VMHardDiskDrive -VMName VMFLS01 -Path " c:\ClusterStorage\VMStorage01\SharedDisk\VMFLS_Quorum.vhds" -SupportPersistentReservations
Add-VMHardDiskDrive -VMName VMFLS01 -Path " c:\ClusterStorage\VMStorage01\SharedDisk\VMFLS_Shared.vhds" -SupportPersistentReservations

I have repeated the same steps for the second VM. Once both VMs are connected to the VHD Set, you can start the VM.

Add-VMHardDiskDrive -VMName VMFLS02 -Path " c:\ClusterStorage\VMStorage01\SharedDisk\VMFLS_Quorum.vhds" -SupportPersistentReservations
Add-VMHardDiskDrive -VMName VMFLS02 -Path " c:\ClusterStorage\VMStorage01\SharedDisk\VMFLS_Shared.vhds" -SupportPersistentReservations

Create the guest cluster

Now that both VMs are connected to the shared disk, we can create the cluster. I run the following cmdlets to install required features on each server:

# Install Failover Clustering feature and management tools
install-windowsfeature -Name Failover-Clustering -IncludeManagementTools -ComputerName VMFLS01
install-windowsfeature -Name Failover-Clustering -IncludeManagementTools -ComputerName VMFLS02

Then I execute the following command to make online disks and initialize them:

get-disk |? OperationalStatus -Like "Offline" | Initialize-Disk

Now that disks are initialized, I create a partition on each disk. In the above example, the disk 1 is for Quorum usage and the disk 2 for data usage.

New-Volume -DiskNumber 1 -FileSystem NTFS -FriendlyName Quorum
New-Volume -DiskNumber 2 -FileSystem NTFS -FriendlyName Data

Next I run the following cmdlets to create the cluster:

# Test the nodes to check if they are compliant to be part of a cluster
Test-Cluster VMFLS01,VMFLS02
# Create the cluster
New-Cluster -Name Cluster-FS01 -Node VMFLS01,VMFLS02 -StaticAddress 10.10.0.199

# I rename Cluster Disk 1 to Quorum and Cluster Disk 2 to Data
(Get-ClusterResource |? Name -like "Cluster Disk 1").Name="Quorum"
(Get-ClusterResource |? Name -like "Cluster Disk 2").Name="Data"

# Set the Cluster Quorum to use disk Witness
Set-ClusterQuorum -DiskWitness Quorum

# Set the Data volume to Cluster Shared Volume
Get-ClusterResource -Name Data | Add-ClusterSharedVolume

Once you have finished, you should have something like this in the cluster:

Now I’m able to copy data in the volume:

I can also move the storage to another owner node:

Conclusion

Thanks to VHD Set in Windows Server 2016, I can create easily Guest Cluster without using complex technologies as NPIV, virtual HBA and virtual SAN. Moreover, the resizing, the migrating and the backup is supported when implementing shared disks with VHD Set. It is a friendly feature, so why not using it?

The post Shared virtual hard disks in Hyper-V 2016 appeared first on Tech-Coffee.

]]>
//www.tech-coffee.net/shared-virtual-hard-disks-in-hyper-v-2016/feed/ 27 4703