Borrado de máquinas virtuales en estado “Missing” en Virtual Machine Manager

Ya son varias la veces, principalmente en entorno de Cluster de Hyper-V, dónde una máquina virtual empieza a aparecer dos veces en la consola de Virtual Machine Manager, una de ellas generalmente en estado “Missing”.

En cambio desde Hyper-V Manager no se detecta ningún comportamiento erróneo.

Ni los acciones de Reparar ni de Borrado lanzadas desde Virtual Machine Manager sobre la máquina en estado “Missing” finalizan con éxito, reportando principalmente dos tipos de error.

Error (2915):

image thumb Borrado de máquinas virtuales en estado “Missing” en Virtual Machine Manager

Error (802):

image thumb1 Borrado de máquinas virtuales en estado “Missing” en Virtual Machine Manager

Un procedimiento que hasta el momento siempre me ha funcionado es atacar a la BBDD de Virtual Machine Manager con un script de Base de Datos ejecutado desde la herramienta Microsoft SQL Server Management Studio Express.

Antes de ejecutar el Script tendremos que parar el servicio de Virtual Machine Manager en el propio servidor de VMM.

Hay que añadir que es un Script proporcionado, aunque no soportado [disclaimer], por Microsoft, que se puede encontrar junto con el procedimiento completo de ejecución en esta página de Technet.

Para finalizar os incluyo el código del Script:

BEGIN TRANSACTION T1

DECLARE custom_cursor CURSOR FOR
SELECT ObjectId from
dbo.tbl_WLC_VObject WHERE [ObjectState] = 220
DECLARE @ObjectId uniqueidentifier
OPEN custom_cursor
FETCH NEXT FROM custom_cursor INTO @ObjectId
WHILE(@@fetch_status = 0)
BEGIN
DECLARE vdrive_cursor CURSOR FOR
SELECT VDriveId, VHDId, ISOId from
dbo.tbl_WLC_VDrive WHERE ParentId = @ObjectId
DECLARE @VDriveId uniqueidentifier
DECLARE @VHDId uniqueidentifier
DECLARE @ISOId uniqueidentifier

OPEN vdrive_cursor
FETCH NEXT FROM vdrive_cursor INTO @VDriveId, @VHDId, @ISOId
WHILE(@@fetch_status = 0)
BEGIN
  DELETE FROM dbo.tbl_WLC_VDrive
         WHERE VDriveId = @VDriveId
  if(@VHDId is NOT NULL)
  BEGIN
       
   DELETE FROM dbo.tbl_WLC_VHD
   WHERE VHDId = @VHDId
   DELETE FROM dbo.tbl_WLC_PhysicalObject
   WHERE PhysicalObjectId = @VHDId
  END
  if(@ISOId is NOT NULL)
  BEGIN
 
   DELETE FROM dbo.tbl_WLC_ISO
          WHERE ISOId = @ISOId
   DELETE FROM dbo.tbl_WLC_PhysicalObject
   WHERE PhysicalObjectId = @ISOId
  END
 
     FETCH NEXT FROM vdrive_cursor INTO @VDriveId, @VHDId, @ISOId
   END
CLOSE vdrive_cursor
DEALLOCATE vdrive_cursor
-----------------
DECLARE floppy_cursor CURSOR FOR
SELECT VFDId, vFloppyId from
dbo.tbl_WLC_VFloppy WHERE HWProfileId = @ObjectId
DECLARE @vFloppyId uniqueidentifier
DECLARE @vfdId uniqueidentifier
OPEN floppy_cursor
FETCH NEXT FROM floppy_cursor INTO @vfdId, @vFloppyId
WHILE(@@fetch_status = 0)
BEGIN
      DELETE FROM dbo.tbl_WLC_VFloppy
  WHERE VFloppyId = @vFloppyId
 
  if(@vfdid is NOT NULL)
  BEGIN
   DELETE FROM dbo.tbl_WLC_VFD
   WHERE VFDId = @vfdId
   DELETE FROM dbo.tbl_WLC_PhysicalObject
   WHERE PhysicalObjectId = @vfdId
 
  END
 
     FETCH NEXT FROM floppy_cursor INTO @vfdId, @vFloppyId
   END
