Home / System Center / Virtual Machine Manager / SCVMM 2012 R2 – Deploy Update Rollup 3
SCVMM 2012 R2

SCVMM 2012 R2 – Deploy Update Rollup 3

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.”

About Gilles Monville

Gilles Monville is a passionate of IT for many years; he works for over 10 years on Microsoft and VMware environments. In addition to Virtualization and Cloud computing, he loves automation (Orchestrator, PowerShell, Cloud deployment …)

Leave a Reply

x

Check Also

Rename VM’s Network Adapters automatically with Virtual Machine Manager 2016

The next version of Hyper-V comes with a new feature called Virtual Network Adapter Identification. ...

Upgrade Virtual Machine Manager 2012 R2 in High Availability to Technical Preview 2

Currently the last build for the next release of Virtual Machine Manager is the Technical ...

Manage Azure VM from Virtual Machine Manager 2012 R2

Since Update Rollup 6 of Virtual Machine Manager 2012 R2, it is possible to manage ...