Anda di halaman 1dari 4

My second life

This one's intentional.

Creating an imagex (wim) image using a VMware Workstation VM as your reference computer
You will need: VMWare Workstation (I am running 8) with a Windows 7 VM running; dont install VMWare tools. The Windows Automated Installation Kit (http://www.microsoft.com/download/en/details.aspx?id=5753), installed on the computer that runs the VM. This procedure only uses WSIM, imagex, dism and diskpart, but you have to have at least those. A bootable Windows PE CD or DVD (http://technet.microsoft.com/enus/library/cc749311%28v=ws.10%29.aspx). It is helpful if you ALSO have a Windows PE flash drive. Your unattend file (http://technet.microsoft.com/en-us/windows/dd179859). I recommend setting CopyProfile=True and PersistAllDeviceInstalls, but you should think carefully about what your needs are. Drivers that you want to inject, downloaded to a folder on the same workstation (not the VM). These will be drivers needed by the target computers and must be installable via inf. Note that Dell provides driver packages (http://en.community.dell.com/techcenter/enterpriseclient/w/wiki/2065.dell-driver-cab-files-for-enterprise-client-os-deployment.aspx) that include all the drivers for a particular model. A network-shared folder, either on the computer where VMWare is running or elsewhere. 1) Get VM image ready: Do all of these steps on the Windows 7 VM. Install on your VM everything that you want on your image. Use snapshots for any points that you might want to return to. Document as you go. Configure the administrator account with any user settings that you want copied to newly created accounts, such as home page of the browser, exemptions from popups, items on the desktop and taskbar, energy saving settings, etc. Sysprep will copy administrator settings to the default user profile if CopyProfile is set to true in the unattend file. Copy your unattend file to c:\windows\system32\sysprep. Disconnect any network drives that you dont want included on the image. Uninstall the VMWare tools, if they are installed. Empty the trash, run disk cleanup, remove items from the run history, clear browser caches. HKEY_CURRENT_USER/Software/Microsoft/Windows/CurrentVersion/Explorer/RunMRU). Take a snapshot. That way, if you dont like the way your image turned out, you can return to this point to do revisions.

2) Sysprep: In a command prompt on the VM, run cd \windows\system32\sysprep; Run sysprep /generalize /oobe /shutdown /unattend:yourunattendfilename.xml (More (http://technet.microsoft.com/en-us/library/cc721973%28v=ws.10%29.aspx) about command line options) When the VM has shutdown, adjust its settings for the CD and boot delay: -The CD should be using the drive where you have a Windows PE disk. -Turn off the VM to add the following line to your vmx file: bios.bootdelay=5000. That gives you five seconds to react at the boot screen. You can increase if thats not enough. Take a snapshot, in case you have trouble booting to PE and want to wind back to here. 3) Boot to Win PE: Be sure you understand this step before you do it. You have to click the mouse and then hit <esc> at the correct moment or you wont get the boot menu. Start VM, watching the messages at the bottom left of the window. When you see To direct input to this VM, click inside or press Ctrl+G , it means the VM is ready for input; if you click before that, your click is thrown away. Click anywhere in the window to activate input to the VM. When the VM recognizes your click, you will see a message To return to your computer, Press Ctrl+Alt. Immediately press <esc>. The boot menu appears.Note: If you were a little slow and took more than five seconds to input your click, Windows will start running setup and you will not get a boot menu. You should revert to the snapshot you took in step 2 and try again, possibly after adding a longer boot delay. Press ctrl-alt to release keyboard from window; insert USB drive with imagex on it if you have one; insert bootable PE CD in drive; on VM menu, connect the drives if needed. Click back in to the VM and choose CD/DVD drive from the boot menu. 4) When PE has successfully booted, net use n: your network share 5) Use diskpart to verify the drive letters of your USB drive, your CD drive, and your VM drive. 6) imagex /capture VM drive letter:\ n:\wimfilename.wim imagename (Substitute your own names and locations for items in italics) If you have a PE flash drive, run imagex from it. Otherwise, run from the CD, which in my experience is noticeably slower. When the image has finished capturing, you may want to inject drivers for the target systems: 7) Inject driver packages: Make a copy of the wim in case something goes wrong with injection Open an elevated command prompt (Its handy to use the one provided with the WAIK). Run, substituting appropriately at italics: dism /mount-wim /wimfile:pathtowim /mountdir:pathtomountpoint/index:1 dism /image:pathtomountpoint /add-driver /Driver:pathtodriverfolder/recurse /forceunsigned dism /unmount-wim /mountdir:pathtomountpoint /commit 8) Test against a physical system using usual imagex application procedures. About these ads

This entry was posted on March 27, 2012 at 12:11 am (http://en.wordpress.com/about-these-ads/) and is filed under Technology. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

5 Responses to Creating an imagex (wim) image using a VMware Workstation VM as your reference computer
Grimmleafer Says: September 14, 2012 at 12:09 am | Reply Great writeup. This is exactly what I have been trying to do. One problem I have is that after applying the image to a physical machine, it will bluescreen and keep cycling that way. Going into safe mode it will hang at disk.sys, then reboot. I have a feeling it has to do with the hard drive controller drivers. I have removed VMware tools prior to capturing the image but it hasnt helped. Any ideas of what the issue could be? paculino Says: September 14, 2012 at 9:53 am | Reply Grimmleafer, thanks for your kind words. It tickles me to know someone read this. Did you format the partition before applying the image? I find it clears up a number of problems to apply the image to a clean partition. Also, make sure your partition begins at a 1024 boundary. The easiest way to be sure of that is to let a Windows install disk make the partition for you then quit the program. You can do it with diskpart, too, and that works. Shelley B. Says: November 22, 2012 at 3:15 am | Reply Thanks for your write-up, of this, and Im glad to have happened upon your blog as I took a quick look around and feel like we may have similar life experience. But to try to keep on topic: I had seen one of the items in the following for the first time just yesterday, and was not aware of another, so I wanted to let you know at least two people had read this post, and add this tidbit from KB KB 1004129. The .vmx setting b i o s . f o r c e S e t u p O n c e = " T R U E " will force your VM into the bios without the need for catching it quickly, and, also (the option I saw yesterday) theres an option in the power menu that says Power on to BIOS. Anyway, thank you for your time, and much love to you. <3 Shelley Shelley B. Says: November 22, 2012 at 3:17 am | Reply [oops, sorry for machine-gun post, but that should have read "...since VMware 7, there's an option in..."] t.egolf Says: May 2, 2013 at 8:28 pm | Reply

Hi there, I just stumpled upon your article while trying to find a hint to a strange problem. I created a WIM image from a vm reference system using the same mechanisms as described above. At a first glance everything worked fine. But after some days I tried to install a vmWare player on the new physical device. Whenever I try to run vm guests with this wmWare player they cant conenct to the hosts cd rom an network card. Does someone have similar problems with physical machines which were deployed through a vmWare WIM?

Theme: Kubrick. Blog at WordPress.com. Entries (RSS) and Comments (RSS).

Anda mungkin juga menyukai