CLOSE floppy_cursor
DEALLOCATE floppy_cursor
----------------
DECLARE checkpoint_cursor CURSOR FOR
SELECT VMCheckpointId from
dbo.tbl_WLC_VMCheckpoint WHERE VMId = @ObjectId
DECLARE @vmCheckpointId uniqueidentifier
OPEN checkpoint_cursor
FETCH NEXT FROM checkpoint_cursor INTO @vmCheckpointId
WHILE(@@fetch_status = 0)
BEGIN
      DELETE FROM dbo.tbl_WLC_VMCheckpointRelation
  WHERE VMCheckpointId = @vmCheckpointId
 
 
     FETCH NEXT FROM checkpoint_cursor INTO @vmCheckpointId
   END
CLOSE checkpoint_cursor
DEALLOCATE checkpoint_cursor
-------------------------
---------Clean checkpoint
DELETE FROM dbo.tbl_WLC_VMCheckpoint
WHERE VMId = @ObjectID

        exec [dbo].[prc_VMMigration_Delete_VMInfoAndLUNMappings] @ObjectId
        DECLARE @RefreshId uniqueidentifier
        exec [dbo].[prc_RR_Refresher_Delete] @ObjectId, @RefreshId

        DELETE FROM dbo.tbl_WLC_VAdapter
WHERE HWProfileId = @ObjectId

        DELETE FROM dbo.tbl_WLC_VNetworkAdapter
WHERE HWProfileId = @ObjectId
               
        DELETE FROM dbo.tbl_WLC_VCOMPort
WHERE HWProfileId = @ObjectId
        DELETE FROM dbo.tbl_WLC_HWProfile
        WHERE HWProfileId = @ObjectId
        DELETE FROM dbo.tbl_WLC_VMInstance
        WHERE VMInstanceId = @ObjectId
DELETE FROM dbo.tbl_WLC_VObject
WHERE ObjectId = @ObjectId
    FETCH NEXT FROM custom_cursor INTO @ObjectId
  END
CLOSE custom_cursor
DEALLOCATE custom_cursor
COMMIT TRANSACTION T1

share save 171 16 Borrado de máquinas virtuales en estado “Missing” en Virtual Machine Manager

Instalación de cliente Lync 2010 utilizando GPO

Dentro de las distintas alternativas que existen para automarizar el despliegue de cliente Lync, antes OCS, aquí vamos a describir la opción de publicarlo a los usuarios mediante una GPO de Usuario. Quizás las otras dos más frecuentes podrían ser la distribución del paquete de instalación mediante SMS/SCCM y la tradicional distribución e instalación mediante Login Script. El utilizar GPO de Usuario en lugar de Máquina es porque mediante GPO de Máquina sólo se pueden desplegar paquetes .msi, mientras que con GPO de Usuario además de paquetes .msi se pueden desplegar paquetes no .msi definidos en archivos de texto .ZAP En el caso de necesitar desplegar utilizando GPO de Máquina habría que convertir el fichero .EXE (no existe en este momento como .MSI) de instalación del cliente Lync a .MSI mediante alguna utilidad del tipo WinInstall, Advanced Installer, ... y similares. En nuestro caso, para evitar dicha conversión, y porque nos sirve la GPO de Usuario vamos a utilizar como método de despliegue el fichero .ZAP Pasos:
  1. Copiar en un recurso de red compartido y accesible por los usuarios el ejecutable de instalación del cliente Lync y crear un fichero de texto .ZAP con el siguiente contenido:
  2. \\servidor\netshare\LyncX86\Lyncx86.exe \\servidor\netshare\LyncX86\Lyncx86.zap  Contenido del fichero .zap [Application] ; Only FriendlyName and SetupCommand are required, ; everything else is optional. ; FriendlyName is the name of the program that ; will appear in the software installation snap-in ; and the Add/Remove Programs tool. ; REQUIRED FriendlyName = "Cliente Lync 2010 32 bits" ; SetupCommand is the command line used to ; run the program's Setup. With Windows Server 2003 ; and later you must specify the fully qualified ; path containing the setup program. ; Long file name paths need to be quoted. For example: ; SetupCommand = "\\server\share\long _ ; folder\setup.exe" /unattend ; REQUIRED SetupCommand = "\\servidor\netshare\LyncX86\Lyncx86.exe" /Silent ; Version of the program that will appear ; in the software installation snap-in and the ; Add/Remove Programs tool. ; OPTIONAL DisplayVersion = 4.0.7577.0 ; Version of the program that will appear ; in the software installation snap-in and the ; Add/Remove Programs tool. ; OPTIONAL Publisher = Microsoft
  3. Crear la GPO de usuario con la definición del paquete a instalar, definición que se cargará desde el fichero .zap; y asociar dicha GPO a la correspondiente OU/OUs donde se encuentran los usuarios a los que queremos desplegar el cliente
  4. screenhunter 02 dec 21 12 261 Instalación de cliente Lync 2010 utilizando GPO
  5. Una vez replicada la política a los usuarios, éstos tendrán disponible desde añadir y quitar programas la posibilidad de instalar el cliente Lync
  6. addremove1 Instalación de cliente Lync 2010 utilizando GPO
