Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to have sysprep make a call out to a server somewhere (SCCM, MDT, etc) that provides an answer during bootup to get the computer name and IP address to use. Any pointers on which technology or method to use?

Further info: I want to be able to create a base golden image on a VHD and sysprep it so that it powers down. Then differencing disks will point to this sleeping sysprepped image. However, while booting up each new vm, I want a way to set the computer name and IP uniquely, preferably by MAC address.

I can mount the VHD and edit unattend.xml before powering on, but it appears that unattend.xml has already been run on the previous shutdown and isn't used on boot-up.

My failback plan is to have a script run after booting up that will rename it, set the IP and reboot. However, I would like to avoid that extra reboot if at all possible.

share|improve this question
up vote 1 down vote accepted

Look into MDT 2010. It has builting functionality to boot into WinPE and Query a SQL Database (based on the computers Mac address) for pretty much anything you want and populating this into unattend.xml before the install runs. Lots of options. Takes a little while to get the hang of it, but it's pretty logical. IP Address specifiation was a bit troublesome in the last version of MDT, but in 2010 you can add your own columns to the database and perform queries on these as well. you MIGHT have to create your own script for setting the IP address, but it shouldn't be too much work finding a vb script that lets you do it - at least if your computers only have one NIC - google is your friend.

best regards, Trond

share|improve this answer
My problem is that the image is essentially already on the vhd, so I can't use MDT for the first part of the process. I just need it to answer questions as the vm is booting up. Is it possible to do that? If so, how? – Scott Forsyth - MVP Oct 13 '09 at 12:56
Absolutely. I would capture your VHD to a WIM file (I'm guessing future cersinos of MDT will natively support VHD, but for now you have to capture it) and import it. In MDT2010 there is a standard task sequence you can use for capturing an existing machine. I woudl recommend that you install MDT2010 and just play around with it. It's pretty easy and logical laid out in the newest version. I would also recommend Michael's blog at - he is probably THE authority on all things MDT and writes a lot of good stuff over there. – Trondh Oct 13 '09 at 13:33
sorry for the typos... busy day :-| – Trondh Oct 13 '09 at 13:34
Sounds promising. Same as WDS, I only need it for the last steps since the image will essentially already be deployed before MDT comes into play. I'll install MDT2010 and try it out. Thanks for Michael's blog too. – Scott Forsyth - MVP Oct 13 '09 at 15:44
I'm going to work on a temporary solution for now and come back to this in a couple months and do it properly then. Likely MDT, SCCM and/or WDS will do the trick. – Scott Forsyth - MVP Oct 14 '09 at 22:37

It sounds like you want a WDS server.

WDS is Windows Deployment Services, replacing the older Remote Installation Services (RIS). And uses answer files, can name systems within a naming convention, and can be installed through a network boot.

Here is a very cool article on how 2500+ notebooks were simultaneously installed with Windows 7 at the TechEd conference, using WDS and MDT.

Rather than enumerate the steps necessary to deploy WDS, here's the technet link.

(if you are using win2k3/XP just replace WDS with RIS in this post).

share|improve this answer
Thanks, I'll check that out in more depth and look at the article and link. I can't use WDS for the first part of the process since I'll have the image essentially already deployed, so I need to find a way to have WDS take over just for the final steps. – Scott Forsyth - MVP Oct 13 '09 at 15:41
You should be able to use WDS for the whole procedure. Take a look, it might be better to re-engineer the process than to create several disjointed steps. Unless hyper-v won't network boot new VMs. – Joseph Kern Oct 14 '09 at 10:21
I'm looking to use differencing disks, which, as far as I know, isn't supported with WDS. That's the kicker. I haven't seem a zero touch solution using differencing disks yet. – Scott Forsyth - MVP Oct 14 '09 at 22:38

If you can mount a VHD you can just use:

ComputerName = <computer name>

in C:\SysPrep\sysprep.inf file.

As for IP there is a NetSet tool which is able to set up IP. But just using DHCP with static assignments will be much better - easier and more flexible.

share|improve this answer
Is sysprep.inf still used for Windows Server 2008 and Vista? If so, that sounds promising. Also, is the .inf read on 'booting' the VM, and not when sysprep is first run? – Scott Forsyth - MVP Oct 13 '09 at 15:39
Haven't used it on Vista yet. I think you'd need an XML file instead of INI. There's a tool - Windows Automated Installation Kit - for creating this file. Damn. Another thing to learn. – Tometzky Oct 13 '09 at 17:51
afaik this has been replaced fully with the unattend.xml (or whatever you want to call it). I tried this method, which would have been ideal, but what I found is that sysprep appears to have already processed the file by the time it shuts down. I see the Sysprep_succeeded.tag file there and when I changed the computer name and powered up, it didn't use the name. – Scott Forsyth - MVP Oct 13 '09 at 18:09

Can you not leverage DHCP in some way to assign IP's?

Combined with SysPrep's own ability to name the computer on its initial boot it should give you what you need with only a little bit of effort.

Is there any particular reason you need to know the machines IP or set it manually? In our infrastructure we rely on DHCP for most systems - using reservations where we do need to force an IP and just using DNS names to find the IP where they're dynamically assigned.

share|improve this answer
I agree that DHCP can work for the IP assignment. I do need permanent IPs assigned, but, like you say, reservations can address that. However, the name needs to be assigned according to our naming scheme so I need to somehow let the computer know about the new name as it's booting up. – Scott Forsyth - MVP Oct 13 '09 at 12:52

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.