Symptoms
Step "Set Hostname" fails in OSD Task Sequence when you use Mac's serial number as a part of the hostname.
pmm_tswizard.log has records like these:
01-14 15:37:36.550 D /PolicyTools:440:307/ Command '"$PMM_TS_VARIABLE_UTIL" --set OSDSerialNumber="$(system_profiler SPHardwareDataType | grep 'Serial Number (system)' | awk '{print $NF}'| awk '{print substr($0,5,7)}')"' finished with (0:0)
01-14 15:37:36.550 D /TsProcessors:440:307/ Installation of 'HSD0009F' () ended with 0
01-14 15:37:36.550 D /TsExecutor:440:307/ Installation of 'HSD0009F' ended with 0
01-14 15:37:36.550 D /TsExecutor:440:307/ Progress: 33%
01-14 15:37:36.550 D /TsExecutor:440:307/ Step 'Get Serial Number' completed
01-14 15:37:36.551 D /TsExecutor:440:307/ Progress: 33%
01-14 15:37:36.551 I /TsExecutor:440:307/ Evaluating condition for child step 'Set Hostname'...
01-14 15:37:36.551 D /TsExecutor:440:307/ Step's condition evaluation trace:
And = true
01-14 15:37:36.551 I /TsExecutor:440:307/ Running child step 'Set Hostname'...
01-14 15:37:36.551 D /TsExecutor:440:307/ Starting step 'Set Hostname'
01-14 15:37:36.551 D /TsExecutor:440:307/ Progress: 33%
01-14 15:37:36.557 D /PrlCommonUtils:440:307/ Started '/Applications/Utilities/Parallels OSD Task Sequence Wizard.app/Contents/Resources/../Resources/scripts/set_hostname.sh' '-hostname' 'Mac-'
01-14 15:37:36.557 D /TsExecutor:440:307/ Progress: 33%
01-14 15:37:36.616 D /PrlCommonUtils:440:307/ Process '/Applications/Utilities/Parallels OSD Task Sequence Wizard.app/Contents/Resources/../Resources/scripts/set_hostname.sh' finished with (0:1)
01-14 15:37:36.617 D /TsProcessors:440:307/ Script 'set_hostname.sh' exit code: 1, status: 0
01-14 15:37:36.617 D /TsProcessors:440:307/ Script 'set_hostname.sh' output:
set_hostname: Parallels Mac Management - Set Hostname (Tue Jan 14 15:37:36 UTC 2020)
set_hostname: Setting LocalHostName to 'Mac-'...
SCPreferencesSetLocalHostName() failed: Invalid argument
set_hostname:Error: Couldn't set LocalHostName: scutil returns 1
01-14 15:37:36.617 D /TsExecutor:440:307/ Step 'Set Hostname' failed (Script set_hostname.sh failed (exit code: 1, status: 0))
01-14 15:37:36.617 D /TsExecutor:440:307/ Child step 'Set Hostname' failed
Cause
The issue is caused by a hyphen in front of the serial number.
Resolution
The issue is fixed in Parallels Mac Management 8. Please upgrade your installation to the most recent version.
If you would like to postpone the upgrade, you may remove the hyphen from the name pattern in the Set Hostname step as a workaround:
Was this article helpful?
Tell us how we can improve it.