share save 171 16 Instalación de cliente Lync 2010 utilizando GPO

IaaS

Infrastructure as a Service: Infraestructura, poder de computación y espacio en disco, proporcionada como servicio por un proveedor de servicios en la nube en régimen de alquiler. La virtualización en este caso facilita al proveedor de servicios el entregar el servicio de forma rápida y ágil reduciendo costes de propiedad de su infraestructura al maximizar el uso de sus recursos hardware y los costes de administración del mismo. Ejemplos: almacenamiento de ficheros
share save 171 16 IaaS

Problems accessing VMM 2008 Self-Service Portal from Windows 7

Because Windows 7 and Windows 2008 R2 are not certified clients for System Center Virtual Machine Manager 2008 Self-Service Portal, when you try to remotely connect to a VM using SSP you are rejected with an message like “Virtual Machine Manager failed to connect to the virtual machine because the guest operating system’s computer name —- could not be resolved by the Domain Name System.”

image1 Problems accessing VMM 2008 Self Service Portal from Windows 7

Starting from VMM 2008 R2, Windows 7 and Windows 2008 are certified clients for Self-Service Portal and this issue is solved.
The workaround to solve the issue in VMM 2008 is to copy SytemCenter.VirtualMachineManager.VMMCtlAx.VMConnect Active X control (vmmctlax_amd64.cab and vmmctlax_i386.cab) located in folder “%programfiles%\Microsoft System Center Virtual Machine Manager 2008\wwwroot\activex” from VMM 2008 server to VMM 2008 R2 server.

image2 Problems accessing VMM 2008 Self Service Portal from Windows 7

Also, in the SSP client, Windows 7 or Windows 2008, you have to uninstall Virtual Machine Manager Self-Service Client from Programs and Features to force its reinstallation with the new version once you access SSP again for the first time.

image3 Problems accessing VMM 2008 Self Service Portal from Windows 7

share save 171 16 Problems accessing VMM 2008 Self Service Portal from Windows 7

How to receive VMM 2008 Job Fails into SCOM 2007: [Engine Task Failure]

There is a rule included in VMM 2008 Managment Pack disabled by default. This rule, “Microsoft.SystemCenter.VirtualMachine.Manager.2008.Engine.TaskFailure.rule”, is in charge to generate a Warning Alert in System Center Operations Manager 2007 whenever a VMM Job fails.

The procedure to enable such rule, “Engine Task Failure”, is the following:

1.- From the Authoring view in SCOM Console expand Rules view. You can filter the rule view looking for Virtual Machine in filter box.

 post1 How to receive VMM 2008 Job Fails into SCOM 2007: [Engine Task Failure]

2.- Once you have located “Microsoft.SystemCenter.VirtualMachine.Manager.2008.Engine.TaskFailure.rule” to enable the rule right-click -> Overrides -> Override the Rule -> For all objects of type: Virtual Machine Manager 2008 Engine Server:

Post2 How to receive VMM 2008 Job Fails into SCOM 2007: [Engine Task Failure]

3.- From Override Properties parameters Check In Override box and set Override Setting to True.

Post3 How to receive VMM 2008 Job Fails into SCOM 2007: [Engine Task Failure]

4.- From Override Properties parameters select any unsealed management pack, i.e. “Default Management Pack”, or create a new one, and click on OK.

Post4 How to receive VMM 2008 Job Fails into SCOM 2007: [Engine Task Failure]

5.- And it´s ready. Good luck.

share save 171 16 How to receive VMM 2008 Job Fails into SCOM 2007: [Engine Task Failure]