次の方法で共有


How an Enterprise Administrator can Determine MED-V 2.0 FTS Completion and Provide Remediation quickly.

When deploying large amounts of MED-V 2.0 workspaces in the enterprise, Microsoft offers several flexible options for determining on a large scale if MED-V First-time-setup occurred properly. The goal of this is to be able to incorporate this into an existing software/operations management infrastructure.

Event Viewer/Event Collections

In Windows 7, under the Applications and Services Event Logs, is the MEDV Event log for the Host Agent. If you are tracking event logs through an operations management application or other event collector you can leverage the following Event ID’s for tracking FTS progress.

EVENT ID

Task Category

Event String

Description

3068

Workspace Setup

Workspace setup completed workspace install action.

MED-V Workspace MSI Installer has completed. This will happen prior to FTS.

3072

Workspace Setup

Start of workspace setup sequence accepted by the user.

FTS has begun because the end user has clicked to start.

3073

Workspace Setup

Start of workspace setup forced.

User timeout value has passed and FTS is starting by force.

3057

Workspace Setup

Workspace setup started.

This event will be logged regardless of how FTS begins.

3077

Workspace Setup

Workspace is ready for use.

Final indication of FTS completion.

6016

Workspace Setup

The virtual machine is ready.

Indication that VM has completed its setup.

3150

Workspace Setup

Workspace setup sequence timed out

If found, will be coupled with 3078 and/or 3071.

3078 and 3071

Workspace Setup

Workspace setup failed.

MED-V FTS did not complete. Key Event ID’s for tracking FTS failures. 3071 will track as an Error.

3013

Workspace Setup

Error Detected  While launching workspace setup sequence

This will be followed by a more specific error.

3079

Workspace Setup

Retrying workspace setup.

If workspace setup times out or fails it will periodically continue to retry setup.

3064

Workspace Setup

Timed out turning off workspace.

This error can happen when trying to turn off/shutdown workspace.

3132

Workspace Setup

Error detected while detaching disk image from workspace.

When passing VFD to the workspace for the modified sysprep process, this error can occur.

3146

Workspace Setup

Failed to turn off workspace while finalizing the preparation of the workspace.

Usually follows Error 3064. This error can happen when trying to turn off/shutdown workspace.

 

Microsoft Enterprise Desktop Virtualization (MED-V) Configuration Pack

Microsoft also makes available a DCM (Desired Configuration Management) pack for MED-V FTS. You can download the DCM package here.

https://www.microsoft.com/download/en/details.aspx?id=26219

This MED-V Configuration Pack provides a way for administrators to use the Desired Configuration Management feature of System Center Configuration Manager to track the successes and failures of FTS.

The MED-V WMI Provider

MED-V 2.0 includes a fully-featured WMI (Windows Management Instrumentation) provider. You can also leverage any ESD (Electronic Software Distribution) solution that leverages WMI through a WQL query, script, or even through the WMIC command.

 

For example, the WMIC command above:

Wmic /NAMESPACE:\\root\microsoft\medv PATH FTS_Status

returns the status code of 3013 indicating an error mirroring what will be in the local hosts event viewer’s MEDV log (Error Detected  While launching workspace setup sequence.)

Whereas the command below indicates successful completion (FTS_status=0.)

So what if there are errors? What is the best way to test FTS completion? For me, if there is an error during testing or even post-deployment, I will change the FTS mode from unattended to attended so I can watch the setup through the VPC preview screen. You can do this by changing the Mode registry value:

KEY: HKEY_LOCAL_MACHINE\Software\Microsoft\Medv\v2\Fts

Value = Mode

Data = Attended

You can also adjust the Powershell code by switching the –FtsMode switch over to “Attended” as shown in the example PowerShell code below:

import-module -Name "Microsoft.Medv"

$regFileInfo = New-MedvConfiguration -VmNetworkingMode "BRIDGED" -UxLogonStartEnabled "False" -UxCredentialCacheEnabled "True" -FtsMode "Attended" -VmMultiUserEnabled "False" -FtsAddUserToAdminGroupEnabled "True" -FtsStartDialogMsg "A virtual environment is being created for application compatibility. The first time setup process can take several minutes to complete." -FtsFailureDialogMsg "First time setup failed while creating a virtual environment for application compatibility." -FtsRetryDialogMsg "First time setup failed while creating a virtual environment for application compatibility." -FtsSetUserDataEnabled "True" -FtsSetJoinDomainEnabled "True" | Export-MedvConfiguration -Path "C:\medv2-packages\Windows XP Compatibility.reg" –PassThru

Now, the setup will show you the progress and you can home in on the issue that may be happening behind the scenes. In the example below, we see the failure is actually a timeout due to an invalid parameter being specified for the domain in the SYSPREP.INF file.