Virtual Machine Manager – Tech-Coffee //www.tech-coffee.net Mon, 13 Jun 2016 08:06:19 +0000 en-US hourly 1 https://wordpress.org/?v=5.2.11 65682309 Manage Switch Embedded Teaming from VMM 2016 //www.tech-coffee.net/manage-switch-embedded-teaming-from-vmm-2016/ //www.tech-coffee.net/manage-switch-embedded-teaming-from-vmm-2016/#comments Mon, 13 Jun 2016 08:06:19 +0000 //www.tech-coffee.net/?p=4658 Since System Virtual Machine Manager 2016 Technical Preview 5 with cumulative update 2, it is possible to manage Switch Embedded Teaming (SET) for non-Network Controller managed host. Before cumulative update 2, the only way to deploy teaming from VMM was to use the classical network teaming. SET brings a lot of advantages compared to classical ...

The post Manage Switch Embedded Teaming from VMM 2016 appeared first on Tech-Coffee.

]]>
Since System Virtual Machine Manager 2016 Technical Preview 5 with cumulative update 2, it is possible to manage Switch Embedded Teaming (SET) for non-Network Controller managed host. Before cumulative update 2, the only way to deploy teaming from VMM was to use the classical network teaming. SET brings a lot of advantages compared to classical network teaming as RDMA or RSS for vNIC in parent partition (for further information about SET, you can read this topic).

In this topic, I will migrate SETs created from hosts (standard switch) to SETs managed by VMM (logical switch). I will not use the new feature of VMM that enables to migrate from a standard switch to a logical switch automatically.

Lab overview

To write this topic, I have deployed a Three-Nodes Hyper-V cluster (this is a hyperconverged cluster because I use also Storage Spaces Direct on these nodes). On each node I have deployed a Switch Embedded Teaming called SW-1G. Two NICs called LAN01 and LAN02, are members of this SET. This SET manages the following networks:

  • Management-0: 10.10.0.0/24, VID 10 (Native VLAN)
  • DMZ-20: 10.10.1.0/24, VID: 20
  • Cluster-100: 10.10.100.0/24, VID 100

Logical switch creation

Since VMM 2016 TP5 Cumulative Update 2, you can select Embedded Teaming in Uplink mode when you create a logical switch. Before creating the logical switch, you have to create the logical network, port profile, IP Address Pool and so on. For further information about the network management in VMM, you can read this topic.

Then add the classifications and the virtual ports that part to the logical switch.

In Virtual Machine Manager TP5, you can now specify the vNICs that will be created on the hosts in the logical switch wizard. In this way, you have not to specify anymore the vNIC to create in each host properties. When you will apply the virtual switch to the host, the vNIC will be automatically created regarding this configuration.

Add nodes to Virtual Machine Manager

Once the virtual switch is created, you can add the Hyper-v hosts to VMM. Select a host group, and select Add Hyper-V Hosts and Cluster.

Then specify the name of each Hyper-V host and click on next. Don’t forget to add the run as service acount to local administrator of each node.

Once the nodes are added, the virtual machines are in Unsupported Cluster configuration due to network configuration.

Manage Switch Embedded Teaming from VMM

Before managing SET from VMM, I remove a NIC from the SET. Then I rename it to Old_SW-1G to avoid conflict with the logical switch name.

Then I come back to VMM and I edit the properties of a Hyper-V host. I add the logical switch called SW-1G. I specify the physical adapters that I have removed from Old_Sw-1G. As you can see below, the vNIC will be created automatically.

Once the logical switch is created, I come back to the PowerShell session of the Hyper-V host to check the VMSwitch configuration. As you can see below, the EmbeddedTeaming property is set to True.

You can repeat these steps in each Hyper-V host properties.

Change the VM’s virtual switch

Before removing the old VMSwitch, we have to change the virtual switch in each VM. Because the VMs are still in unsupported configuration in the cluster, I change the setting from the failover cluster console. For each VM and each network adapter, I change the virtual switch to SW-1G.

Next I refresh each VM in VMM console. Then the VMs are not anymore in an unsupported configuration.

Then I edit again the network adapters properties of each VM from VMM to set the right classification.

Delete the standard switch

Once the VMs are well configured, I edit the Hyper-V host properties from VMM console. Then I remove the Old_SW-1G standard switch.

Once the Old_SW-1G is removed, I edit again the Hyper-V host properties to add the second physical adapter to SW-1G logical switch.

In the same time, I verify the IP address of each vNIC and I associate the wanted IP address.

As you can see below, the vNIC IP addresses are well configured and the VMSwitch is composed of the two physical network adapters.

You can repeat these steps for each Hyper-V host.

Conclusion

Since VMM TP5, we are able to manage from VMM the Switch Embedded Teaming (SET). SET brings the support of features as RDMA or RSS on vNIC in the parent partition. So I recommend in Windows Server 2016 to use SET instead of classical network teaming. Now that it is supported in VMM, there is no reason to not use SET J

The post Manage Switch Embedded Teaming from VMM 2016 appeared first on Tech-Coffee.

]]>
//www.tech-coffee.net/manage-switch-embedded-teaming-from-vmm-2016/feed/ 2 4658
Protect Hyper-V VM in Microsoft Azure with Azure Site Recovery //www.tech-coffee.net/protect-hyper-v-vm-microsoft-azure-azure-site-recovery/ //www.tech-coffee.net/protect-hyper-v-vm-microsoft-azure-azure-site-recovery/#comments Tue, 16 Feb 2016 12:59:22 +0000 //www.tech-coffee.net/?p=4476 Azure Site Recovery is a Microsoft Azure feature that enables you to replicate virtual machines (VM) from one site to another and orchestrate the failover in case of disaster. It is a great tool to implement a Disaster Recovery Plan (DRP) for your Hyper-V or VMware VM or for physical machines. There are several scenarios ...

The post Protect Hyper-V VM in Microsoft Azure with Azure Site Recovery appeared first on Tech-Coffee.

]]>
Azure Site Recovery is a Microsoft Azure feature that enables you to replicate virtual machines (VM) from one site to another and orchestrate the failover in case of disaster. It is a great tool to implement a Disaster Recovery Plan (DRP) for your Hyper-V or VMware VM or for physical machines.

There are several scenarios available with Azure Site Recovery to protect your workloads. The two first regards the use of two On-Premises datacenters:

In the first scenario, you have two On-Premises sites where Hyper-V hosts and Virtual Machine Manager are deployed. Virtual Machines are replicated between both sides with Hyper-V Replica or SAN array replication. Health replication monitoring and orchestration management are located in an Azure Site Recovery vault in Microsoft Azure. On the VMware side, the InMage Scout has to be downloaded and deployed on both datacenters. Then you will be able to protect your servers.

The three others scenarios regard the use of Microsoft Azure as DRP site:

In the first scenario you have Hyper-V Hosts and Virtual Machine Manager. In this scenario an agent will be deployed on VMM server and on Hyper-V Hosts. Then Azure Site Recovery will protect VM in VMM clouds. The second scenario is the same without using of Virtual Machine Manager. An agent is deployed on Hyper-V hosts and the VMs are protected and replicated in Microsoft Azure. To finish, Azure Site Recovery supports to protect VMware VM and/or physical server in Microsoft Azure. It can also be a great way to migrate your VMware VM or your physical server to Hyper-V VM J

