box-cutter / windows-vm

Virtual machine templates for Windows
76 stars 35 forks source link

Add option to Sysprep #5

Open misheska opened 10 years ago

misheska commented 10 years ago

Add option to truly Sysprep (by running two passes, one to perform install & update, then another to Sysprep as OOBE for imaging.

misheska commented 9 years ago

Experimented with adding the ability to make hardware-independent vagrant images via “sysprep /generalize” with the box-cutter Windows images: https://github.com/box-cutter/windows-vm/commit/ba7739c038bc000efbfbc3eea8d3c8ba204b7c2f

Looks like the Autounattend.xml files being used need a lot more tweaking, as I got some errors about having duplicate item lists. I’ll either have to make two Autounattend.xml for each phase of box-building, or figure out a way to use one.

Before delving into the workarounds I know about, which are old-school sysprep, rejiggering the rearm count and so forth, played around with using the “new” MDT method. But I agree with the comments in the following article that it is just too convoluted to be practical: http://blogs.technet.com/b/askcore/archive/2011/05/11/sysprep-skiprearm-and-image-build-best-practices.aspx

So I’m going to first try to see if I can use one Autounattend.xml file, and if not, I’ll create a second one for each platform for the generalize step.

svmastersamurai commented 9 years ago

I forked your repo and got this mostly implemented. The way you use it is you would add a sysprep user variable to the template and set it to "true" if you want to sysprep the VM. Would you want me to add this to all the template files or would the eval templates be sufficient to demonstrate the functionality? I've also been able to test this on Virtualbox and VMWare but I lack the ability to test on parallels =( If this sounds good to you I'll get a pull request up once I get a chance!

rasa commented 9 years ago

Sounds good to me. @misheska?