Virtual Machine Manager 2012 R2 met UR8 of hoger opnieuw installeren

Samenvatting

Wanneer u Microsoft System Center 2012 R2 Virtual Machine Manager (VMM 2012 R2), mislukt de installatie van VMM Update Rollup 8 of een latere update. Bovendien wordt het volgende foutbericht weergegeven en installeer opnieuw de VMM:

tijd : InnerException.Type: System.Data.SqlClient.SqlException, InnerException.Message: beperking van de schending van de primaire sleutel 'PK_tbl_WLC_ServiceTemplate'. Dubbele sleutel in 'dbo.tbl_WLC_ServiceTemplate'-object kan niet worden ingevoegd. De dubbele sleutelwaarde is < key_value >.

Virtual Machine Manager installeren

Ga als volgt te werk:

  1. Virtual Machine Manager te verwijderen. Selecteer de optie Database behouden .

  2. Open SQL Management Studio en maak verbinding met de database Retained.

  3. De volgende opgeslagen procedure uitvoeren: /****** 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. VMM 2012 R2 installeren vanaf de originele installatiemedia. In sommige gevallen de VMM-service mogelijk niet correct gestart. Echter kan dit probleem worden genegeerd op dit punt.

  5. Het updatepakket (voor bijvoorbeeld Update Rollup 7 of 8) die overeenkomt met van toepassing op de versie van VMM 2012 R2 die eerder is geïnstalleerd. Dit is vereist voor de database goed te laten functioneren. Als u uit de originele versie naar een UR boven UR7 of UR8 bijwerken wilt, kunt u rechtstreeks naar die UR bijwerken. U hoeft niet te installeren, UR7 of UR8. U kunt bijvoorbeeld de versie installeert, rechtstreeks naar de UR14, upgrade en voer het tweede script in stap 6.

  6. SQL Management Studio gebruikt de volgende opgeslagen procedure uitvoeren op de database VMM: /****** 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. De VMM 2012 R2 server opnieuw opstarten en controleren of de VMM-service is gestart.

Installeer de maximaal beschikbare Virtual Machine Manager (HAVMM)

Volg hiertoe de volgende stappen:

  1. Verwijder de SCVMM Management-server. Selecteer de optie Database behouden op alle knooppunten van de HAVMM wanneer u dit doet.

  2. Open SQL Management Studio en maak verbinding met de database van de ingehouden VMM.

  3. Voer het script in stap 3 van de sectie Beheer van virtuele Machine opnieuw op de database VMM.

  4. Op het eerste knooppunt van de HAVMM als volgt te werk:

    1. VMM 2012 R2 installeren vanaf de originele installatiemedia door de bestaande database selecteren. Opmerking In sommige gevallen de VMM-service mogelijk niet correct gestart. Echter, kunt u dit probleem op dit moment gewoon negeren.

    2. Toepassing van de meest recente updatepakket dat eerder is geïnstalleerd (UR8 of een latere versie) voordat u de VMM-server verwijderen.

  5. In de VMM-database, het script na de installatie uitvoeren in stap 6 van de sectie Virtual Machine Manager opnieuw installeren .

  6. Herhaal stap 4 en 5 op de resterende knooppunten HAVMM de VMM-server opnieuw installeren.

  7. Upgrade naar de meest recente beschikbare UR of de UR die voor uw omgeving op alle servers van VMM goedgekeurd en vervolgens bijwerken naar de meest recente VMM Agent voor dat niveau UR alle hosts.

Meer hulp nodig?

Uw vaardigheden uitbreiden
Training verkennen
Als eerste nieuwe functies krijgen
Deelnemen aan Microsoft insiders

Was deze informatie nuttig?

Bedankt voor uw feedback.

Hartelijk dank voor uw feedback! Het lijkt ons een goed idee om u in contact te brengen met een van onze Office-ondersteuningsagenten.

×