Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

How to reinstall Virtual Machine Manager 2012 R2 with UR8 or later


View products that this article applies to.

Summary

When you have Microsoft System Center 2012 R2 Virtual Machine Manager (VMM 2012 R2) installed, the reinstallation of VMM Update Rollup 8 or a later update fails. Additionally, you receive the following error message, and you have to reinstall the VMM:

↑ Back to the top


Reinstall Virtual Machine Manager

Follow these steps:

  1. Uninstall Virtual Machine Manager. Select the Retain Database option.
  2. Open SQL Management Studio, and then connect to the Retained database.
  3. Run the following stored procedure:
    /****** Object: StoredProcedure [dbo].[prc_WLC_GetVNetworkAdapterByNicId] Script Date: 12/16/2015 2:13:12 AM ******/ 
    -- ========================================================= 
    -- Create date: 08/31/2007 
    -- Description: Get VNetworkAdapter for a given NicId 
    -- ========================================================= 
    ALTER PROCEDURE [dbo].[prc_WLC_GetVNetworkAdapterByNicId] 
        @VNicId uniqueidentifier 
    AS 
    BEGIN 
        DECLARE @error int 
        SET @error = 0 
        SET NOCOUNT ON; 
        SELECT 
          [Name], 
          [Description], 
          [OwnerIdentifier], 
          [CreationTime], 
          vna.[ModifiedTime], 
          [Accessibility], 
          [ObjectState], 
          [VNicId], 
          [HWProfileId], 
          [ParentType], 
          [VirtualNetwork], 
          [MACAddressType], 
          [MACAddress], 
          [IPv4AddressType], 
          [IPv6AddressType], 
          [PortId], 
          [DeviceId], 
          [NetworkAdapterType], 
          [VMSubnetId], 
          [VMNetworkId], 
          [PortClassificationId], 
          [PortProfileSetId], 
          [VLanEnabled], 
          [VLanId], 
          [VmwAdapterIndex], 
          [VmwPortGroup], 
          [SlotId], 
          [MACSpoofingEnabled], 
          [EnableGuestIPNetworkVirtualizationUpdates], 
          [VMNetworkOptimizationEnabled], 
          [HostId], 
          [LogicalSwitchId], 
          [NetworkKBytesReadTieredPerfCounterID], 
          [NetworkKBytesWriteTieredPerfCounterID], 
          [VMNetworkServiceSetting], 
          [UsesSriov], 
          [IsUsedForHostManagement], 
          [IPv4Addresses], 
          [IPv6Addresses], 
          [DefaultGateways], 
          [DNSServers], 
          [TemplateNicName], 
    compliance.PortClassificationComplianceErrors AS [PortClassificationComplianceErrors], 
          compliance.VMNetworkComplianceErrors AS [VMNetworkComplianceErrors] 
        FROM dbo.tbl_WLC_VNetworkAdapter vna 
        LEFT JOIN dbo.tbl_NetMan_VirtualNetworkAdapterCompliance compliance 
            ON vna.VNicId = compliance.VirtualNetworkAdapterId 
        WHERE VNicId = @VNicId 
        SET @error = @@ERROR 
        SET NOCOUNT OFF 
        RETURN @error 
    END 
    IF EXISTS (SELECT * FROM dbo.sysobjects 
               WHERE id = OBJECT_ID(N'[dbo].[prc_RBS_UserRole_Add]') 
               AND OBJECTPROPERTY(id, N'IsProcedure') = 1) 
    SET NOEXEC OFF 
    ELSE 
    SET NOEXEC ON 
    GO 
    /****** Object:  StoredProcedure [dbo].[prc_RBS_UserRole_Add]    Script Date: 10/03/2007 12:13:45 ******/ 
    ALTER PROCEDURE [dbo].[prc_RBS_UserRole_Add] 
        ( 
    @RoleID uniqueidentifier, 
            @ProfileType tinyint, 
            @Description nvarchar(2048), 
            @Name nvarchar(256), 
            @OwnerIdentifier nvarchar(256), 
            @ParentUserRole uniqueidentifier, 
            @LastUpdatedTimestamp datetime, 
            @ShowPROTips bit, 
            @VMNetworkMaximum smallint, 
            @VMNetworkMaximumPerUser smallint, 
            @VPNConnectionMaximum smallint, 
            @VPNConnectionMaximumPerUser smallint, 
            @VMNetworkVPNMaximumBandwidthInKbps bigint, 
            @VMNetworkVPNMaximumBandwidthOutKbps bigint, 
            @NATConnectionMaximum smallint = NULL, 
            @NATConnectionMaximumPerUser smallint = NULL 
        ) 
    AS 
    BEGIN TRAN 
    SET NOCOUNT ON 
    DECLARE @error int 
    DECLARE @IsDuplicateName bit 
    DECLARE @IsRoleAlreadyPresent bit 
    SELECT @IsDuplicateName = [dbo].[fn_RBS_UserRole_NameExists](@RoleID, @ParentUserRole, @Name) 
    -- This is especially used in Upgrade scenarios where we are inserting Administrator role 
    SELECT @IsRoleAlreadyPresent = Count(RoleID) FROM [dbo].[tbl_RBS_UserRole] 
    WHERE RoleID = @RoleID 
    IF (@IsDuplicateName = 0 
       AND @IsRoleAlreadyPresent = 0) 
    BEGIN 
      INSERT INTO [dbo].[tbl_RBS_UserRole] 
               ([RoleID] 
               ,[ProfileType] 
               ,[Description] 
               ,[Name] 
               ,[OwnerIdentifier] 
               ,[ParentUserRole] 
               ,[LastUpdatedTimestamp] 
               ,[ShowPROTips] 
               ,[VMNetworkMaximum] 
               ,[VMNetworkMaximumPerUser] 
               ,[VPNConnectionMaximum] 
               ,[VPNConnectionMaximumPerUser] 
    ,[VMNetworkVPNMaximumBandwidthInKbps] 
               ,[VMNetworkVPNMaximumBandwidthOutKbps] 
               ,[NATConnectionMaximum] 
               ,[NATConnectionMaximumPerUser] 
    ) 
    VALUES 
    ( 
            @RoleID, 
            @ProfileType, 
            @Description, 
            @Name, 
            @OwnerIdentifier, 
            @ParentUserRole, 
            @LastUpdatedTimestamp, 
            @ShowPROTips, 
            @VMNetworkMaximum, 
            @VMNetworkMaximumPerUser, 
            @VPNConnectionMaximum, 
            @VPNConnectionMaximumPerUser, 
            @VMNetworkVPNMaximumBandwidthInKbps, 
            @VMNetworkVPNMaximumBandwidthOutKbps, 
            @NATConnectionMaximum, 
            @NATConnectionMaximumPerUser 
    ) 
      -- Insert flattened tree of the hierarchy for this user role 
      INSERT INTO [dbo].[tbl_RBS_UserRoleHierarchy] 
      SELECT RoleId, ParentRoleId, hl 
      FROM view_RBS_UserRoleParentChildRelation ur where ur.RoleID = @RoleID 
      SELECT @error = @@ERROR 
    END 
    ELSE 
    BEGIN 
      SET @error = 50008 
    END 
    SET NOCOUNT OFF 
    COMMIT TRAN 
    RETURN @error 
    Go 
    SET NOEXEC OFF 
    --------------------------------------------------------------------------------------------
    IF EXISTS (SELECT * FROM dbo.sysobjects 
               WHERE id = OBJECT_ID(N'[dbo].[prc_RBS_UserRole_CommonUpdate]') 
               AND OBJECTPROPERTY(id, N'IsProcedure') = 1) 
    SET NOEXEC OFF 
    ELSE 
    SET NOEXEC ON 
    GO 
    /****** Object:  StoredProcedure [dbo].[prc_RBS_UserRole_CommonUpdate]    Script Date: 10/03/2007 12:13:45 ******/ 
    SET ANSI_NULLS ON 
    GO 
    SET QUOTED_IDENTIFIER ON 
    GO 
    ALTER PROCEDURE [dbo].[prc_RBS_UserRole_CommonUpdate] 
    ( 
            @RoleID uniqueidentifier, 
            @Description nvarchar(2048), 
            @OwnerIdentifier nvarchar(256), 
            @Name nvarchar(256), 
            @LastUpdatedTimestamp datetime, 
            @ShowPROTips bit, 
            @VMNetworkMaximum smallint, 
            @VMNetworkMaximumPerUser smallint, 
            @VPNConnectionMaximum smallint, 
            @VPNConnectionMaximumPerUser smallint, 
            @VMNetworkVPNMaximumBandwidthInKbps bigint, 
            @VMNetworkVPNMaximumBandwidthOutKbps bigint, 
            @NATConnectionMaximum smallint = NULL, 
            @NATConnectionMaximumPerUser smallint = NULL 
        ) 
    AS 
    SET NOCOUNT ON 
    DECLARE @error int 
    DECLARE @ParentUserRole uniqueidentifier 
    DECLARE @IsDuplicateName bit 
    DECLARE @OldName nvarchar(256) 
    SELECT @ParentUserRole = [ParentUserRole], @OldName = [Name] FROM [dbo].[tbl_RBS_UserRole] 
    WHERE [RoleID] = @RoleID 
    IF (@OldName = @Name) 
    BEGIN 
       -- We are not changing role name. This is necessary if Admin has already an SSU1 and TA created SSU1, we should not error out here 
       SELECT @IsDuplicateName = 0 
    END 
    ELSE 
    BEGIN 
       SELECT @IsDuplicateName = [dbo].[fn_RBS_UserRole_NameExists](@RoleID, @ParentUserRole, @Name) 
    END 
    IF (@IsDuplicateName = 0) 
    BEGIN 
    UPDATE [dbo].[tbl_RBS_UserRole] 
               SET [Description] = @Description, 
               [OwnerIdentifier] = @OwnerIdentifier, 
               [Name] = @Name, 
               [LastUpdatedTimestamp] = @LastUpdatedTimestamp, 
               [ShowPROTips] = @ShowPROTips, 
               [VMNetworkMaximum] = @VMNetworkMaximum, 
               [VMNetworkMaximumPerUser] = @VMNetworkMaximumPerUser, 
               [VPNConnectionMaximum] = @VPNConnectionMaximum, 
               [VPNConnectionMaximumPerUser] = @VPNConnectionMaximumPerUser, 
               [VMNetworkVPNMaximumBandwidthInKbps] = @VMNetworkVPNMaximumBandwidthInKbps, 
               [VMNetworkVPNMaximumBandwidthOutKbps] = @VMNetworkVPNMaximumBandwidthOutKbps, 
               [NATConnectionMaximum] = @NATConnectionMaximum, 
               [NATConnectionMaximumPerUser] = @NATConnectionMaximumPerUser 
      WHERE [RoleID] = @RoleID 
    SELECT @error = @@ERROR 
    END 
    ELSE 
    BEGIN 
      SET @error = 50008 
    END 
    SET NOCOUNT OFF 
    RETURN @error 
    GO 
    SET NOEXEC OFF 
  4. Install VMM 2012 R2 from the original installation media. In some cases, the VMM service may not start correctly. However, this behavior can be safely ignored at this point.
  5. Apply the update rollup (for example, Update Rollup 7 or 8) that corresponds to the version of VMM 2012 R2 that was previously installed. This is required for the database to function correctly. If you are updating from the release version to a UR above UR7 or UR8, you can update directly to that UR. You do not have to install UR7 or UR8. For example, you can install the release version, upgrade directly to UR14, and then run the second script in step 6.
  6. Use SQL Management Studio to run the following stored procedure against the VMM database:
    /****** Object: StoredProcedure [dbo].[prc_WLC_GetVNetworkAdapterByNicId] Script Date: 12/16/2015 2:13:12 AM ******/ 
    -- ========================================================= 
    -- Create date: 08/31/2007 
    -- Description: Get VNetworkAdapter for a given NicId 
    -- ========================================================= 
    ALTER PROCEDURE [dbo].[prc_WLC_GetVNetworkAdapterByNicId] 
        @VNicId uniqueidentifier 
    AS 
    BEGIN 
        DECLARE @error int 
        SET @error = 0 
        SET NOCOUNT ON; 
        SELECT 
          [Name], 
          [Description], 
          [OwnerIdentifier], 
          [CreationTime], 
          vna.[ModifiedTime], 
          [Accessibility], 
          [ObjectState], 
          [VNicId], 
          [HWProfileId], 
          [ParentType], 
          [VirtualNetwork], 
          [MACAddressType], 
          [MACAddress], 
          [IPv4AddressType], 
          [IPv6AddressType], 
          [PortId], 
          [DeviceId], 
          [NetworkAdapterType], 
          [VMSubnetId], 
          [VMNetworkId], 
          [PortClassificationId], 
          [PortProfileSetId], 
          [VLanEnabled], 
          [VLanId], 
          [VmwAdapterIndex], 
          [VmwPortGroup], 
          [SlotId], 
          [MACSpoofingEnabled], 
          [EnableGuestIPNetworkVirtualizationUpdates], 
          [VMNetworkOptimizationEnabled], 
          [HostId], 
          [LogicalSwitchId], 
          [NetworkKBytesReadTieredPerfCounterID], 
          [NetworkKBytesWriteTieredPerfCounterID], 
          [VMNetworkServiceSetting], 
          [UsesSriov], 
          [IsUsedForHostManagement], 
          [IPv4Addresses], 
          [IPv6Addresses], 
          [DefaultGateways], 
          [DNSServers], 
          [TemplateNicName], 
          compliance.PortClassificationComplianceErrors AS [PortClassificationComplianceErrors], 
          compliance.VMNetworkComplianceErrors AS [VMNetworkComplianceErrors], 
          [AccessControlListID], 
          compliance.NetworkAccessControlListComplianceErrors AS [NetworkAccessControlListComplianceErrors] 
        FROM dbo.tbl_WLC_VNetworkAdapter vna 
        LEFT JOIN dbo.tbl_NetMan_VirtualNetworkAdapterCompliance compliance 
            ON vna.VNicId = compliance.VirtualNetworkAdapterId 
        WHERE VNicId = @VNicId 
        SET @error = @@ERROR 
        SET NOCOUNT OFF 
        RETURN @error 
    END 
    GO  
  7. Restart the VMM 2012 R2 server, and make sure that the VMM service starts successfully.

