Virtual Machine Manager – Tech-Coffee https://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 https://www.tech-coffee.net/manage-switch-embedded-teaming-from-vmm-2016/ https://www.tech-coffee.net/manage-switch-embedded-teaming-from-vmm-2016/#comments Mon, 13 Jun 2016 08:06:19 +0000 https://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.

]]>
https://www.tech-coffee.net/manage-switch-embedded-teaming-from-vmm-2016/feed/ 2 4658
Manage Storage Space Direct from Virtual Machine Manager https://www.tech-coffee.net/manage-storage-space-direct-from-virtual-machine-manager/ https://www.tech-coffee.net/manage-storage-space-direct-from-virtual-machine-manager/#comments Tue, 03 Nov 2015 10:53:45 +0000 https://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.

]]>
https://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 https://www.tech-coffee.net/rename-vms-network-adapters-automatically-with-virtual-machine-manager-2016/ https://www.tech-coffee.net/rename-vms-network-adapters-automatically-with-virtual-machine-manager-2016/#respond Thu, 10 Sep 2015 10:23:05 +0000 https://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.

]]>
https://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 https://www.tech-coffee.net/upgrade-virtual-machine-manager-2012-r2-in-high-availability-to-technical-preview-2/ https://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 https://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.

]]>
https://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 https://www.tech-coffee.net/manage-azure-vm-from-virtual-machine-manager-2012-r2/ https://www.tech-coffee.net/manage-azure-vm-from-virtual-machine-manager-2012-r2/#respond Tue, 14 Jul 2015 19:55:38 +0000 https://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.

]]>
https://www.tech-coffee.net/manage-azure-vm-from-virtual-machine-manager-2012-r2/feed/ 0 3684
Implement a Hyper-V Cluster from VMM 2012R2 https://www.tech-coffee.net/implement-a-hyper-v-cluster-from-vmm-2012r2/ https://www.tech-coffee.net/implement-a-hyper-v-cluster-from-vmm-2012r2/#comments Tue, 31 Mar 2015 10:41:20 +0000 https://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.

]]>
https://www.tech-coffee.net/implement-a-hyper-v-cluster-from-vmm-2012r2/feed/ 2 3322
Manage fabric servers updates from Virtual Machine Manager 2012R2 https://www.tech-coffee.net/manage-fabric-servers-updates-from-virtual-machine-manager-2012r2/ https://www.tech-coffee.net/manage-fabric-servers-updates-from-virtual-machine-manager-2012r2/#respond Mon, 02 Mar 2015 13:53:49 +0000 https://www.tech-coffee.net/?p=3250 Virtual Machine Manager (VMM) is able to manage Microsoft updates and the compliance of the fabric servers as Hyper-V hosts, VMM servers, PXE servers, Library servers and so on. For that VMM must be connected to a WSUS. When VMM is connected to a WSUS, the updates are visible in the VMM console and can ...

The post Manage fabric servers updates from Virtual Machine Manager 2012R2 appeared first on Tech-Coffee.

]]>
Virtual Machine Manager (VMM) is able to manage Microsoft updates and the compliance of the fabric servers as Hyper-V hosts, VMM servers, PXE servers, Library servers and so on. For that VMM must be connected to a WSUS. When VMM is connected to a WSUS, the updates are visible in the VMM console and can be added to an update baseline. Once the baseline is created, it can be applied to the fabric servers.

VMM can be connected to an upstream or a downstream WSUS but not to a WSUS replica. Moreover, if you have System Center Configuration Manager (SCCM) already connected to a WSUS, you can use the same on VMM.

For example, in my lab, I have a server that hosts SCCM and the WSUS. This server is called VMCMG01. So I will connect my VMM to VMCMG01 to manage fabric servers updates from Virtual Machine Manager.

Add an Update server to VMM

First of all, add a RunAs account to the local Administrators group on the WSUS server:

Next, open the VMM console and navigate to the fabric. Right click on Update Server and select Add Update Server.

Specify the WSUS server hostname, the TCP port of WSUS (by default: HTTP: 8530, HTTPS: 8531) and the RunAs account. Don’t forget to tick the checkbox if you use SSL to communicate with WSUS.

Once you have clicked on Add, a job is launched to add the Update Server.

Once it is finished, you should have an Update Server in responding state.

Create and assign a baseline

Now that Virtual Machine Manager is connected to a WSUS, the update catalog should contain updates. To open the update catalog, navigate to the library and Update Catalog and Baselines.