In this topic, I will present you the scenario where you use Microsoft Azure as DRP site and where you have deployed Hyper-V and Virtual Machine Manager On-Premises.

Common Azure Site Recovery scenario

Usually your applications leverage some other services as SQL Server for the databases or Active Directory for the authentication. These services have some built-in replication process to support the High Availability. So instead of using Azure Site Recovery to protect these services, we can use their replication process. So for the Active Directory case, we will deploy VM in Azure. These VM will execute domain controllers. It will be necessary to create an Active Directory Site for domain controllers in Azure and create a replication link to manage the weight.

On SQL Side, we will deploy VM in Azure where SQL Server will be deployed. Then an asynchronous replication will be set between SQL Server On-Prem and SQL Server in Microsoft Azure.

Then the VMs in application tier will be replicated with Azure Site Recovery. When a disaster will occur, only servers in application tier will failover to Microsoft Azure.

Requirements

To use Microsoft Azure as DRP site with Virtual Machine Manager you need:

  • Virtual Machine Manager 2012 R2 with at least Update Rollup 5
  • Hyper-V hosts under Windows Server 2012 R2
  • The protected VM must be supported in Microsoft Azure
  • A Microsoft Azure Account
  • An Azure Site Recovery vault
  • A virtual Network in the same region as the Azure Site Recovery Vault
  • A Storage Account Geo-Redundant in the same region as the Azure Site Recovery Vault

Deploy requirements in Microsoft Azure

Virtual Network configuration

I have created a virtual network in Central US called POC-ASR-Exakis.

This virtual network contains two subnets called Subnet-LAN and Subnet-DMZ.

Storage Account creation

Then I have created a Geo-Redundant storage account called pocasrexakis in Central US.

Azure Site Recovery vault creation

Next I navigate to Recovery Services to create a new vault. Then I select Site Recovery Vault and I specify ASR-Exakis as name. Then I choose Central US location.

Once the Site Recovery Vault, I choose the scenario that I want to implement. So I choose Between an on-premises VMM site and Azure.

First of all, we need to prepare VMM server. Download the registration key and the Microsoft Azure Site Recovery Provider for installation on VMM server.

On-Premises configuration

Now that the Site Recovery vault is created, we have to deploy agent in VMM server and in Hyper-V hosts.

Prepare VMM servers

Once you have downloaded the registration key and the ASR provider binaries, you should have both files in your VMM server.

Then run the AzureSiteRecoveyProvider executable. When you are in vault settings screen, specify the registration key file.

Then you have to specify a location to save a certificate. VMs protected in Azure will be encrypted. If you have to unencrypt data, this certificate will be required. So keep this certificate in several vault!

To finish, specify a friendly name for your VMM Server.

If the registration has worked, you should have your server connected to the site recovery vault as below.

VMM configuration

On VMM side, I have created a cloud called MyApps. Three VMs belong to this cloud.

If you edit the properties of a VM, you should have something as below in Microsoft Azure Site Recovery tab.

Deploy agent on Hyper-V hosts

Now that VMM is ready, we are in step 2. Download the Microsoft Azure Recovery Services agent on Hyper-V hosts and run the executable.

Specify an installation folder and a cache location. In real world, the cache location should be located in a separate disk.

Then specify the registration key file that you have downloaded on the VMM server.

Azure Site Recovery configuration

Now that On-Premises configuration is finished, we can configure Site Recovery vault to protect and replicate your VM. Then we will create a recovery plan to orchestrate the failover in case of disaster.

Map network resource

First of all, we have to bind the On-Premises networks with the Virtual Networks created in Microsoft Azure. So navigate to resources and networks as below. Without any configuration, you should have the list of your On-Premises network marked as Unmapped. To bind the On-Premises network to a Virtual Network in Microsoft Azure, select the network and click on map.

Then select the target Azure network and click on ok.

Protect virtual machines

To protect VMs, navigate to protected items and select VMM Clouds. In this view, you should all Clouds that you have created in Virtual Machine Manager. Below you can see that I have the Cloud MyApps.

When you select the Cloud, you can configure it as below. You can select the storage account, if you want encrypt stored data, the copy frequency and so on.

Once you have configured the Cloud protection, we can enable protection on VM. So just select Enable Protection.

Select the VM that you want to protect and specify the storage account.

Once the protection is enabled, the replication should start. Below you can find a screenshot of the throughput on my router and the state synchronizing on VMs.

Once the replication is finished, the status is protected.

If you click on a protected VM, you can configure its name, its size and its network when it will be failover in Microsoft Azure.

Create a recovery plan

Now that VMs are protected, we can create a recovery plan to orchestrate the failover in case of disaster. Navigate to recovery plans tab and select create recovery plan.

Give a name to your recovery plan then choose the source and the target.

Select the VMs that will be included into the recovery plan.

Then you can create groups. Each VM in a single group will be started simultaneously. You can add manual tasks or scripts between groups. To use scripts, you need an Azure Automation account. Below I have a recovery plan with three groups and a single manual task.

Test the plan

Once you have created your recovery plan, you can test it or make a real failover. When you test failover, the source VM will not be stopped and the VM will be started in Azure in a specific network to not disturb the production. When you run a real failover, you can choose unplanned failover or planned failover. With the planned failover, the source VM will be stopped and a final synchronization will be executed. To try my recovery plan, I choose Test failover.

When I click on Test Failover, Microsoft Azure asks me the network where will be connected the VMs. Then the recovery plan is executed.

After the group 1, I have added a manual task. So I have to click on complete manual action to continue.

The VMs are created in Microsoft Azure and started regarding to the recovery plan.

When the plan is finished, Microsoft Azure asks me to complete the test. When you have finished to verify that all is ok, you can click on test completed and all VMs will be deleted in Microsoft Azure (the VM only, not the VHD).

Monitor the virtual machine health

Azure Site Recovery is able to monitor the state of the VM. For example, I have stopped my Hyper-V host to apply some updates. Azure Site Recovery had detected an issue on VMs.

The post Protect Hyper-V VM in Microsoft Azure with Azure Site Recovery appeared first on Tech-Coffee.

]]>
//www.tech-coffee.net/protect-hyper-v-vm-microsoft-azure-azure-site-recovery/feed/ 2 4476
Manage Storage Space Direct from Virtual Machine Manager //www.tech-coffee.net/manage-storage-space-direct-from-virtual-machine-manager/ //www.tech-coffee.net/manage-storage-space-direct-from-virtual-machine-manager/#comments Tue, 03 Nov 2015 10:53:45 +0000 //www.tech-coffee.net/?p=4251 In a previous topic, I shown how to implement a Storage Space Direct on Windows Server 2016 TP2 (it is almost the same thing in Technical Preview 3). In this previous topic I created Storage Pool, storage space and some share from Failover Clustering console. In this topic, I’ll show you how doing the same operation ...

The post Manage Storage Space Direct from Virtual Machine Manager appeared first on Tech-Coffee.

]]>
In a previous topic, I shown how to implement a Storage Space Direct on Windows Server 2016 TP2 (it is almost the same thing in Technical Preview 3). In this previous topic I created Storage Pool, storage space and some share from Failover Clustering console. In this topic, I’ll show you how doing the same operation from Virtual Machine Manager Technical Preview 3.