↑ Back to the top


Reinstall Highly Available Virtual Machine Manager (HAVMM)

To do this, follow these steps:

  1. Uninstall the SCVMM Management server. Select the Retain Database option on all HAVMM nodes when you do this.
  2. Open SQL Management Studio, and then connect to the retained VMM database.
  3. On the VMM database, run the script in step 3 of the Reinstall Virtual Machine Manager section.
  4. On the first HAVMM node, follow these steps:
     
    1. Install VMM 2012 R2 from the original installation media by selecting the existing database.

      Note In some cases, the VMM service may not start correctly. However, you can safely ignore this behavior at this point.
    2. Apply the latest update rollup that was previously installed (UR8 or a later version) before you uninstall the VMM server.
  5. On the VMM database, run the post-installation script in step 6 of the Reinstall Virtual Machine Manager section.
  6. Repeat step 4 and 5 on the remaining HAVMM nodes to reinstall the VMM server.
  7. Upgrade to the latest UR available or to the UR that's approved for your environment on all VMM servers, and then update all the hosts to the latest VMM Agent for that UR level.

↑ Back to the top


Keywords: kbexpertiseadvanced, kbsurveynew, kbinfo, kbhowto, kb, vmm, ur8, db

↑ Back to the top

Article Info
Article ID : 3132774
Revision : 19
Created on : 6/15/2018
Published on : 6/15/2018
Exists online : False
Views : 318