By default, no baseline is assigned to fabric servers. So I will create a baseline that will contain only security updates. So I right click on Update Baselines and I select new baseline.

First specify a name and a description of the baseline.

In updates screen, click on Add to add updates to the baseline.

At the top of the window you can specify a filter to display only updates you want. So I type Security and I select all updates. Then I click on Add.

Once the updates are added to the baseline, you can click on next.

Next select on which fabric servers you want to apply the baseline. Because I have created this baseline for Hyper-V, I select all host groups.

To finish, click on … finish J.

At the end, my baseline is assigned to one host group (the top level host group) and contains 177 updates.

Check the compliance

Now open the fabric tab and navigate to your host groups. Right click on a Hyper-V host. You should see Scan, Remediate and Compliance Properties:

  • Scan: enables to check the compliance status to verify if all updates are installed;
  • Remediate: install the updates to be compliance with the baseline;
  • Compliance Properties: open a view to verify the compliance status regarding baseline

Below the Compliance Properties window on the hyperv01 Hyper-V host. Because no compliance scan has been run on this Hyper-V host, the compliance status is unknown.

So I run a compliance scan on HyperV01 by clicking on Scan.

When the compliance scan is finished, I come back to the compliance properties and I can see that my HyperV01 is compliant.

You can have an overview on the compliance status of the fabric servers by selecting the Compliance view as below:

My HyperV02 is non compliant, so I decide to run a remediation. I right click on the Hyper-V host and I select Remediate. In the update remediation window I select my baseline and I just click on Remediate.

$managedComputer = Get-SCVMMManagedComputer -ComputerName "hyperv02.home.net"
$baseline = Get-SCBaseline -Name "HomeCloud Security Baseline"
Start-SCUpdateRemediation -VMMManagedComputer $managedComputer -Baseline $baseline –RunAsynchronously

And after some time, my HyperV02 is compliant J

The post Manage fabric servers updates from Virtual Machine Manager 2012R2 appeared first on Tech-Coffee.

]]>
https://www.tech-coffee.net/manage-fabric-servers-updates-from-virtual-machine-manager-2012r2/feed/ 0 3250
Monitor Virtual Machine Manager from SCOM https://www.tech-coffee.net/monitor-virtual-machine-manager-from-scom/ https://www.tech-coffee.net/monitor-virtual-machine-manager-from-scom/#comments Wed, 17 Dec 2014 11:26:32 +0000 https://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.

]]>
https://www.tech-coffee.net/monitor-virtual-machine-manager-from-scom/feed/ 1 2985
Implement IPAM with Virtual Machine Manager https://www.tech-coffee.net/implement-ipam-virtual-machine-manager/ https://www.tech-coffee.net/implement-ipam-virtual-machine-manager/#respond Sun, 07 Dec 2014 21:00:53 +0000 https://www.tech-coffee.net/?p=2953 IP Address Management (IPAM) is a set of tools that enables to plan, deploy, monitor or manage the IP address space. IPAM is able to manage address spaces or virtual address spaces from Virtual Machine Manager. IPAM provides also a centralized interface from the Server Manager. The first feature of IPAM is the Address Space ...

The post Implement IPAM with Virtual Machine Manager appeared first on Tech-Coffee.

]]>
IP Address Management (IPAM) is a set of tools that enables to plan, deploy, monitor or manage the IP address space. IPAM is able to manage address spaces or virtual address spaces from Virtual Machine Manager. IPAM provides also a centralized interface from the Server Manager.

The first feature of IPAM is the Address Space Management (ASM) that enables to gain visibility on the IP Address infrastructure. This feature detects DHCP scope, conflict or duplicate address space. It enables also to monitor and make reports of address utilization statistics and trend.

The second feature of IPAM is the Multi-Server Management (MSM) that enables to discover DNS and DHCP servers and to monitor the service availability. MSM is also able to perform updates simultaneously in the DNS and the DHCP scopes.

The third feature is the Virtual Address Space Management (VASM) that enables to gain visibility on virtual address spaces that are configured in Virtual Machine Manager. VASM provides the same features than ASM.

To finish IPAM provides Network Audit which is a centralized repository that contains each change performed on the DHCP server, IPAM server and IP issued on the network. That enables to view potential configuration problems on DHCP servers. Detailed IP address tracking data is also provided, including client IP addresses, client ID, host name, and user name. Advanced search capabilities enable you to selectively search for events and obtain results that associate user logons to specific devices and times.

