New Question

Windows 10 Hostname not being set

asked 2016-02-25 14:32:48 +0300

dniasoff gravatar image


I am trying to build a windows 10 (1511) image on Cloudstack.

Running windows update and then installing Cloudbase-init using the built in unattend xml.

It creates the new Admin account but does not change the hostname?

Is there any command I can run in %WINDIR%\Setup\Scripts\SetupComplete.cmd to work around this?

If I delete HKEYLOCALMACHINE\SOFTWARE\Cloudbase Solutions and reboot it does change the hostname.

Tried adding the following to %WINDIR%\Setup\Scripts\SetupComplete.cmd

reg delete /f "HKEYLOCALMACHINE\SOFTWARE\Cloudbase Solutions" shutdown -r -t 0

But it doesn't help (it just prevents me from using the newly created Admin account).

Any ideas?, I am pulling my hair out!!!!!!



edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted

answered 2016-02-26 14:02:47 +0300

avladu gravatar image

updated 2016-02-29 14:14:56 +0300

Hello Daniel,

If possible, can you put in a pastebin the cloudbase-init and cloudbase-init-unattend logs, for further debugging this issue?

Edited: This is a known issue of Windows 10, which causes a SetComputerName function to run during the OOBE step, that changes the computer name to DESKTOP-<random string="">. As we run our cloudbase-init-unattend during specialize(which is before oobe), the hostname plugin execution becomes irrelevant.

A quick solution would be to change the cloudbase-init-unattend run in Unattend.xml from "specialize" step to "oobesystem" step -> . The downside with this approach is that the login screen appears, then the hostname reboot is executed(after of course, the time taken to find and consume a valid metadata service).

We are currently investigating the options to mitigate this issue and will be back with a fix on this(either the installer or cloudbase-init).


edit flag offensive delete link more


Hi, Thanks for this, I managed to work around this by removing the ,cloudbaseinit.plugins.common.sethostname.SetHostNamePlugin plugin from cloudbase-init-unattend.conf and setting the cloudbase-init service to manual and using post-sysprep script to reset it to auto. I guess your workaround is best

dniasoff gravatar imagedniasoff ( 2016-02-29 19:13:30 +0300 )edit

noob so no vote karma, but I am in the same boat. Going to try the specialized to oobe, but I can see the instance name in the metadata json and the plugin call, but standard unattend rand name.

jrack gravatar imagejrack ( 2016-03-29 16:04:27 +0300 )edit

As a note rename has been successful for me since moving from specialized to oobe. Seems like a fine workaround for the moment.

jrack gravatar imagejrack ( 2016-04-07 21:11:10 +0300 )edit

answered 2016-02-26 16:34:15 +0300

dniasoff gravatar image

Here is the cloudbase-init logs

Here is the cloudbase-init-unattend logs

And here is the sysprep logs



edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Question Tools



Asked: 2016-02-25 14:32:48 +0300

Seen: 622 times

Last updated: Feb 29 '16