When automatically linking added virtual PCs with L-Servers, the administrator creates the following scripts and definition files.
The Resource Orchestrator admin server
Any desired string of alphanumeric characters, with the extension "bat".
Shift-JIS
The command executed successfully.
An error has occurred.
The content of the script for linking with L-Servers is as follows.
@echo off setlocal enabledelayedexpansion set AUTO_CONVERT_PATH=%~dp0 set RUN_SCRIPT="Installation_folder\SVROR\Manager\bin\convertVMtoLServer" set CSVPATH=Absolute_path_of_the_folder_for_storing_the_CSV_configuration_file set CSVFILE=convertVMtoLserver.csv set CSVFULLPATH=%CSVPATH%\%CSVFILE% set CSVTEMP=%CSVPATH%\temp.csv set UNCONVERT_VMNAMES=%AUTO_CONVERT_PATH%\unconvert_vmname.txt set RESULTCSVFILE=%CSVPATH%\convertVMtoLserver_result.csv echo [%DATE:/=-% %TIME%] auto convert Start call %RUN_SCRIPT% -exportfile "%CSVPATH%" -fixfilename if not !errorlevel!==0 ( echo make csv file failed. echo [%DATE:/=-% %TIME%] auto convert End exit /b 1 ) else ( if exist "%UNCONVERT_VMNAMES%" ( for %%a in ("%UNCONVERT_VMNAMES%") do ( if not "%%~za" equ "0" ( for /f "tokens=1 delims=" %%i in ('findstr /v /g:"%UNCONVERT_VMNAMES%" "%CSVFULLPATH%"') do ( echo %%i>>"%CSVTEMP%") del "%CSVFULLPATH%" ren "%CSVTEMP%" "%CSVFILE%" ) ) ) call %RUN_SCRIPT% -file "%CSVFULLPATH%" if not !errorlevel!==0 ( echo display convertVMtoLserver.csv start for /f "tokens=*" %%a in (%RESULTCSVFILE%) do echo %%a echo display convertVMtoLserver.csv end echo convert lserver or make xml file failed. echo [%DATE:/=-% %TIME%] auto convert End exit /b 1 ) ) echo convert lserver is successfully completed. echo [%DATE:/=-% %TIME%] auto convert End exit /b 0
Note
The content of the definition file for excluding virtual PCs from the targets of batch linking is shown below.
By specifying resource pool names, VM host names, and virtual PC names, it is possible to exclude specific virtual PCs from being linked as a batch.
The same folder as the script for linking with L-Servers
unconvert_vmname.txt
Shift-JIS
CR/LF
Describe the file using the following format. Do not enter blank spaces or empty lines.
/Resource_pool_name/VM_host_name/Name_of_virtual_PC_1_to_be_excluded_from_the_targets_of_batch_linking /Resource_pool_name/VM_host_name/Name_of_virtual_PC_2_to_be_excluded_from_the_targets_of_batch_linking
Example
/VMHostPool/vmesx3/win2008
/VMHostPool/vmesx2/win2003