Page 1 of 1

How to change computer name during boot

Posted: 11. Apr 2011, 16:19
by hoenes1
Hi all,

I've created a Windows XP guest template and installed everything I want it to have. Then I converted its primary hd image into a read-only multiattach one and attached it to virtual machines on different hosts, so multiple users can access it concurrently (the template base hd image is stored read-only on the server, changes are written to a local snapshot file). This works great, the only issue is that the computer name is of course always the same, resulting in Windows error messages when run concurrently.

Is there a way to change the computer name during the boot process? A boot menu using different menu items would be great, but I guess that's not possible. I thought about a logon script which checks the computer name for a template name and in this case changes it to "vbox-xp-<user>" or something and reboots immediately. But this, let's call it workaround, is kind of dirty and error-prone.

It's very important to being able to change the template without corrupting the clones on different hosts. So setting the computer name once on each clone (which would write it to the local snapshot file) is not an option as it would render the local snapshot invalid in case of a base image change. Also, local changes are discarded on each power-on of a clone, additionally eliminating the former change-name-once-on-each-clone approach. So the trick must be done BEFORE creating the base image.

Ideas, anyone?

Thanks in advance,
Hannes

Re: How to change computer name during boot

Posted: 11. Apr 2011, 16:28
by vbox4me2
The computername is stored in the registry so adjust the scripts that make the build, ea. for sysprep there is a mysysprep that solves this issue for that method.