Requirements

To follow this topic you need:

  • A Scale-Out File Server implementation. In this topic I use storage space direct;
  • A Virtual Machine Manager 2012R2 Update Rollup 8 installation (on my side I’m in Technical Preview 3).

Storage Space Direct implementation

To make this topic, I have deployed four virtual machines on Windows Server 2016 Technical Preview 3. These machine are in a cluster called HyperConverged.int.homecloud.net. I have installed Hyper-V and File Servers role on these servers because it is a POC for Hyper-Convergence (I’m waiting for nested Hyper-V on Windows Server J). Each virtual machine is connected to 5 disks of 40GB.

Each server is connected to four networks.

  • Cluster: cluster communication;
  • Management: AD, RDP, MMC and so on;
  • Storage: dedicated network between Hyper-V and cluster for storage workloads;
  • Live-Migration: dedicated network to migrate VM from one host to another.

The Scale-Out File Server role is deployed in the cluster. I called it VMSto. VMSto can be reachable from storage network.

To finish, I have added a vmm runas account in the Administrators group in each server.

Manage Storage Space Direct

Now I’m connecting to Virtual Machine Manager in the Fabric. I add a Storage Device (right click on Arrays, Add Storage Devices).

Next select the provider type. With Scale-Out File Server, select Windows-Based File Server.

Next type the cluster name and select the RunAs account related to the account that you have added in local Administrators group in each server.

Then the Scale-Out File Server should be discovered with 0GB capacity. It is because there is no Storage Pool created yet. Just click on next.

Then select the Scale-Out File Server to place under management and click on next.

Once the storage device is added to VMM, you can navigate to File Servers and right click on the device. Select Manage Pools.

In the next window, there is the list of storage pool. Because no storage pool is created nothing appears. So click on New to create a storage pool.

Give a name to the storage pool and select a classification.

Then select disks that will be in this storage pool.

To finish you can specify the Interleave.

Once the storage pool is created, you should see it in Storage Pools window as below.

Next run a rescan on the provider and navigate to Array. Now a pool is managed by VMM.

Moreover it has been added to the right classification.

Now, I create a file share to store my VMs. So I select create file share. I give a name to the share and I select a storage pool.

Then I specify a size for the volume, a file system, the resiliency and an allocation unit size. If you have SSD and HDD in the pool, VMM will ask you if you want to Enable Storage Tiers.

Once the share is created, a new LUN (in fact it is a Cluster Share Volume) is added under the storage pool.

In File Share view, you should have your new File Share.

Now you have just to add the share in the Hyper-V configuration as below.

Now you can deploy VMs in this share as you can see below.

Overview in Failover Clustering console

If we come back in the failover clustering console, you should retrieve the Storage Pool, CSV and share that we have created from VMM. First if you navigate to Pools, you should have a new storage pool called Bronze-Tier01.

Then in Disks, you should have a new CSV belonging to your storage pool.

To finish, if you navigate to the Scale-Out File Server role and you select share tab, you should see the new file share.

Manage using PowerShell

Create the storage Pool

You can list disks available from VMM to add them to a storage pool. For that I used Get-SCStoragePhysicalDisk cmdlet.

Then I use the below script to create a storage pool with the selected physical disk.

$storageArray = Get-SCStorageArray -Name "Clustered Windows Storage on HyperConverged"
$disksToAdd = @()
$disksToAdd += Get-SCStoragePhysicalDisk -ID "69d0702d-5de1-4ac4-82f2-224d1b47676c"
$disksToAdd += Get-SCStoragePhysicalDisk -ID "a77c70bd-96df-482c-87e2-314f288e7142"
$disksToAdd += Get-SCStoragePhysicalDisk -ID "cb94acd1-4269-4db5-bab9-42aeea1897dd"
$disksToAdd += Get-SCStoragePhysicalDisk -ID "97dd5243-7502-48cc-9302-433288a487f3"
$disksToAdd += Get-SCStoragePhysicalDisk -ID "e44d24ab-9e47-44bd-94ea-5d57f25d8d66"
$disksToAdd += Get-SCStoragePhysicalDisk -ID "c77e6d97-e7c7-4d88-abd8-72ffe468418d"
$disksToAdd += Get-SCStoragePhysicalDisk -ID "90d7408f-d7be-4aaf-b88c-7cb3c0860c2e"
$disksToAdd += Get-SCStoragePhysicalDisk -ID "5b6217ce-5eff-489c-b074-c97c64c9d1c6"
$classification = Get-SCStorageClassification -Name "Bronze"
$pool_0 = New-SCStoragePool -Name "Bronze-Tier01" -StoragePhysicalDisk $disksToAdd -StorageArray $storageArray -StorageClassification $classification

Create the file share

To create the file share in a storage pool, I use the New-SCStorageFileShare cmdlet as below.

$storageFileServer = Get-SCStorageFileServer -Name VMSto.int.HomeCloud.net
$storagePool = Get-SCStoragePool -name "Bronze-Tier01"
$storageClassification = Get-SCStorageClassification -Name "Bronze"
$storageFileShare = New-SCStorageFileShare -StorageFileServer $storageFileServer -StoragePool $storagePool -Name "Bronze01" -Description "" -SizeMB 102400 -RunAsynchronously -FileSystem "CSVFS_ReFS" -ResiliencySettingName "Mirror" -PhysicalDiskRedundancy "2" -AllocationUnitSizeKB "64" -StorageClassification $storageClassification

The post Manage Storage Space Direct from Virtual Machine Manager appeared first on Tech-Coffee.

]]>
//www.tech-coffee.net/manage-storage-space-direct-from-virtual-machine-manager/feed/ 2 4251
Rename VM’s Network Adapters automatically with Virtual Machine Manager 2016 //www.tech-coffee.net/rename-vms-network-adapters-automatically-with-virtual-machine-manager-2016/ //www.tech-coffee.net/rename-vms-network-adapters-automatically-with-virtual-machine-manager-2016/#respond Thu, 10 Sep 2015 10:23:05 +0000 //www.tech-coffee.net/?p=3812 The next version of Hyper-V comes with a new feature called Virtual Network Adapter Identification. This feature enables to specify a name when a network adapter is added to the virtual machine and to retrieve this same name inside the VM. This feature can be also managed from Virtual Machine Manager 2016 (Technical Preview 3 ...

The post Rename VM’s Network Adapters automatically with Virtual Machine Manager 2016 appeared first on Tech-Coffee.

]]>
The next version of Hyper-V comes with a new feature called Virtual Network Adapter Identification. This feature enables to specify a name when a network adapter is added to the virtual machine and to retrieve this same name inside the VM. This feature can be also managed from Virtual Machine Manager 2016 (Technical Preview 3 where I’m writing this post). This feature is really great to automate the renaming of the virtual network adapters inside VMs. In this topic I’ll show you how it is working and how to automate the renaming of the network adapters with PowerShell.

Set Virtual Network Adapter Identification from VMM TP3

When you create a virtual machine from VMM Technical Preview 3, you have a new setting in the network adapter configuration called Device Properties. You can set the adapter name as the VM Network name or you can specify your own adapter name. In the below example, I have set LAN as adapter name.

