XPe on ESX 3.x

So, after I posted my method for building and testing XPe images in Workstation, I was asked to get my XPe VMs working in ESX as well.  ESX uses an older version of VMware’s Virtual Hardware, so XPe VMs I created with my previous method will not run if transferred directly to an ESX machine.

Creating the virtual hardware component is pretty straightforward, and follows the same general process as my previous guide.  For your convenience, I’ve uploaded my component that I created running XP on ESX.

vmware4.sld

However, just the component isn’t enough for ESX.  ESX 3.x doesn’t support virtual IDE hard drives.  Likewise, Windows XPe doesn’t support SCSI drives.  So, you’ll have to install the VMware SCSI driver.  During a normal XP installation, you can do this by pressing F6 during installation and loading the drivers from a floppy, but because you build XPe rather than installing it, you have to componetize the driver.  Again, I’ve already done this for you.

vmscsi.zip

If this doesn’t work for you, you can download the floppy image containing the driver from VMware.com, extract it, and then import the vmscsi.inf file into the XPe Component Designer.

Once you have both the vmware4 and vmscsi components added to your XPe profile, run dependency checks to pull in the required components and build the image like you did in the last guide.  After that, move the Virtual Machine onto your ESX box (assuming you didn’t create it there) and fire it up.

Developing Components for XPe

I spent most of the day further researching XP Embedded, specifically with respect to developing custom components.  As the software I’m working on is meant to run on embedded devices, it would be a good idea for us to provide an XPe component in addition to our regular installer.

For the moment, I accomplish this by having the component run the installer at first boot, but I’m hoping to come up with a more elegant solution in the next couple of days.

Component design is another aspect of XPe Tools that could use some work.  With most software for Windows being distributed in exe or msi form, I was suprised that there was no utility to build a component from one of those files.  Instead, the best way to accomplish that would be to use a third party tool, such as InCtrl5, that will monitor changes to the filesystem and registry during the installation of any given piece of software.

Another odd thing I noticed today is that the Target Designer seemed to be crashing on me every few minutes.  I just upgraded it to SP2, and I’m wondering if that’s the problem.

Using VMware to Build and Run XP Embedded

Update 9/2011: Unfortunately, I’ve lost the .sld files that are referenced in this article. At this point, the information here is probably quite out of date. While some of it may still be of use, you may want to look elsewhere for getting XPe running in a virtual machine.

XP Embedded Studio isn’t actually a horrible application at it’s core.  Now, the user interface and documentation are God-awful, which is why I’m writing this post.  As you saw in my last two entries, I’ve been working with XPe for the last few days, and there has been plenty of frustration to go along with it.  What should have been a fifteen minute task wound up taking several days.  However, one week and a few dozen BSODs later, I present this how to:
Continue reading

More Frustrations

Trying again to deal with XPe only lead to more frustrations today.  I managed to get the virtual disk marked as bootable, and the virtual machine did start up, but then I was faced with another problem.  As is, the image would complain that it couldn’t find System32driverspci.sys, so, I rebuilt the image and included the PCI subsystem that contained the needed file.  After rebuilding the image and again booting to it, the image bluescreened as soon as it started loading.  Removing pci.sys fixed the bluescreen, but reverted to the other problem.  I still have some tinkering to do, but I don’t know how successful it will be.

During some of my sporadic downtime when Windows was crashed, loading, or rebooting, I took a look at the iPhone SDK and emulator.  Some of the webapps for the iPhone are really impressive, notably Facebook and Meebo.  I even found a plugin/theme for WordPress to make a site more iPhone friendly and set it up for Collegegeek.org.  I haven’t started coding anything yet, but the first step will be to start learning some Objective C.

Embedded Headache

Today, I had a unique opportunity to work with Window XP Embedded.

*Shudders*

Microsoft has made some lousy products in the past, but the Embedded SDK has to be one of the worst.  The application isn’t remotely intuitive to use, and even once you’ve learned what you’re doing, it’s not easy.  The task I had was simple: create an XPe image to test a particular program with.  However, this was far more difficult than it needed to be.  Even though I had a list of the DLLs that I needed, there was no easy way to find those DLLs in the XPe tools.  Each time that I wanted to load a DLL, I had to manually create a new filter for “Contains” and the name of the DLL, rather than use the integrated search box.  For some reason, the search box would not look at the names of the DLL files themselves, just the name of the packages they were in.  Even creating a filter didn’t work 100% of the time (actually, I don’t think it even found 10% of the files I needed).

Secondly, the built in dependency generation was a joke.  When you clicked on “Build,” it would ask you if you wanted to automatically fulfill dependencies.  You click yes, and it does that, but it’s not recursive.  Whast I mean, is after it’s done, and you click “Build” again, you know have X number of new components that need to have their dependencies checked, and so XPe will go on to scan every component again.  It took 5 or 6 rounds of dependency checking before it was finally happy for me.  Then, I got to build the image.  The software did some hocus pocus, and then spat out a standard looking C: filetree in a directory on my hard drive.  Now what?  I had Program Files, Documents and Settings, and WINDOWS, but no idea what to do with them.  I tried putting them on a virtual 512MB hard disk and creating a virtual machine to boot to it, but no luck, there was no MBR on the disk.  After 30 minutes or so of reading documentation on the matter, I called it quits for the day and went on to work on other things.

I know it’s not an impossible issue to overcome, and I’m sure I’ll get past it tomorrow, but creating an embedded image was far more difficult than it needed to be, and in my opinion, should be handled something like this:

  1. Start a new Embedded project.
  2. Load any number of executables that you need your system to run into the project.  The software scans the EXEs to determine which libraries they are linked against, and copies those files into the project as well. (Visual Studio has a tool to scan an EXE and determine it’s dependencies, so this should be possible.) The included EXEs will be copied into Program Files when the image is created.
  3. Create a profile of the hardware that the image needs to run on, and load the appropriate drivers.  For more common hardware, this could be done automatically, otherwise, the user could manually download and add the needed drivers.
  4. Now, perform a single, recursive, dependency check to satisfy all of the previously included components.
  5. Finally, export the image to a specified format, such as a CD ISO for installing the image, or a bootable USB jump drive.

That’s just a rough outline, but I think that it’s relatively feasible and that creation of embedded systems could be much easier.