image Many organizations want to use variables to simplify the naming and manageability of MED-V workspaces. While regular operating system environment variables cannot be used inside the workspace policy, MED-V has variables that can be used for persistent workspaces. The workspace policy must use the VM Setup script to implement these variables.

These variables can be selected when configuring the MED-V workspace policy inside the MED-V management console (run from the client.)

To view and select these variables, do the following:

1.) Log into the MED-V Management Server (policy server) using the MED-V Management utility.

2.) When the policy loads, navigate to the Policy node.

3.) Select your desired workspace, then click on the VM Setup Tab. (Be advised that this option is only available for persistent workspaces which is defined in the Virtual Machine tab.)

4.) In the VM Setup tab you will see an option for "VM Computer Name Pattern" near the bottom of the page.

clip_image002

The default pattern for the machine image name is: MED-V%workspace########## where %workspace represents the name of the workspace used by this image on the client computer. The remaining # characters denote a random generated character. It is here where you have the option to insert different variables and where you can define your own computer name pattern. The variables that can be used are:

%Workspace: The name of the MED-V workspace being used by this image during the VM setup.

%User: The name of the user logged on to MED-V during the VM setup.

%Domain: The domain name (short name) of the authenticating MED-V Active Directory domain.

%Hostname: The hostname of the physical machine running the MED-V Client using this workspace.

%VMName: The name of the Virtual Machine name (Name of the virtual machine image file used by the workspace.)

Examples:

If a user named Ernie from the domain CORPORATE logged on to a machine named CLIENT234 using the workspace called IE_7 leveraging the image XP01 will have the following name translations after generation:

VM Computer Name Pattern

Actual Name

MED-V%Domain#####

MED-VCORPORATE5

%Workspace-%User

IE_7-ERNIE

%UserMED-V

ERNIEMED-V

%Hostname-MEDV

CLIENT234-MEDV

%VMNameMEDV#####

XP01MEDV64345

NOTE: The maximum limit for a name is 15 characters. Any pattern that generates a result that exceeds this limit will be truncated to the first 15 characters.

clip_image004

5.) Once this is determined, you will need to include the action within the VM setup script. This will require you to click the "Script Editor" option under Persistent VM Setup. Click on this button. The "Rename Computer" Action is required to generate the computer name. Also note, this will need to be followed by a "Restart Computer" action.

Steve Thomas | Senior Support Escalation Engineer