Once the VM is deployed, you can retrieve the custom adapter name by using Get-NetAdapterAdvancedProperty PowerShell cmdlet.

As you can see in the above screenshot, you can retrieve the custom adapter name in the Hyper-V Network Adapter Name property. So I make a filter on this property by using a pipe.

Then I display only the network adapter name and the custom adapter name. Now we have all the required information to use the Rename-NetAdapter cmdlet.

So I have written a PowerShell script to rename automatically the network adapter name by the Virtual Network Adapter Identification :

Foreach ($NetAdapter in Get-NetAdapter){
    $NetAdapterDisplayValue = (get-netAdapterAdvancedProperty |
                               ?{($_.DisplayName -eq "Hyper-V Network Adapter Name") `
                               -and ($_.Name -eq $NetAdapter.Name)}).DisplayValue

    Rename-NetAdapter -Name $NetAdapter.Name -NewName $NetAdapterDisplayValue 
}

When this script is executed, the network adapter name is well renamed.

Rename VM’s Network Adapters automatically during deployment

To rename the VM’s network adapter during deployment, I add the above script to the sysprep’d image. So first I mount the VHDX as below.

Then I create a folder called Scripts and I paste the script inside the folder. After that I unmount the VHDX.

Next I come back to VMM TP3 and I edit my VM template. In OS Configuration I add a GUIRunOnce command to run the RenameNetAdapter.ps1 script.

Next I deploy a new VM. I specify a custom adapter name as below.

Then I add a second network adapter called Cluster. I specify also a custom network adapter.

When the VM is deployed and when you are logged once, the RenameNetAdapter script is executed. So the network adapter should be renamed as below.

Thanks to the next version of Hyper-V and VMM, we can now automate the VM’s network adapters renaming easilyJ.

The post Rename VM’s Network Adapters automatically with Virtual Machine Manager 2016 appeared first on Tech-Coffee.

]]>
//www.tech-coffee.net/rename-vms-network-adapters-automatically-with-virtual-machine-manager-2016/feed/ 0 3812
Upgrade Virtual Machine Manager 2012 R2 in High Availability to Technical Preview 2 //www.tech-coffee.net/upgrade-virtual-machine-manager-2012-r2-in-high-availability-to-technical-preview-2/ //www.tech-coffee.net/upgrade-virtual-machine-manager-2012-r2-in-high-availability-to-technical-preview-2/#respond Sat, 15 Aug 2015 13:58:46 +0000 //www.tech-coffee.net/?p=3770 Currently the last build for the next release of Virtual Machine Manager is the Technical Preview 2 (maybe Technical Preview 3 in the end of the month). In this topic, I will explain how to upgrade Virtual Machine Manager 2012 R2 installed in high availability to the Technical Preview 2. Architecture Overview My Virtual Machine Manager ...

The post Upgrade Virtual Machine Manager 2012 R2 in High Availability to Technical Preview 2 appeared first on Tech-Coffee.

]]>
Currently the last build for the next release of Virtual Machine Manager is the Technical Preview 2 (maybe Technical Preview 3 in the end of the month). In this topic, I will explain how to upgrade Virtual Machine Manager 2012 R2 installed in high availability to the Technical Preview 2.

Architecture Overview

My Virtual Machine Manager nodes are in a failover cluster connected by two networks:

  • LAN Network (client and cluster communications)
  • Cluster Network (cluster communications)

The Virtual Machine Manager database is stored in an AlwaysOn Availability Group to support the high availability.

Migrate Windows Server 2012 R2 to Technical Preview 2

Before upgrading your servers in Technical Preview 2, please be careful because there are a lot of known issues that I have experienced.

Known issues

First, in the Technical Preview 2 of Windows Server, Windows Update is not available. So you have to download the update manually to update your system. Then when you have upgraded your system to Technical Preview 2, the network adapters are disabled. To be able to enable them, you have to remove them from Device Manager and reboot your system. When you update a system where a failover clustering was installed, you have to remove also the Virtual Ethernet Failover Adapter (from hidden devices). Otherwise, the cluster will not start.

You can have a list of important known issues here.

Upgrade the first node

To upgrade the cluster node and the cluster itself, I use a new Windows Server 2016 feature called Cluster Rolling Upgrade. For more information about this feature you can read this topic.

First, I evict the cluster node that I will upgrade from the cluster. Otherwise the upgrade wizard will not let you upgrade your system.

Next I mount the Windows Server Technical Preview 2 ISO and I run the setup. I select the image with local admin tools.

The wizard tells me that some settings will be kept during the upgrade. I click on install.

When the installation is finished, verify your network adapters. If they are disabled, you have to remove all device adapters from Device Manager (also the Virtual Ethernet Failover Adapter from hidden devices). Next reboot your machine and reconfigure your network devices. Also, verify if the cluster service is started.

Next open the Failover Cluster Manager from a Windows Server Technical Preview 2 server. Select Add Node as below.

Then specify the server name that you have upgraded.

Now you should have your both nodes in running state as below.

Now I failover the role to the server upgraded in Windows Server Technical Preview 2 to verify if the role works well on this node.

Upgrade the second node

Now I’m upgrading the second node. So I evict the other node from the cluster.

Then I mount the Windows Server Technical Preview 2 ISO on the second node and I launch setup to run the upgrade. I select an upgrade with local admin tools.

On the ready to install screen, just click on install to run the upgrade.

After the upgrade you should have the same issues that on the node 1. The network adapter should be disabled. So you have to remove all device adapters from Device Manager (also the Virtual Ethernet Failover Adapter from hidden devices). Next reboot your machine and reconfigure your network devices. Also, verify if the cluster service is started.

Next open the failover cluster manager from a Windows Server Technical Preview 2 node and select Add Node. Specify the second node and click on next.

Then select yes to run the cluster validation.

Once the node is added, you can move the vmm role to the second node to verify if Virtual Machine Manager works well on the second node.

Upgrading the cluster functional level

To finish with the cluster, the cluster functional level have to be upgraded. To upgrade it, just run Update-ClusterFunctionalLevel in an elevated PowerShell prompt.

Upgrade Virtual Machine Manager 2012 R2 to Technical Preview 2

Remove Virtual Machine Manager database from Availability Group

If the VirtualManagerDB is in an alwaysOn availability group (AAG), you have to remove it from the availability group.

Install prerequisite on both nodes

The Virtual Machine Manager Technical Preview 2 needs ADK 10. You can download it here. Next run the setup and install Deployment Tools and Windows Preinstallation Environment (Windows PE).

Upgrade the first node

Before upgrading the first node, I prefer to stop the vmm role from the cluster.

Next I run the setup of Virtual Machine Manager Technical Preview 2 on the first node. Then I select Install.

The wizard detects that a previous VMM installation exists. So first I select Remove Features.

Then I select to retain the database.

Once the features are removed, I run again the VMM installation. Then I select VMM Management Server and VMM console. The wizard detect that the node is in a cluster.

Next I specify product registration information.

Then I specify the installation location.

On prerequisites screen, check warnings and errors. If all is ok, just click on next.

Next provide database information to connect to the VirtualManagerDB. Then the wizard detects “the old” VirtualManagerDB and asks to upgrade the database.

On the next screen, provide the Domain Account password.

Next you should have an upgrade compatibility report. On my side, the SCOM connector will be removed.

Once the installation is finished you should have something as below.

Now you can switch on the second node.

Upgrade the second node

On the second node, follow the procedure as the first node. On the database configuration, the wizard will not ask you to upgrade the database because it is already upgraded. Now you can start again the vmm role from the cluster.

Add database in availability group

First edit the properties of VirtualManagerDB and navigate to options. Select the full recovery model.

Next make a full backup of the database.

To finish you can add again the VirtualManagerDB to the AlwaysOn Availability Group.

Open the Virtual Machine Manager console

Now you can open the Virtual Machine Manager Technical Preview 2 console and upgrade the agents J.

The post Upgrade Virtual Machine Manager 2012 R2 in High Availability to Technical Preview 2 appeared first on Tech-Coffee.

]]>
//www.tech-coffee.net/upgrade-virtual-machine-manager-2012-r2-in-high-availability-to-technical-preview-2/feed/ 0 3770
Manage Azure VM from Virtual Machine Manager 2012 R2 //www.tech-coffee.net/manage-azure-vm-from-virtual-machine-manager-2012-r2/ //www.tech-coffee.net/manage-azure-vm-from-virtual-machine-manager-2012-r2/#respond Tue, 14 Jul 2015 19:55:38 +0000 //www.tech-coffee.net/?p=3684 Since Update Rollup 6 of Virtual Machine Manager 2012 R2, it is possible to manage Azure VM from the VMM console. You can do simple actions as stop or start the machine, establish an RDP connection. In this topic I’ll describe how to add the Azure Subscription to manage Azure VM from Virtual Machine Manager 2012R2. ...

The post Manage Azure VM from Virtual Machine Manager 2012 R2 appeared first on Tech-Coffee.

]]>
Since Update Rollup 6 of Virtual Machine Manager 2012 R2, it is possible to manage Azure VM from the VMM console. You can do simple actions as stop or start the machine, establish an RDP connection. In this topic I’ll describe how to add the Azure Subscription to manage Azure VM from Virtual Machine Manager 2012R2.

Requirements

To follow this topic you need:

  • A working Virtual Machine Manager with at least Update Rollup 6;
  • An Azure Subscription.

Moreover Azure VM created from the Azure Resource Manager are currently not manageable from VMM.

Create and import in Azure a management certificate

Create from an enterprise PKI

First, you need to create a management certificate. You can use your enterprise Public Key Infrastructure to make a certificate. This certificate must be in the personal user store as below.

Next, export this certificate as CER.

Create from MakeCert

The other method consists of using MakeCert from visual studio to create a self-signed certificate (for further information read this topic):

makecert -sky exchange -r -n "CN=<CertificateName>" -pe -a sha1 -len 2048 -ss My "<CertificateName>.cer"

Once the certificate is generated, you can find it in your personal certificate store.

Import the management certificate in Azure

Now that your CER file is generated, you can navigate to the Azure Portal and select Settings. Click on Management certificates and choose Upload a Management Certificate.

Next, select your CER file and click on OK.

After a couple of minutes, you should see the certificate as below.

Add the Azure Subscription to Virtual Machine Manager

First you need your Subscription ID. You can use the Add-AzureAccount cmdlet as below.

Next, open your Virtual Machine Manager console and select Add Subscription as below:

Then specify a Display Name and your Subscription ID. To finish, select the certificate (you can compare the thumbprint with the CER previously imported in Azure).

After the initial synchronization (it can take few minutes), you should see your Azure VM as below.

It’s a great feature but …

Thanks to this feature you can see and manage the power of your VM. You can also connect to your Azure VM by using RDP from VMM console.

But I think this feature is not finished. For example only Azure VM created from the Azure Portal are visible from VMM console. The Azure VM created from Azure Resource Manager are not manageable from VMM. For example, below I have some resources created from an Azure Resource Manager Template (JSON file):

The Azure VM circled in red are VM created from Azure Resource Manager. If you compare the two last screenshots, you can see that VM circled in red are not manageable from VMM.

Next I think that not enough actions are possible from VMM to manage Azure VM. For example I would like to manage the size of the VM, the availability set or the VM creation. But it is not yet possibleJ.

However the Azure VM management from VMM has been released in the last Update Rollup (UR6). I trust the team responsible for VMM to improve this feature J.

The post Manage Azure VM from Virtual Machine Manager 2012 R2 appeared first on Tech-Coffee.

]]>
//www.tech-coffee.net/manage-azure-vm-from-virtual-machine-manager-2012-r2/feed/ 0 3684
Implement a Hyper-V Cluster from VMM 2012R2 //www.tech-coffee.net/implement-a-hyper-v-cluster-from-vmm-2012r2/ //www.tech-coffee.net/implement-a-hyper-v-cluster-from-vmm-2012r2/#comments Tue, 31 Mar 2015 10:41:20 +0000 //www.tech-coffee.net/?p=3322 To support the high availability of Virtual Machines, a Hyper-V Cluster is often implemented. In a high density environment, Hyper-V hosts are almost always managed from Virtual Machine Manager (VMM). VMM enables to centralize the management of your fabric (virtual network, storage and Hypervisor). So VMM is able to manage Hyper-V cluster from implementation to ...

The post Implement a Hyper-V Cluster from VMM 2012R2 appeared first on Tech-Coffee.

]]>
To support the high availability of Virtual Machines, a Hyper-V Cluster is often implemented. In a high density environment, Hyper-V hosts are almost always managed from Virtual Machine Manager (VMM). VMM enables to centralize the management of your fabric (virtual network, storage and Hypervisor). So VMM is able to manage Hyper-V cluster from implementation to management. In this topic I will implement a Hyper-V Cluster from VMM 2012R2.

“Inception” Lab

Because I have not enough servers in my lab, the Hyper-V host Hyperv03 and Hyperv04 are Virtual Machines. So I have a Hypervisor in a Hypervisor (nested hypervisor). It doesn’t change the way to implement the Hyper-V cluster. However the Network Interface Cards (NICs) are virtual. So I call them vmNICs and no NIC teaming will be created.

Hyper-V Cluster design

Each Hyper-V host needs at least four vmNICs:

  • Storage Network: it will be used to communicate with storage device by iSCSI;
  • Live-Migration Network: it will be used to migrate a VM from one host to the other;
  • Cluster Network: it will be used for cluster heartbeat;
  • Management Network: it will be used for Parent Partition communication (Active Directory, RDP etc.).

The storage device is implemented with StarWind Virtual SAN in two-node configuration (10.10.1.12 and 10.10.1.13). So each Hyper-V host will be connected to these two nodes. MPIO will manage the multi-path.

Hyper-V host installation

On each Hyper-V host I have installed Windows Server 2012R2 datacenter with the last updates. I have only installed MPIO. Hyper-V and Failover Clustering feature will be installed from VMM. Each Hyper-V host are members of my Active Directory domain.

On each Hyper-V host I have added a VMM RunAs account in the local Administrators group:

Add Hyper-V host to VMM

First of all, the Hyper-V host must be added to VMM. For that, connect to VMM and right click to a host group. Select Add Hyper-V hosts and Clusters.

Next select Windows Server computers in a trusted Active Directory Domain. I choose this option because my Hyper-V host and my VMM are in the same domain.

Then specify the RunAs account that you have added in each local Administrators group of your Hyper-V hosts.

On the next screen, specify the Hyper-V host name and click on next.

If Hyper-V role is not installed, you will have the below message. It says that VMM will enable the Hyper-V role on each server.

Next choose your host group and click on next.

When the process is finished, you should have your Hyper-V host in the host group:

NB: In the real work, it is at this moment that you have to configure Logical Switch on your Hyper-V hosts. Because I use VM for this demo, I can’t configure Logical Switch because I can’t enable Hyper-V extensible virtual switch on a virtual NICs.

Create the Hyper-V Cluster

To create a Hyper-V Cluster from VMM, navigate to the fabric, click on Create and select Hyper-V Cluster as below.

Next give a name to your Cluster and select the RunAs account.

Then select the Hyper-V hosts that will be members of your cluster.

Next specify the Static IP Pool where will be picked the cluster IP address. You can also specify manually the IP Address that belongs to this network.

Once the cluster is created, it should appear in the host group as below.

Configure Failover Clustering network

This step will be the only one that will be managed from the Failover Clustering console. In this step I will rename the cluster network, set the cluster use and specify the Live-Migration network. So connect to the failover clustering console and navigate to networks. First I rename each network to ease the management and I configure the cluster use as below.

Next right click on Networks, and select Live Migration Settings.

Then I select only the Live-Migration network and I click on OK.

Next I come back to the VMM console and I run a refresh of the cluster. When the refresh is completed, I open the properties of the cluster and I navigate to Migration Settings. As you can see below, only one live-migration network is set.

Configure Kerberos for Live-Migration authentication protocol

To enable Kerberos for Live-Migration, we have to set some Kerberos constrained delegation in Active Directory. So open dsa.msc and edit the properties of Hyper-V hosts. Then navigate to Delegation and select Trust this computer for delegation to specified services only as below. Next click on Add and specify the other Hyper-V host name. Navigate to select Microsoft Virtual System Migration Service.

Repeat the same steps for the other Hyper-V host. Then come back to Migration Settings and select Use Kerberos.

Add storage to Hyper-V Cluster

First I navigate to the fabric to create a LUN called bronze01 as below. This LUN is created on my iSCSI storage device (StarWind Virtual SAN).

Then I edit the properties of each Hyper-V host and I navigate to Storage. Next I select Add iSCSI Array as below.

I select the iSCSI array and I click on Create.

When it is done, you should have something like this in your iSCSI initiator properties of your Hyper-V hosts.

Next I navigate to the storage properties of the cluster and I add the LUN bronze01 as available storage.

I decide also to create another LUN from the above window called gold01. So at the end I have two LUNs in available storage. So I select these two LUNs and I click on convert to CSV.

And that’s it ! We have added Cluster Shared Volume to Hyper-V Cluster from VMM console.

And we have the same information from the VMM console.

Conclusion

As you have seen in this topic, I have implemented and managed a Hyper-V cluster from the VMM console. This eases the management of your fabric. Now think about the Hyper-V Bare-Metal Deployment. By using this, you can deploy the Hyper-V hosts with a standard configuration (network, OS configuration and so on) and next add your Hyper-V host to the cluster from VMM. So you can manage the scalability really quickly and easily.

The post Implement a Hyper-V Cluster from VMM 2012R2 appeared first on Tech-Coffee.

]]>
//www.tech-coffee.net/implement-a-hyper-v-cluster-from-vmm-2012r2/feed/ 2 3322
Whitepaper: Implement a highly available private cloud to host virtual machines //www.tech-coffee.net/whitepaper-implement-highly-available-private-cloud-host-virtual-machines/ //www.tech-coffee.net/whitepaper-implement-highly-available-private-cloud-host-virtual-machines/#respond Thu, 25 Dec 2014 09:43:27 +0000 //www.tech-coffee.net/?p=3023 For some time I write a whitepaper about how to implement a highly available private cloud to host virtual machines. On this day of Christmas, I have finished and published it. You can download it from this link. This whitepaper explains how to implement a Private Cloud with Windows Azure Pack in high availability from ...

The post Whitepaper: Implement a highly available private cloud to host virtual machines appeared first on Tech-Coffee.

]]>
For some time I write a whitepaper about how to implement a highly available private cloud to host virtual machines. On this day of Christmas, I have finished and published it. You can download it from this link.

This whitepaper explains how to implement a Private Cloud with Windows Azure Pack in high availability from scratch. So I talk about Scale-Out File Servers, SQL AlwaysOn, Virtual Machine Manager, Service Provider Foundation, NVGRE Gateway, RD Gateway and Windows Azure Pack.

I start this implementation just after to have deployed the Active Directory and a PKI and so almost from scratch. I hope this document will help you to implement your own private cloud.

Merry Christmas everyone 🙂

button-1

The post Whitepaper: Implement a highly available private cloud to host virtual machines appeared first on Tech-Coffee.

]]>
//www.tech-coffee.net/whitepaper-implement-highly-available-private-cloud-host-virtual-machines/feed/ 0 3023
Monitor Virtual Machine Manager from SCOM //www.tech-coffee.net/monitor-virtual-machine-manager-from-scom/ //www.tech-coffee.net/monitor-virtual-machine-manager-from-scom/#comments Wed, 17 Dec 2014 11:26:32 +0000 //www.tech-coffee.net/?p=2985 Virtual Machine Manager can be connected to Operations Manager to monitor the virtual infrastructure. Moreover VMM is able to be connected to an SQL Server Analysis Service to make forecasting analysis. In this topic I will show you how to connect VMM to Operations Manager and so monitor Virtual Machine Manager infrastructure either virtual machines, ...

The post Monitor Virtual Machine Manager from SCOM appeared first on Tech-Coffee.

]]>
Virtual Machine Manager can be connected to Operations Manager to monitor the virtual infrastructure. Moreover VMM is able to be connected to an SQL Server Analysis Service to make forecasting analysis. In this topic I will show you how to connect VMM to Operations Manager and so monitor Virtual Machine Manager infrastructure either virtual machines, Hyper-V hosts or fabric.

Requirements

  • An operational System Center Virtual Machine Manager up to date;
  • An operational System Center Operations Manager up to date;
  • (Optional) An operational SCOM reporting service (SSRS) with a SQL Server Analysis Service (SSAS) (the SSRS and SSAS must have the same instance name). The SSRS must allow report access on port 80 (HTTP).

Install the Operations Manager console on VMM servers

The first step is to install the Operations Manager console on all VMM servers. So if you have several VMM node members of a failover cluster, you have to install the Operations Manager console on each node. So mount the SCOM ISO and install the console:

Once the Operations Manager console is installed, you should update it to the same rollup update than your management server.

Import required management packs

First download these management packs:

Next extract and import these management packs from SCOM console:

Add them from disk.

Once you have selected all files from both management packs, just click on import.

Repeat the above procedure but this time instead of adding management pack from disk, select add from the catalog. Search the below management packs:

  • Windows Server Internet Information Services Library;
  • Windows Server Internet Information Services 2003;
  • Windows Server 2008 Internet Information Services 7;

Once you have found them, you can import them.

Credentials

To connect Virtual Machine Manager to SCOM, we need an account in the Administrator user role from Virtual Machine Manager. On my side I have added the account Home\sa-omg-mgtact to VMM administrator user role.

Next in Operations Manager, I add the group Home\GG-VMMADM to the Operations Manager Administrators user role. This group contains a service account used by VMM.

Connect Virtual Machine Manager to SCOM

In Virtual Machine Manager console, navigate to settings and System Center Settings. Then right click on Operation Manager Server and click on properties.

First screen details requirements to connect Virtual Machine Manager to Operations Manager. Verify that all is ok and click on next.

Next specify the server name of a management server and select the Run As account that has been added to Operations Manager Administrators user role.

Then specify an Operations Manager account that will be used to connect to Virtual Machine Manager. If you have not already added it to VMM Administrators user role, the wizard will add it for you.

Once Virtual Machine Manager and Operations Manager are connected, you can right click on Operations Manager settings and properties again. The connection status should indicate OK.

SQL Server Analysis Services

First connect to your Analysis Service and add a VMM Run As account to the Server Administrators:

Next you have to install Microsoft® SQL Server® 2012 Analysis Management Objects on each VMM server node.

Come back to the Virtual Machine Manager console and edit properties of Operation Manager Settings. Next select SQL Server Analysis Services. Specify the server that hosts the SCOM Reporting Service and the Analysis Service. Then specify the SSAS instance name, the port (0 means default port) and the Run As account with administrative privilege on SSAS instance.

Be careful, the instance name between the Analysis Service and the Reporting Service must be the same. Moreover the Reporting Service must allow report access on port 80 by HTTP. For further information you can read this TechNet topic.

Monitor Virtual Machine Manager

First thing enabled from Virtual Machine Manager is the Performances and Resources Optimization (PRO). It indicates issues on Hyper-V hosts or Virtual Machines as below.

Next if you navigate in the SCOM console you should have three new folders:

First a diagram view is available that shows what is monitored in the virtualized infrastructure.

Next many monitors are available to check the health of components managed by Virtual Machine Manager. Below you have three examples: the clouds, the hosts and the virtual machine health.

Some performance counters are also available. Below this is an example of performance counters about Hyper-V host free memory and network packets received by a virtual machine.

Import management pack for VMM host and Virtual Machine dashboards

In May 2014, new dashboards were available for Virtual Machine Manager. These dashboards look better than the others. So why not install them? J

Before importing this management pack, make sure that your management server is updated to at least the rollup update 2. Moreover this management pack requires Component Library Management Pack. You can import this management pack from this path:

<Install Dir>\Microsoft System Center 2012 R2\Operations Manager\Server\Management Packs for Update Rollups

Once you have imported this management pack, you can download the management pack for Virtual Machine Manager host and Virtual Machine dashboards here. Next extract it and import it from the SCOM console.

Once the management pack is imported, you should have two new dashboards:

Below this is the VMM Host dashboard J.

The post Monitor Virtual Machine Manager from SCOM appeared first on Tech-Coffee.

]]>
//www.tech-coffee.net/monitor-virtual-machine-manager-from-scom/feed/ 1 2985
SCVMM 2012 R2 – Deploy Update Rollup 3 //www.tech-coffee.net/scvmm-2012-r2-deploy-update-rollup-3/ //www.tech-coffee.net/scvmm-2012-r2-deploy-update-rollup-3/#respond Wed, 15 Oct 2014 15:26:56 +0000 //www.tech-coffee.net/?p=2691 This article describe the installation steps of the SCVMM Update Rollup 3. There are a lot of action, and in particular the update of the DHCP vSwitch extention on all Host. But Microsoft provide to us a PowerShell Script for SMA/SCO Runbook to automate this action on all hosts. SMA Runbook to update SCVMM R2 ...

The post SCVMM 2012 R2 – Deploy Update Rollup 3 appeared first on Tech-Coffee.

]]>
This article describe the installation steps of the SCVMM Update Rollup 3. There are a lot of action, and in particular the update of the DHCP vSwitch extention on all Host. But Microsoft provide to us a PowerShell Script for SMA/SCO Runbook to automate this action on all hosts.

SMA Runbook to update SCVMM R2 UR3 DHCP Server Extension on all Hyper-V Hosts

https://gallery.technet.microsoft.com/scriptcenter/SMA-Runbook-to-update-1c908bb7

My WSUS server is not deployed for the moment, so I download manualy the Update Rollup 3 (there are 2 updates: server and console)

https://support2.microsoft.com/kb/2965414/en-us

 

Update VMM Server:

Use WSUS or SCCM, or the manual procedure bellow:

Start the VMM Server Update, and click “OK”

msiexec.exe /update kb2965414_vmmserver.msp

Do not reboot now:

Launch the console update:

msiexec.exe /update kb2965413_AdminConsole_amd64.msp

 

Update VMM Database:

Connect to the SQL Instance which host the VMM Database, start a new query on the VMM Database and run the SQL SCRIPT (can be found on the KB Webpage, see link above):

/* script starts here */
ALTER Procedure [dbo].[prc_RBS_UserRoleSharedObjectRelation_Insert]
(
        @ID uniqueidentifier,
        @ObjectID uniqueidentifier,
        @ObjectType int,
        @RoleID uniqueidentifier,
        @UserOrGroup varbinary (85),
        @ForeignAccount nvarchar (256),
        @IsADGroup bit,
        @ExistingID uniqueidentifier = NULL OUTPUT
)
AS
SET NOCOUNT ON
     SELECT @ExistingID = [ID] FROM [dbo].[tbl_RBS_UserRoleSharedObjectRelation]
     WHERE [ObjectID] = @ObjectID AND [RoleID] = @RoleID
  AND
  -- Select owner OR Select all which matches ForeignAccount or UserOrGroup OR
  -- both ForeignAccount and UserOrGroup is NULL
  (([UserOrGroup] = @UserOrGroup OR [ForeignAccount] = @ForeignAccount) OR
  ([UserOrGroup] IS NULL AND @UserOrGroup IS NULL AND [ForeignAccount] IS NULL AND @ForeignAccount IS NULL))
      /* Ignore duplicate entries */
      IF (@ExistingID IS NULL)
      BEGIN
     INSERT [dbo].[tbl_RBS_UserRoleSharedObjectRelation]
               ([ID]
               ,[ObjectID]
               ,[ObjectType]
               ,[RoleID]
               ,[UserOrGroup]
               ,[ForeignAccount]
               ,[IsADGroup]
               ,[IsOwner]
               )
    VALUES
    (
            @ID,
            @ObjectID,
            @ObjectType,
            @RoleID,
            @UserOrGroup,
            @ForeignAccount,
            @IsADGroup,
            0
    )
      END
SET NOCOUNT OFF
RETURN @@ERROR
GO

ALTER PROCEDURE [dbo].[prc_WLC_IsVHDSharedByAnotherVmOnHost]
    @HostId [uniqueidentifier],
 @VHDId [uniqueidentifier],
    @VMId [uniqueidentifier]
AS
BEGIN
    DECLARE @error int
    SET @error = 0
    SET NOCOUNT ON;

    SELECT TOP 1 1 FROM dbo.[fn_WLC_GetParentChildRelationForVHD](@VHDId) vcr
 JOIN dbo.tbl_WLC_VDrive vd ON
  vcr.VHDId = vd.VHDId
 JOIN dbo.tbl_WLC_VObject vo ON
  vo.ObjectId = vd.ParentId
 JOIN dbo.tbl_WLC_VMInstance vi ON
  vo.ObjectId = vi.VMInstanceId
 WHERE
  vo.HostId = @HostId
 AND
  vo.ObjectId <> @VMId
 AND
  vi.RootVMInstanceId <> @VMId
    SET @error = @@ERROR
    SET NOCOUNT OFF
    RETURN @error
END
GO

IF EXISTS (SELECT * FROM dbo.sysobjects
           WHERE id = OBJECT_ID(N'prc_ADHC_HostDisk_GetByClusterDiskIdAndHostId')
           AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.prc_ADHC_HostDisk_GetByClusterDiskIdAndHostId
GO
CREATE PROCEDURE dbo.prc_ADHC_HostDisk_GetByClusterDiskIdAndHostId
(
  @ClusterDiskID guid,
  @HostID guid
)
AS
DECLARE @error int
SET @error = 0
SET NOCOUNT ON
SELECT
 [DiskID],
 [Signature],
 [UniqueID],
 [HostID],
 [LibraryServerID],
 [StArrayID],
 [LastUpdatedDateTime],
 [DeviceID],
 [Index],
 [Capacity],
 [IsPassThroughCapable],
 [IsSanAttached],
 [ClusterDiskID],
 [Location],
 [StorageLUNID],
 [SMLunId],
 [SMLunIdFormat],
 [SMLunIdNamespace],
 [SANType],
 [Bus],
 [Lun],
 [Target],
 [Port],
 [IsVHD],
 [StClassificationId]
FROM dbo.tbl_ADHC_HostDisk
WHERE
[HostID] = @HostID
AND
[ClusterDiskID] = @ClusterDiskID
SELECT @error = @@ERROR
SET NOCOUNT OFF
RETURN @error
GO

-- The stored procedure will be deleted after the OS table is updated
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[prc_IL_AddOSTemp]') AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].[prc_IL_AddOSTemp]
GO
CREATE PROCEDURE [dbo].[prc_IL_AddOSTemp]
    @OSId GUID,
    @Name nvarchar(64),
    @Description nvarchar(max),
    @Edition int,
    @ProductType int,
    @Version nvarchar(32),
    @Architecture nvarchar(32),
    @OSFlags int,
    @VMWareGuestId nvarchar(32),
 @OSType int
AS
BEGIN
    DECLARE @error int
    SET @error = 0

    SELECT * FROM dbo.tbl_IL_OS WHERE OSId = @OSId
 -- If the OS entry doesn't exist, add the entry.
 -- If it exists, update
    IF (@@ROWCOUNT = 0)
 BEGIN
 INSERT INTO dbo.tbl_IL_OS
 (
  [OSId],
  [Name],
  [Description],
  [Edition],
  [ProductType],
  [Version],
  [Architecture],
  [OSFlags],
  [VMWareGuestId],
  [OSType]
 )
 VALUES
 (
  @OSId,
  @Name,
  @Description,
  @Edition,
  @ProductType,
  @Version,
  @Architecture,
  @OSFlags,
  @VMWareGuestId,
  @OSType
 )
 END
 ELSE
    BEGIN
    UPDATE dbo.tbl_IL_OS
    SET
        [Name] = @Name,
        [Description] = @Description,
        [Edition] = @Edition,
        [ProductType] = @ProductType,
        [Version] = @Version,
        [Architecture] = @Architecture,
        [OSFlags] = @OSFlags,
        [VMWareGuestId] = @VMWareGuestId,
  [OSType] = @OSType
    WHERE OSId = @OSId
    END

    SET @error = @@ERROR
    RETURN @error
END
GO
prc_IL_AddOSTemp 'A3281FA8-6633-4A1D-9AB2-6B563121EC8D', 'Ubuntu Linux 14.04 (32 bit)', 'Ubuntu Linux 14.04 (32 bit)', NULL, NULL, NULL, x86 , 0x1C, 'ubuntuGuest', 1
GO
prc_IL_AddOSTemp '2AF8E4A1-05F0-444E-A96F-D4D5B86B5CC8', 'Ubuntu Linux 14.04 (64 bit)', 'Ubuntu Linux 14.04 (64 bit)', NULL, NULL, NULL, amd64 , 0x1C, 'ubuntu64Guest', 1
GO
-- Delete the temporary stored procedure
-- used to populate this table
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[prc_IL_AddOSTemp]') AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].[prc_IL_AddOSTemp]
GO
/* script ends here */

 

Restart the VMM Server

Start Console, click “File\About” and check the VMM version (must be 3.2.7672.0):

Update HOST – VMM Agent:

Check the host status, normally you should read “Needs Attention” (else starts a Refresh).

Right-click on the host and select “Update Agent”:

 

Retrieve the script if you have many hosts to update:

$credential = Get-SCRunAsAccount -Name “Hyper-V Host Management” -ID “xxxxx”

$managedComputer = Get-SCVMMManagedComputer -ComputerName “s-hv-1.infra.corp”

Update-SCVMMManagedComputer -Credential $credential -RunAsynchronously -VMMManagedComputer $managedComputer

 

Wait until the job is finished and refresh the host:


 

You can check VMM Agent version:


Command to check all hosts:

Get-VMMMangedComputer | Select Name, AgentVersion

 

 

Update HOST – DHCP vSwitch extension:

 

Microsoft Note:

Important The System Center Virtual Machine Manager DHCP Server (x64) component must be manually updated on all VMM Hyper-V hosts. If this component is not updated, virtual machines may not be assigned an IP address for several minutes after the restart of the VM. (Eventually the VM will receive the IP address and otherwise function normally.) To check the version of the VMM DHCP agent, run the following command from an elevated PowerShell command prompt window on the host: Get-WmiObject -Class win32_product -Filter ‘Name = “Microsoft System Center Virtual Machine Manager DHCP Server (x64)”‘

Go to an Hyper-V Host and run the command:

Or you can view the version through “Programs and Features”:

Uninstall the Product through Programs and Features or through msiexec (add /quiet to skip confirmation):

msiExec.exe /x {3834A905-5CC1-454D-8CA4-AC449F12775D}

Copy the “DHCPExtn.msi” file from your VMM install folder to the Hyper-V host

Path: ..\Program Files\Microsoft System Center 2012 R2\Virtual Machine Manager\SwExtn

And run the MSI (you can use “msiexec /package <file> /quiet”):

Update all VMM Agent and DHCP vSwitch extension on all hosts (use MS PowerShell script cited above).

Update all VMM Console deployed in your environment.

 

Install of Update Rollup 3 is done!

 

Note about SCOM Management Pack:

From MS KB webpage:

This update rollup includes a Management Pack package upgrade. If you use System Center Operations Manager and System Center Virtual Machine Manager integration, we recommend that you upgrade your Management Pack installation to the latest version after you apply this update. The default installation path for this package is “C:\Program Files\Microsoft System Center 2012 R2\Virtual Machine Manager\ManagementPacks.”

The post SCVMM 2012 R2 – Deploy Update Rollup 3 appeared first on Tech-Coffee.

]]>
//www.tech-coffee.net/scvmm-2012-r2-deploy-update-rollup-3/feed/ 0 2691