IPAM Deployment

IPAM Installation

First I create a Virtual Machine called VMIPM01 based on Windows Server 2012 R2. I update the system and then I run the below PowerShell command:

install-WindowsFeature IPAM, IPAM-Client-Feature

Once the IPAM features are installed, you can navigate to IPAM from the Server Manager.

Provision the IPAM Server

Next I make the provisioning of the IPAM Server. In the below screenshot, you can see the process to follow to configure the IPAM.

Next I choose to use a Microsoft SQL Server to host the IPAM database. I specify an AlwaysOn Availability Group to ensure high availability.

To connect to the database, I use the IPAM server credentials. So I add Home\VMIPM01$ security login to SQL Server as Sysadmin. When the database will be created, I will remove the Sysadmin right to Home\VMIPM01$.

To allow IPAM access to the managed servers as DNS or DHCP, some parameters have to be set. This can be done manually or by GPO. I choose to use GPOs to automate the configuration of managed servers. I set the GPO prefix to IPAM.

Once the IPAM databases and parameters are set successfully it is necessary to create the GPOs in each IPAM managed domain.

To create the GPOs, I use the below script:

Invoke-IpamGpoProvisioning -Domain "Home.net" `
                           -GpoPrefixName "IPAM" `
                           -IPAMServerFQDN "VMIPM01.home.net"

This command create three GPOs:

Database configuration

Because I use AlwaysOn, I want to add the IPAM database to the Availability Group. So first I configure the recovery model of the database to Full:

USE master;
ALTER DATABASE IPAM SET RECOVERY FULL ;
Go

Next I make a backup of the database:

Use master
GO
Backup DATABASE IPAM TO DISK='E:\MSSQL\MSSQL11.SQLI01\MSSQL\Backup\IPAM.bck'
GO

 

Then I navigate to the Availability Group and I select Add Database.

I select the IPAM database and I click on next.

Once the database is added to the AlwaysOn Availability Group, I run the below script on the other SQL Server node to create the security login.

-- Login: HOME\VMIPM01$
CREATE LOGIN [HOME\VMIPM01$] FROM WINDOWS WITH DEFAULT_DATABASE = [master]

IPAM configuration

Next it is necessary to configure the server discovery.

So I select the domains and the server roles to discover. I don’t have a DHCP server in the infrastructure because I almost use only virtual machines and so I use Static IP Address Pool.

Next I start the server discovery to find the Domain Controllers and DNS servers.

Once the server discovering is finished, I click on Select or add servers to manage and verify IPAM access. So I right click on the server to edit it.

I change the Manageability status to Managed.

When you set the manageability status to Managed, the GPO security filtering is updated:

Then after that the GPO is applied on the server, the IPAM Access Status should be Unblocked.

Integrate IPAM to VMM

Now I can add the IPAM network service to Virtual Machine Manager. So I open the VMM console and I navigate to the Fabric. Then I add a new network service. I call it IPAM.

I choose Microsoft as Manufacturer and Microsoft Windows Server IP Address Management as Model.

Next I choose the Run As account.

Then I specify the FQDN of the IPAM server.

Next I run the validation to check if all is ok.

Once the network service is added, I gain the visibility of Virtual IP Address Space in the IPAM console.

Use IPAM

In the IPAM, it is easy to find information about Static IP Address distributed by VMM. In the below screenshot, I have information about IP Address distributed as the host name of the related server, the network site and so on.

The IP Address Ranges view shows us the state of the Static IP Address Pool.

If I select an IP Address Range, I have more information in the details view as the percentage utilized, the gateway addresses and so on.

It is also possible to gain the visibility of all Virtual IP Address Spaces and their percentage utilized. Thanks to this view, it is easy to make network capacity management.

In the details view, a utilization trend is available to view the percentage of free IP in the address space in function of time.

The post Implement IPAM with Virtual Machine Manager appeared first on Tech-Coffee.

]]>
https://www.tech-coffee.net/implement-ipam-virtual-machine-manager/feed/ 0 2953
SCVMM 2012 R2 – Deploy Update Rollup 3 https://www.tech-coffee.net/scvmm-2012-r2-deploy-update-rollup-3/ https://www.tech-coffee.net/scvmm-2012-r2-deploy-update-rollup-3/#respond Wed, 15 Oct 2014 15:26:56 +0000 https://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)

http://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.

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